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 | |
| parent | c4b6d5c12e673f62864b8d878b1cde96fbdb0957 (diff) | |
| download | rockbox-aa32e55ce7b71c5b42c21494574d76e58b176cb6.zip rockbox-aa32e55ce7b71c5b42c21494574d76e58b176cb6.tar.gz rockbox-aa32e55ce7b71c5b42c21494574d76e58b176cb6.tar.bz2 rockbox-aa32e55ce7b71c5b42c21494574d76e58b176cb6.tar.xz | |
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
| -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 d1b5df5..505b167 100644 --- a/firmware/export/system.h +++ b/firmware/export/system.h @@ -205,7 +205,7 @@ int get_cpu_boost_counter(void); #define UNLIKELY(x) (x) #endif -/* returns index of first set bit + 1 or 0 if no bits are set */ +/* returns index of first set bit or 32 if no bits are set */ int find_first_set_bit(uint32_t val); static inline __attribute__((always_inline)) diff --git a/firmware/target/coldfire/ffs-coldfire.S b/firmware/target/coldfire/ffs-coldfire.S index 582970d..40a7297 100644 --- a/firmware/target/coldfire/ffs-coldfire.S +++ b/firmware/target/coldfire/ffs-coldfire.S @@ -57,7 +57,8 @@ find_first_set_bit: | now lookup in table indexed on top 6 bits of %d0 moveq.l #26, %d0 | %d0 = final shift count lsr.l %d0, %d1 | - clr.l %d0 | + + | the top 24 bits of d0 are 0 so just load the value over it move.b (%a0, %d1.l), %d0 | rts | |