Skip to content

Commit 2e8f7dd

Browse files
committed
some minor fixes
1 parent 1975928 commit 2e8f7dd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/UTF8.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1405,7 +1405,7 @@ private unsafe static (int utfadjust, int scalaradjust) calculateErrorPathadjust
14051405
if (processedLength + localasciirun + 16 <= inputLength)
14061406
{
14071407
Vector128<byte> block = AdvSimd.LoadVector128(pInputBuffer + processedLength + localasciirun);
1408-
if (AdvSimd.Arm64.MaxAcross(Vector128.AsUInt32(AdvSimd.And(block, v80))).ToScalar() == 0)
1408+
if ((block & v80) == Vector128<byte>.Zero)
14091409
{
14101410
localasciirun += 16;
14111411
for (; processedLength + localasciirun + 64 <= inputLength; localasciirun += 64)

test/UTF8ValidationTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ private static bool IsSystemSupported(TestSystemRequirements requiredSystems)
5252
case Architecture.Arm64:
5353
return requiredSystems.HasFlag(TestSystemRequirements.Arm64);
5454
case Architecture.X64:
55-
return (requiredSystems.HasFlag(TestSystemRequirements.X64Avx512) && Vector512.IsHardwareAccelerated && System.Runtime.Intrinsics.X86.Avx512F.IsSupported) ||
55+
return (requiredSystems.HasFlag(TestSystemRequirements.X64Avx512) && Vector512.IsHardwareAccelerated && System.Runtime.Intrinsics.X86.Avx512Vbmi.IsSupported) ||
5656
(requiredSystems.HasFlag(TestSystemRequirements.X64Avx2) && System.Runtime.Intrinsics.X86.Avx2.IsSupported) ||
57-
(requiredSystems.HasFlag(TestSystemRequirements.X64Sse) && System.Runtime.Intrinsics.X86.Sse.IsSupported);
57+
(requiredSystems.HasFlag(TestSystemRequirements.X64Sse) && System.Runtime.Intrinsics.X86.Ssse3.IsSupported);
5858
default:
5959
return false; // If architecture is not covered above, the test is not supported.
6060
}

0 commit comments

Comments
 (0)