diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2010-05-25 16:20:04 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-05-25 16:20:04 +0000 |
commit | 873dd7becce840fec815b12d43759924bf4ada4c (patch) | |
tree | a4e9c251f4dcf54fd49245aba13c2dfd5a9b494e /firmware/target/arm | |
parent | 02068ed6cd647a1560da0bb429397342c0cdeb31 (diff) |
as3525: find_first_set_bit() isn't built in bootloaders
We assume only one bit is set and use clz to find the most significant
set bit, if there's more than one bit set we'll see it in the panic msg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26285 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm')
-rw-r--r-- | firmware/target/arm/as3525/system-as3525.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c index f215300f75..8a04507385 100644 --- a/firmware/target/arm/as3525/system-as3525.c +++ b/firmware/target/arm/as3525/system-as3525.c @@ -98,7 +98,7 @@ static void UIRQ(void) if(status == 0) panicf("Unhandled IRQ (source unknown!)"); - unsigned irq_no = find_first_set_bit(status); + unsigned irq_no = 31 - __builtin_clz(status); panicf("Unhandled %smasked IRQ %02X: %s (status 0x%8X)", masked ? "" : "no", irq_no, irqname[irq_no], status); |