diff options
| author | Alan Cox <alc@FreeBSD.org> | 2005-04-08 05:10:18 +0000 |
|---|---|---|
| committer | Alan Cox <alc@FreeBSD.org> | 2005-04-08 05:10:18 +0000 |
| commit | b5c9ad687a57aeaccc84116cc52632fa692e56bf (patch) | |
| tree | 0eae32a04677340b621d1a4550f4b618ac3ca337 /lib/libc | |
| parent | afa7e54ab74773ddb8e9922a72709b49183acd24 (diff) | |
Notes
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/amd64/string/bcopy.S | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/libc/amd64/string/bcopy.S b/lib/libc/amd64/string/bcopy.S index 8289e968bab8..d58f5918ee59 100644 --- a/lib/libc/amd64/string/bcopy.S +++ b/lib/libc/amd64/string/bcopy.S @@ -51,14 +51,14 @@ ENTRY(bcopy) #endif #endif #if defined(MEMCOPY) || defined(MEMMOVE) - movq %rdi,%r11 /* save dest */ + movq %rdi,%rax /* return dst */ #else xchgq %rdi,%rsi #endif movq %rdx,%rcx - movq %rdi,%rax - subq %rsi,%rax - cmpq %rcx,%rax /* overlapping? */ + movq %rdi,%r8 + subq %rsi,%r8 + cmpq %rcx,%r8 /* overlapping? */ jb 1f cld /* nope, copy forwards. */ shrq $3,%rcx /* copy by words */ @@ -68,9 +68,6 @@ ENTRY(bcopy) andq $7,%rcx /* any bytes left? */ rep movsb -#if defined(MEMCOPY) || defined(MEMMOVE) - movq %r11,%rax -#endif ret 1: addq %rcx,%rdi /* copy backwards. */ @@ -87,8 +84,5 @@ ENTRY(bcopy) subq $7,%rdi rep movsq -#if defined(MEMCOPY) || defined(MEMMOVE) - movq %r11,%rax -#endif cld ret |
