From ccc285d2f196a717bb639ef1a9a0a005d7527975 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Sat, 21 Sep 2013 06:31:53 -0700 Subject: New AUIPC semantics --- isa/rv64ui/auipc.S | 18 ++++++++++++------ 1 file 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 -- cgit v1.1