Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libs] Skip AdvSimdEncode on Mono #96829

Merged
merged 6 commits into from
Jan 12, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public static unsafe OperationStatus EncodeToUtf8(ReadOnlySpan<byte> bytes, Span
goto DoneExit;
}

#if !MONO // https://github.com/dotnet/runtime/issues/93081
end = srcMax - 48;
if (AdvSimd.Arm64.IsSupported && (end >= src))
{
Expand All @@ -93,6 +94,7 @@ public static unsafe OperationStatus EncodeToUtf8(ReadOnlySpan<byte> bytes, Span
if (src == srcEnd)
goto DoneExit;
}
#endif

end = srcMax - 16;
if ((Ssse3.IsSupported || AdvSimd.Arm64.IsSupported) && BitConverter.IsLittleEndian && (end >= src))
Expand Down Expand Up @@ -489,6 +491,7 @@ private static unsafe void Avx2Encode(ref byte* srcBytes, ref byte* destBytes, b
destBytes = dest;
}

#if !MONO // https://github.com/dotnet/runtime/issues/93081
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[CompExactlyDependsOn(typeof(AdvSimd.Arm64))]
private static unsafe void AdvSimdEncode(ref byte* srcBytes, ref byte* destBytes, byte* srcEnd, int sourceLength, int destLength, byte* srcStart, byte* destStart)
Expand Down Expand Up @@ -546,6 +549,7 @@ private static unsafe void AdvSimdEncode(ref byte* srcBytes, ref byte* destBytes
srcBytes = src;
destBytes = dest;
}
#endif // !MONO

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[CompExactlyDependsOn(typeof(Ssse3))]
Expand Down
Loading