diff options
author | Andreas Jaeger <aj@suse.de> | 2002-11-12 17:57:51 +0000 |
---|---|---|
committer | Andreas Jaeger <aj@suse.de> | 2002-11-12 17:57:51 +0000 |
commit | 7288b24f0cbe324caf66e6b9e85b0f17042e2e8b (patch) | |
tree | 0b8be24ed9971cdaecb55df8358cc2962c9b18d0 /sysdeps/x86_64/strcat.S | |
parent | 7ceef50ec9075b546eb84654bd0d1f42d0fe26d1 (diff) | |
download | glibc-7288b24f0cbe324caf66e6b9e85b0f17042e2e8b.tar glibc-7288b24f0cbe324caf66e6b9e85b0f17042e2e8b.tar.gz glibc-7288b24f0cbe324caf66e6b9e85b0f17042e2e8b.tar.bz2 glibc-7288b24f0cbe324caf66e6b9e85b0f17042e2e8b.zip |
Fix algorithm to align source pointer correctly.
Diffstat (limited to 'sysdeps/x86_64/strcat.S')
-rw-r--r-- | sysdeps/x86_64/strcat.S | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/x86_64/strcat.S b/sysdeps/x86_64/strcat.S index 549fd21b4a..e406e34b36 100644 --- a/sysdeps/x86_64/strcat.S +++ b/sysdeps/x86_64/strcat.S @@ -141,11 +141,13 @@ ENTRY (BP_SYM (strcat)) 2: /* Second step: Copy source to destination. */ - movq %rax, %rcx /* duplicate */ + movq %rsi, %rcx /* duplicate */ andl $7,%ecx /* mask alignment bits */ movq %rax, %rdx /* move around */ jz 22f /* aligned => start loop */ + neg %ecx /* align to 8 bytes. */ + addl $8, %ecx /* Align the source pointer. */ 21: movb (%rsi), %al /* Fetch a byte */ |