diff options
author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-03-25 22:57:13 +0000 |
---|---|---|
committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-03-25 22:57:13 +0000 |
commit | cfb20fdf2b445fc15b1374392abb21f948b4ba85 (patch) | |
tree | aacd236e4fa84ccd86e053b981c548978fd28b59 | |
parent | b84c06372b7763aa5937173307c45fb44ed4e703 (diff) | |
download | rockbox-cfb20fdf2b445fc15b1374392abb21f948b4ba85.tar.gz rockbox-cfb20fdf2b445fc15b1374392abb21f948b4ba85.zip |
Should be the last one...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20542 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/target/mips/ffs-mips.S | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/firmware/target/mips/ffs-mips.S b/firmware/target/mips/ffs-mips.S index fd937a4cae..a2a82a6a32 100644 --- a/firmware/target/mips/ffs-mips.S +++ b/firmware/target/mips/ffs-mips.S | |||
@@ -38,17 +38,22 @@ | |||
38 | .align 2 | 38 | .align 2 |
39 | .global find_first_set_bit | 39 | .global find_first_set_bit |
40 | .type find_first_set_bit, %function | 40 | .type find_first_set_bit, %function |
41 | .set noreorder | ||
42 | .set noat | ||
41 | 43 | ||
42 | find_first_set_bit: | 44 | find_first_set_bit: |
43 | beqz a0, l # if(a0 == 0) goto l | 45 | beqz a0, l # if(a0 == 0) goto l |
46 | nop # | ||
44 | negu t0, a0 # t0 = -a0 | 47 | negu t0, a0 # t0 = -a0 |
45 | and t0, a0, t0 # t0 = a0 & t0 | 48 | and t0, a0, t0 # t0 = a0 & t0 |
46 | clz v0, a0 # Get lead 0's count (v0=32 if all 0's) | 49 | clz v0, t0 # get lead 0's count |
47 | li t0, 31 # t0 = 31 | 50 | li t0, 31 # t0 = 31 |
48 | subu v0, t0, v0 # v0 = t0 - v0 | ||
49 | jr ra # | 51 | jr ra # |
50 | nop # | 52 | subu v0, t0, v0 # v0 = t0 - v0 |
53 | |||
51 | l: | 54 | l: |
52 | li v0, 32 # v0 = 32 (don't put this after jr ra! | 55 | jr ra # |
53 | jr ra # binutils bug?) | 56 | li v0, 32 # v0 = 32 |
54 | nop # | 57 | |
58 | .set reorder | ||
59 | .set at | ||