diff options
Diffstat (limited to 'lib/libc/arch/amd64/string')
-rw-r--r-- | lib/libc/arch/amd64/string/memmove.S | 10 | ||||
-rw-r--r-- | lib/libc/arch/amd64/string/memset.S | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/lib/libc/arch/amd64/string/memmove.S b/lib/libc/arch/amd64/string/memmove.S index f0e01654c2f..da244c332a1 100644 --- a/lib/libc/arch/amd64/string/memmove.S +++ b/lib/libc/arch/amd64/string/memmove.S @@ -51,12 +51,14 @@ ENTRY(memmove) subq %rsi,%rax cmpq %rcx,%rax /* overlapping? */ jb 1f +#ifdef memcpy_in_asm jmp 2f /* nope */ -// ENTRY(memcpy) +ENTRY(memcpy) movq %rdi,%r11 /* save dest */ movq %rdx,%rcx 2: +#endif cld /* copy forwards. */ shrq $3,%rcx /* copy by words */ rep @@ -85,6 +87,8 @@ ENTRY(memmove) movq %r11,%rax cld ret -// END(memcpy) -END_STRONG(memmove) +#ifdef memcpy_in_asm +END_BUILTIN(memcpy) +#endif +END_BUILTIN(memmove) END_WEAK(bcopy) diff --git a/lib/libc/arch/amd64/string/memset.S b/lib/libc/arch/amd64/string/memset.S index b3f4ffa17bf..2a8645cb1c3 100644 --- a/lib/libc/arch/amd64/string/memset.S +++ b/lib/libc/arch/amd64/string/memset.S @@ -53,4 +53,4 @@ L1: rep movq %r11,%rax ret -END_STRONG(memset) +END_BUILTIN(memset) |