Fixed exception handling to handle ecalls properly

This commit is contained in:
Alexa Wright 2023-04-13 09:23:32 -07:00
parent 10be07857c
commit 23d0d45bf6

View File

@ -66,8 +66,7 @@ interrupt: # must be a timer interrupt
j trap_return # clean up and return
exception:
li t0, 2
csrr t1, mcause
csrr t0, mcause
li t1, 8 # is it an ecall trap?
andi t0, t0, 0xFC # if CAUSE = 8, 9, or 11
bne t0, t1, trap_return # ignore other exceptions