aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim J. Robbins <tjr@FreeBSD.org>2003-03-12 06:46:16 +0000
committerTim J. Robbins <tjr@FreeBSD.org>2003-03-12 06:46:16 +0000
commit1609edca75bced597fdb4da9fb5a2817a72385db (patch)
tree35415990cb65a0b3a3844e5bd8cebce156aca402
parent07648c8bb83d821bd604f4b04479792b3ce31c46 (diff)
downloadsrc-1609edca75bced597fdb4da9fb5a2817a72385db.tar.gz
src-1609edca75bced597fdb4da9fb5a2817a72385db.zip
MFp4: Reduce code size by 26 bytes by only aligning the jump targets that
are at the top of loops.
Notes
Notes: svn path=/head/; revision=112132
-rw-r--r--lib/libc/i386/string/wmemchr.S11
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/libc/i386/string/wmemchr.S b/lib/libc/i386/string/wmemchr.S
index 4163735fc766..a4ef08191156 100644
--- a/lib/libc/i386/string/wmemchr.S
+++ b/lib/libc/i386/string/wmemchr.S
@@ -68,46 +68,37 @@ bigloop:cmpl %eax,(%edi)
decl %ecx
jnz bigloop
jmp small
-.p2align 2,0x90
found: movl %edi,%eax
popl %ebx
popl %edi
ret
-.p2align 2,0x90
found4: leal 4(%edi),%edi
jmp found
-.p2align 2,0x90
found8: leal 8(%edi),%edi
jmp found
-.p2align 2,0x90
found12:leal 12(%edi),%edi
jmp found
-.p2align 2,0x90
found16:leal 16(%edi),%edi
jmp found
-.p2align 2,0x90
found20:leal 20(%edi),%edi
jmp found
-.p2align 2,0x90
found24:leal 24(%edi),%edi
jmp found
-.p2align 2,0x90
found28:leal 28(%edi),%edi
jmp found
/*
* Search remaining part of string.
*/
-.p2align 2,0x90
small: movl %ebx,%ecx
andl $7,%ecx
jz no
+.p2align 2,0x90
smltop: cmpl %eax,(%edi)
je found
leal 4(%edi),%edi
decl %ecx
jnz smltop
-.p2align 2,0x90
no: xorl %eax,%eax
popl %ebx
popl %edi