summaryrefslogtreecommitdiff
path: root/libc/string/x86_64/memset.S
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-04-15 08:23:19 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-04-15 08:23:19 +0000
commit534dfb536f19737f2642ee56dd67a97c5db6a74e (patch)
treefaf1e08295d084cb44c8986fa179d306d6f0a377 /libc/string/x86_64/memset.S
parent07bbf922670cce83c0b54f28ad43473d044cae5e (diff)
amd64 string ops: replace some instructions by smaller ones,
e.g. testb $0xff, %cl -> testb %cl, %cl
Diffstat (limited to 'libc/string/x86_64/memset.S')
-rw-r--r--libc/string/x86_64/memset.S8
1 files changed, 4 insertions, 4 deletions
diff --git a/libc/string/x86_64/memset.S b/libc/string/x86_64/memset.S
index 0f054ade6..3092e81eb 100644
--- a/libc/string/x86_64/memset.S
+++ b/libc/string/x86_64/memset.S
@@ -53,15 +53,15 @@ ENTRY (memset)
imul %rax,%r8
#endif
test $0x7,%edi /* Check for alignment. */
- je 2f
+ jz 2f
.p2align 4
1: /* Align ptr to 8 byte. */
mov %sil,(%rcx)
dec %rdx
inc %rcx
- test $0x7,%ecx
- jne 1b
+ test $0x7,%cl
+ jnz 1b
2: /* Check for really large regions. */
mov %rdx,%rax
@@ -107,7 +107,7 @@ ENTRY (memset)
jne 8b
9:
#if BZERO_P
- nop /* huh?? */
+ /* nothing */
#else
/* Load result (only if used as memset). */
mov %rdi,%rax /* start address of destination is result */