Skip to content

Commit a7f1350

Browse files
Add Crc32 nuint test-generator entries (ComputeCrc32_UIntPtr, ComputeCrc32C_UIntPtr)
Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/d9436184-20aa-448e-87fa-61358beca1c7 Co-authored-by: tannergooding <10487869+tannergooding@users.noreply.github.com>
1 parent 00b42cf commit a7f1350

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/tests/Common/GenerateHWIntrinsicTests/Arm/BaseTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ static class BaseTests
3939
(Templates.ScalarBinOpTest, new Dictionary<string, string> { ["TestName"] = "ComputeCrc32C_Byte", ["Method"] = "ComputeCrc32C", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["Op2BaseType"] = "Byte", ["NextValueOp1"] = "0xFFFFFFFF", ["NextValueOp2"] = "0x20", ["ValidateResult"] = "uint expectedResult = 0x8D3F2270; isUnexpectedResult = (expectedResult != result);" }),
4040
(Templates.ScalarBinOpTest, new Dictionary<string, string> { ["TestName"] = "ComputeCrc32C_UInt16", ["Method"] = "ComputeCrc32C", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["Op2BaseType"] = "UInt16", ["NextValueOp1"] = "0xFFFFFFFF", ["NextValueOp2"] = "0x2019", ["ValidateResult"] = "uint expectedResult = 0x9F50ACBD; isUnexpectedResult = (expectedResult != result);" }),
4141
(Templates.ScalarBinOpTest, new Dictionary<string, string> { ["TestName"] = "ComputeCrc32C_UInt32", ["Method"] = "ComputeCrc32C", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["Op2BaseType"] = "UInt32", ["NextValueOp1"] = "0xFFFFFFFF", ["NextValueOp2"] = "0x20191113", ["ValidateResult"] = "uint expectedResult = 0x78F34758; isUnexpectedResult = (expectedResult != result);" }),
42+
(Templates.ScalarBinOpTest, new Dictionary<string, string> { ["TestName"] = "ComputeCrc32_UIntPtr", ["Method"] = "ComputeCrc32", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["Op2BaseType"] = "UIntPtr", ["NextValueOp1"] = "0xFFFFFFFF", ["NextValueOp2"] = "(UIntPtr)0x20191113110219UL", ["ValidateResult"] = "uint expectedResult = (UIntPtr.Size == sizeof(ulong)) ? Crc32.Arm64.ComputeCrc32(left, (ulong)right) : Crc32.ComputeCrc32(left, (uint)right); isUnexpectedResult = (expectedResult != result);" }),
43+
(Templates.ScalarBinOpTest, new Dictionary<string, string> { ["TestName"] = "ComputeCrc32C_UIntPtr", ["Method"] = "ComputeCrc32C", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["Op2BaseType"] = "UIntPtr", ["NextValueOp1"] = "0xFFFFFFFF", ["NextValueOp2"] = "(UIntPtr)0x20191113110219UL", ["ValidateResult"] = "uint expectedResult = (UIntPtr.Size == sizeof(ulong)) ? Crc32.Arm64.ComputeCrc32C(left, (ulong)right) : Crc32.ComputeCrc32C(left, (uint)right); isUnexpectedResult = (expectedResult != result);" }),
4244
]);
4345

4446
public static TestGroup Crc32_Arm64Inputs = new TestGroup(Isa:"Crc32.Arm64", LoadIsa:null,

0 commit comments

Comments
 (0)