MFp4: Reduce code size by 26 bytes by only aligning the jump targets that
are at the top of loops.
This commit is contained in:
parent
07648c8bb8
commit
1609edca75
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=112132
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user