forked from Github_Repos/cvw
Fixed exception handling to handle ecalls properly
This commit is contained in:
parent
f54868f19d
commit
f8a8c43307
@ -66,8 +66,7 @@ interrupt: # must be a timer interrupt
|
|||||||
j trap_return # clean up and return
|
j trap_return # clean up and return
|
||||||
|
|
||||||
exception:
|
exception:
|
||||||
li t0, 2
|
csrr t0, mcause
|
||||||
csrr t1, mcause
|
|
||||||
li t1, 8 # is it an ecall trap?
|
li t1, 8 # is it an ecall trap?
|
||||||
andi t0, t0, 0xFC # if CAUSE = 8, 9, or 11
|
andi t0, t0, 0xFC # if CAUSE = 8, 9, or 11
|
||||||
bne t0, t1, trap_return # ignore other exceptions
|
bne t0, t1, trap_return # ignore other exceptions
|
||||||
|
Loading…
Reference in New Issue
Block a user