From f8a8c433076f941df0b39ffae80ab980e88f3aba Mon Sep 17 00:00:00 2001 From: Alexa Wright Date: Thu, 13 Apr 2023 09:23:32 -0700 Subject: [PATCH] Fixed exception handling to handle ecalls properly --- tests/coverage/WALLY-init-lib.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/coverage/WALLY-init-lib.h b/tests/coverage/WALLY-init-lib.h index 1dd43acc..6b6dd6dd 100644 --- a/tests/coverage/WALLY-init-lib.h +++ b/tests/coverage/WALLY-init-lib.h @@ -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