Imported Upstream version 6.0.0.172

Former-commit-id: f3cc9b82f3e5bd8f0fd3ebc098f789556b44e9cd
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-04-12 14:10:50 +00:00
parent 8016999e4d
commit 64ac736ec5
32155 changed files with 3981439 additions and 75368 deletions

View File

@ -242,25 +242,6 @@ namespace System
return countA - countB;
}
internal static unsafe void CharCopy (char *dest, char *src, int count) {
// Same rules as for memcpy, but with the premise that
// chars can only be aligned to even addresses if their
// enclosing types are correctly aligned
if ((((int)(byte*)dest | (int)(byte*)src) & 3) != 0) {
if (((int)(byte*)dest & 2) != 0 && ((int)(byte*)src & 2) != 0 && count > 0) {
((short*)dest) [0] = ((short*)src) [0];
dest++;
src++;
count--;
}
if ((((int)(byte*)dest | (int)(byte*)src) & 2) != 0) {
Buffer.memcpy2 ((byte*)dest, (byte*)src, count * 2);
return;
}
}
Buffer.memcpy4 ((byte*)dest, (byte*)src, count * 2);
}
#region Runtime method-to-ir dependencies
/* helpers used by the runtime as well as above or eslewhere in corlib */
@ -453,4 +434,4 @@ namespace System
return hash1 + (hash2 * 1566083941);
}
}
}
}