diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/target/arm/ffs-arm.S | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/firmware/target/arm/ffs-arm.S b/firmware/target/arm/ffs-arm.S index 30c62a4806..4e912c5317 100644 --- a/firmware/target/arm/ffs-arm.S +++ b/firmware/target/arm/ffs-arm.S | |||
@@ -52,13 +52,12 @@ find_first_set_bit: | |||
52 | @ | 52 | @ |
53 | @ Output modified to suit Rockbox purposes. | 53 | @ Output modified to suit Rockbox purposes. |
54 | 54 | ||
55 | adr r2, L_ffs_table | ||
56 | orrne r1, r1, r1, lsl #4 @ r1 = X * 0x11 | 55 | orrne r1, r1, r1, lsl #4 @ r1 = X * 0x11 |
57 | orrne r1, r1, r1, lsl #6 @ r1 = X * 0x451 | 56 | orrne r1, r1, r1, lsl #6 @ r1 = X * 0x451 |
58 | rsbne r1, r1, r1, lsl #16 @ r1 = X * 0x0450fbaf | 57 | rsbne r1, r1, r1, lsl #16 @ r1 = X * 0x0450fbaf |
59 | 58 | ||
60 | @ now lookup in table indexed on top 6 bits of r1 | 59 | @ now lookup in table indexed on top 6 bits of r1 |
61 | ldrb r0, [ r2, r1, lsr #26 ] @ | 60 | ldrb r0, [ pc, r1, lsr #26 ] @ exploit location of table |
62 | bx lr @ | 61 | bx lr @ |
63 | 62 | ||
64 | L_ffs_table: | 63 | L_ffs_table: |