Skip to content

Commit

Permalink
qemu/mcu/rv32: Fix test of mcause value in lookup_cause.
Browse files Browse the repository at this point in the history
Signed-off-by: Plaque FCC <plaque-fcc@github>
  • Loading branch information
Plaque FCC authored and dpgeorge committed Oct 22, 2024
1 parent 8fef67b commit 324871f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ports/qemu/mcu/rv32/interrupts.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ const char *lookup_cause(uint32_t mcause) {
case 11:
return exception_causes[6];
default:
return (mcause >= 16) ?
return ((mcause & 0x7FFFFFFF) >= 16) ?
exception_causes[7] :
exception_causes[0];
}
Expand Down

0 comments on commit 324871f

Please sign in to comment.