1
0
Fork 0
forked from len0rd/rockbox

ARM <= v5: Tiny optimisation exploiting the location of the table.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24116 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2009-12-26 13:22:51 +00:00
parent 60012e195f
commit 099ab1f731

View file

@ -52,13 +52,12 @@ find_first_set_bit:
@
@ Output modified to suit Rockbox purposes.
adr r2, L_ffs_table
orrne r1, r1, r1, lsl #4 @ r1 = X * 0x11
orrne r1, r1, r1, lsl #6 @ r1 = X * 0x451
rsbne r1, r1, r1, lsl #16 @ r1 = X * 0x0450fbaf
@ now lookup in table indexed on top 6 bits of r1
ldrb r0, [ r2, r1, lsr #26 ] @
ldrb r0, [ pc, r1, lsr #26 ] @ exploit location of table
bx lr @
L_ffs_table: