1 # See LICENSE for license details.
3 #*****************************************************************************
5 #-----------------------------------------------------------------------------
7 # Test access-exception behavior.
10 #include "riscv_test.h"
11 #include "test_macros.h"
18 # Flipping just the MSB should result in an illegal address for RV64.
20 li t0, 1 << (__riscv_xlen - 1)
23 # jalr to an illegal address should commit (hence should write rd).
24 # after the pc is set to rs1, an access exception should be raised.
26 li t1, CAUSE_FETCH_ACCESS
32 # A load to an illegal address should not commit.
34 li t1, CAUSE_LOAD_ACCESS