Skip to content

Commit 324871f

Browse files
Plaque FCCdpgeorge
Plaque FCC
authored andcommitted
qemu/mcu/rv32: Fix test of mcause value in lookup_cause.
Signed-off-by: Plaque FCC <plaque-fcc@github>
1 parent 8fef67b commit 324871f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ports/qemu/mcu/rv32/interrupts.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ const char *lookup_cause(uint32_t mcause) {
144144
case 11:
145145
return exception_causes[6];
146146
default:
147-
return (mcause >= 16) ?
147+
return ((mcause & 0x7FFFFFFF) >= 16) ?
148148
exception_causes[7] :
149149
exception_causes[0];
150150
}

0 commit comments

Comments
 (0)