diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2013-09-21 06:31:53 -0700 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2013-09-21 06:31:53 -0700 |
commit | ccc285d2f196a717bb639ef1a9a0a005d7527975 (patch) | |
tree | 6576593032653358d0caf707396fe6400363e84d | |
parent | 324c290f32f9c6e8953f14529d1e86659b2a2239 (diff) | |
download | riscv-tests-ccc285d2f196a717bb639ef1a9a0a005d7527975.zip riscv-tests-ccc285d2f196a717bb639ef1a9a0a005d7527975.tar.gz riscv-tests-ccc285d2f196a717bb639ef1a9a0a005d7527975.tar.bz2 |
New AUIPC semantics
-rw-r--r-- | isa/rv64ui/auipc.S | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/isa/rv64ui/auipc.S b/isa/rv64ui/auipc.S index 9b291b5..c2b5157 100644 --- a/isa/rv64ui/auipc.S +++ b/isa/rv64ui/auipc.S @@ -11,16 +11,22 @@ RVTEST_RV64U RVTEST_CODE_BEGIN - TEST_CASE(2, a0, -4096+8, \ + TEST_CASE(2, a0, 1<<12, \ + .align 3; \ auipc a0, 0x00001; \ - jal 1f; \ - 1: sub a0, ra, a0; \ + jal a1, 1f; \ + 1: srl a1, a1, 12; \ + sll a1, a1, 12; \ + sub a0, a0, a1; \ ) - TEST_CASE(3, a0, 4096+8, \ + TEST_CASE(3, a0, -1<<12, \ + .align 3; \ auipc a0, 0xfffff; \ - jal 1f; \ - 1: sub a0, ra, a0; \ + jal a1, 1f; \ + 1: srl a1, a1, 12; \ + sll a1, a1, 12; \ + sub a0, a0, a1; \ ) TEST_PASSFAIL |