From 873dd7becce840fec815b12d43759924bf4ada4c Mon Sep 17 00:00:00 2001 From: Rafaël Carré Date: Tue, 25 May 2010 16:20:04 +0000 Subject: 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 --- firmware/target/arm/as3525/system-as3525.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'firmware/target/arm/as3525') 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); -- cgit v1.2.3