forked from len0rd/rockbox
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
This commit is contained in:
parent
02068ed6cd
commit
873dd7becc
1 changed files with 1 additions and 1 deletions
|
@ -98,7 +98,7 @@ static void UIRQ(void)
|
||||||
if(status == 0)
|
if(status == 0)
|
||||||
panicf("Unhandled IRQ (source unknown!)");
|
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)",
|
panicf("Unhandled %smasked IRQ %02X: %s (status 0x%8X)",
|
||||||
masked ? "" : "no", irq_no, irqname[irq_no], status);
|
masked ? "" : "no", irq_no, irqname[irq_no], status);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue