Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/UTF8.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1405,7 +1405,7 @@ private unsafe static (int utfadjust, int scalaradjust) calculateErrorPathadjust
if (processedLength + localasciirun + 16 <= inputLength)
{
Vector128<byte> block = AdvSimd.LoadVector128(pInputBuffer + processedLength + localasciirun);
if (AdvSimd.Arm64.MaxAcross(Vector128.AsUInt32(AdvSimd.And(block, v80))).ToScalar() == 0)
if ((block & v80) == Vector128<byte>.Zero)
{
localasciirun += 16;
for (; processedLength + localasciirun + 64 <= inputLength; localasciirun += 64)
Expand Down
4 changes: 2 additions & 2 deletions test/UTF8ValidationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ private static bool IsSystemSupported(TestSystemRequirements requiredSystems)
case Architecture.Arm64:
return requiredSystems.HasFlag(TestSystemRequirements.Arm64);
case Architecture.X64:
return (requiredSystems.HasFlag(TestSystemRequirements.X64Avx512) && Vector512.IsHardwareAccelerated && System.Runtime.Intrinsics.X86.Avx512F.IsSupported) ||
return (requiredSystems.HasFlag(TestSystemRequirements.X64Avx512) && Vector512.IsHardwareAccelerated && System.Runtime.Intrinsics.X86.Avx512Vbmi.IsSupported) ||
(requiredSystems.HasFlag(TestSystemRequirements.X64Avx2) && System.Runtime.Intrinsics.X86.Avx2.IsSupported) ||
(requiredSystems.HasFlag(TestSystemRequirements.X64Sse) && System.Runtime.Intrinsics.X86.Sse.IsSupported);
(requiredSystems.HasFlag(TestSystemRequirements.X64Sse) && System.Runtime.Intrinsics.X86.Ssse3.IsSupported);
default:
return false; // If architecture is not covered above, the test is not supported.
}
Expand Down