diff options
author | Nils Wallménius <nils@rockbox.org> | 2009-12-16 16:39:24 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2009-12-16 16:39:24 +0000 |
commit | aa32e55ce7b71c5b42c21494574d76e58b176cb6 (patch) | |
tree | 8c2b4faf9d2262ef3f04af233c796894de665c97 /firmware | |
parent | c4b6d5c12e673f62864b8d878b1cde96fbdb0957 (diff) | |
download | rockbox-aa32e55ce7b71c5b42c21494574d76e58b176cb6.tar.gz rockbox-aa32e55ce7b71c5b42c21494574d76e58b176cb6.zip |
Remove unneeded instruction from the coldfire ffs function and fix a wrong comment
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24030 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/export/system.h | 2 | ||||
-rw-r--r-- | firmware/target/coldfire/ffs-coldfire.S | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/firmware/export/system.h b/firmware/export/system.h index d1b5df546b..505b167af9 100644 --- a/firmware/export/system.h +++ b/firmware/export/system.h | |||
@@ -205,7 +205,7 @@ int get_cpu_boost_counter(void); | |||
205 | #define UNLIKELY(x) (x) | 205 | #define UNLIKELY(x) (x) |
206 | #endif | 206 | #endif |
207 | 207 | ||
208 | /* returns index of first set bit + 1 or 0 if no bits are set */ | 208 | /* returns index of first set bit or 32 if no bits are set */ |
209 | int find_first_set_bit(uint32_t val); | 209 | int find_first_set_bit(uint32_t val); |
210 | 210 | ||
211 | static inline __attribute__((always_inline)) | 211 | static inline __attribute__((always_inline)) |
diff --git a/firmware/target/coldfire/ffs-coldfire.S b/firmware/target/coldfire/ffs-coldfire.S index 582970d5d6..40a7297802 100644 --- a/firmware/target/coldfire/ffs-coldfire.S +++ b/firmware/target/coldfire/ffs-coldfire.S | |||
@@ -57,7 +57,8 @@ find_first_set_bit: | |||
57 | | now lookup in table indexed on top 6 bits of %d0 | 57 | | now lookup in table indexed on top 6 bits of %d0 |
58 | moveq.l #26, %d0 | %d0 = final shift count | 58 | moveq.l #26, %d0 | %d0 = final shift count |
59 | lsr.l %d0, %d1 | | 59 | lsr.l %d0, %d1 | |
60 | clr.l %d0 | | 60 | |
61 | | the top 24 bits of d0 are 0 so just load the value over it | ||
61 | move.b (%a0, %d1.l), %d0 | | 62 | move.b (%a0, %d1.l), %d0 | |
62 | rts | | 63 | rts | |
63 | 64 | ||