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

CI test #99871

Closed
wants to merge 3 commits into from
Closed

CI test #99871

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 @@ -15,13 +15,6 @@ namespace System
{
internal static partial class SpanHelpers // .ByteMemOps
{
#if TARGET_ARM64 || TARGET_LOONGARCH64
private const ulong MemmoveNativeThreshold = ulong.MaxValue;
#elif TARGET_ARM
private const nuint MemmoveNativeThreshold = 512;
#else
private const nuint MemmoveNativeThreshold = 2048;
#endif
private const nuint ZeroMemoryNativeThreshold = 1024;


Expand Down Expand Up @@ -148,11 +141,6 @@ internal static unsafe void Memmove(ref byte dest, ref byte src, nuint len)
return;

MCPY05:
// PInvoke to the native version when the copy length exceeds the threshold.
if (len > MemmoveNativeThreshold)
{
goto PInvoke;
}

#if HAS_CUSTOM_BLOCKS
if (len >= 256)
Expand All @@ -172,7 +160,7 @@ internal static unsafe void Memmove(ref byte dest, ref byte src, nuint len)

// Copy 64-bytes at a time until the remainder is less than 64.
// If remainder is greater than 16 bytes, then jump to MCPY00. Otherwise, unconditionally copy the last 16 bytes and return.
Debug.Assert(len > 64 && len <= MemmoveNativeThreshold);
Debug.Assert(len > 64);
nuint n = len >> 6;

MCPY06:
Expand Down Expand Up @@ -237,7 +225,6 @@ internal static unsafe void Memmove(ref byte dest, ref byte src, nuint len)
return;
}

PInvoke:
// Implicit nullchecks
Debug.Assert(len > 0);
_ = Unsafe.ReadUnaligned<byte>(ref dest);
Expand Down
Loading