mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Don't use movs in memcpy as it causes performance loss.
This commit is contained in:
parent
d04592acf0
commit
6a44dcae04
1 changed files with 2 additions and 0 deletions
|
@ -91,6 +91,7 @@ extern "C" void* memcpy(void* restrict dstptr, const void* restrict srcptr,
|
|||
}
|
||||
|
||||
size_t numcopies = length / sizeof(unsigned long);
|
||||
#if 0
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
unsigned long zeroed_numcopies;
|
||||
#if defined(__x86_64__)
|
||||
|
@ -102,6 +103,7 @@ extern "C" void* memcpy(void* restrict dstptr, const void* restrict srcptr,
|
|||
: "c"(numcopies), "S"(srcul), "D"(dstul)
|
||||
: "memory");
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
for ( size_t i = 0; i < numcopies; i++ )
|
||||
*dstul++ = *srcul++;
|
||||
|
|
Loading…
Add table
Reference in a new issue