Skip to content

Commit dfec425

Browse files
ArcaneNibbledlech
authored andcommitted
pbio/platform/ev3/exceptionhandler.S: Fix bug in panic handler
The bic opcode was supposed to be used here in order to *clear* the mode bits, rather than keep them. This bug did not surface because we've mostly been hitting panics in System mode, which has a mode bits value of all 1s.
1 parent 18540a1 commit dfec425

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/pbio/platform/ev3/exceptionhandler.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ CommonPanicHandler:
6868
@ NOTE: Assumes we never use User mode
6969
and r0, #MASK_SR_MODE
7070
mrs r1, cpsr
71-
and r2, r1, #MASK_SR_MODE
71+
bic r2, r1, #MASK_SR_MODE
7272
orr r2, r0
7373
msr cpsr, r2
7474
mov r3, r13

0 commit comments

Comments
 (0)