summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2003-03-12 06:46:16 +0000
committertjr <tjr@FreeBSD.org>2003-03-12 06:46:16 +0000
commit8c3565350b7fb1c5f37f5e1d21b979fc03f5f46e (patch)
tree35415990cb65a0b3a3844e5bd8cebce156aca402 /lib
parentb526ac59f7556902ccc7abbd6e00bcfb864cbb5f (diff)
downloadFreeBSD-src-8c3565350b7fb1c5f37f5e1d21b979fc03f5f46e.zip
FreeBSD-src-8c3565350b7fb1c5f37f5e1d21b979fc03f5f46e.tar.gz
MFp4: Reduce code size by 26 bytes by only aligning the jump targets that
are at the top of loops.
Diffstat (limited to 'lib')
-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 4163735..a4ef081 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
OpenPOWER on IntegriCloud