1 # See LICENSE for license details.
3 #*****************************************************************************
5 #-----------------------------------------------------------------------------
7 # Test misaligned fetch trap.
10 #include "riscv_test.h"
11 #include "test_macros.h"
17 #define sscratch mscratch
18 #define sstatus mstatus
21 #define stvec_handler mtvec_handler
33 // This test should pass, since JALR ignores the target LSB
56 # tests 2 and 4 should trap
64 # verify that return address was not written
68 li a1, CAUSE_MISALIGNED_FETCH
72 # verify that epc == &jalr (== t0 - 4)