From: Andrew Waterman Date: Tue, 11 Feb 2014 03:02:28 +0000 (-0800) Subject: Revert to old AUIPC definition X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c50db79a8e549d7dd2112ff22d48be5e4b501fea;p=riscv-tests.git Revert to old AUIPC definition --- diff --git a/isa/Makefile b/isa/Makefile index 8cecab9..b876406 100644 --- a/isa/Makefile +++ b/isa/Makefile @@ -19,7 +19,7 @@ default: all #-------------------------------------------------------------------- RISCV_GCC = riscv-gcc -RISCV_GCC_OPTS = -nostdlib -nostartfiles -Wa,-march=RVIMAFDXhwacha +RISCV_GCC_OPTS = -fpic -nostdlib -nostartfiles -Wa,-march=RVIMAFDXhwacha RISCV_OBJDUMP = riscv-objdump --disassemble-all --section=.text --section=.data --section=.bss RISCV_SIM = spike --extension=hwacha diff --git a/isa/rv32ui/auipc.S b/isa/rv32ui/auipc.S index b5dbf88..cca7781 100644 --- a/isa/rv32ui/auipc.S +++ b/isa/rv32ui/auipc.S @@ -11,22 +11,18 @@ RVTEST_RV32U RVTEST_CODE_BEGIN - TEST_CASE(2, a0, 1<<12, \ + TEST_CASE(2, a0, 10000, \ .align 3; \ - auipc a0, 0x00001; \ + lla a0, 1f + 10000; \ jal a1, 1f; \ - 1: srl a1, a1, 12; \ - sll a1, a1, 12; \ - sub a0, a0, a1; \ + 1: sub a0, a0, a1; \ ) - TEST_CASE(3, a0, -1<<12, \ + TEST_CASE(3, a0, -10000, \ .align 3; \ - auipc a0, 0xfffff; \ + lla a0, 1f - 10000; \ jal a1, 1f; \ - 1: srl a1, a1, 12; \ - sll a1, a1, 12; \ - sub a0, a0, a1; \ + 1: sub a0, a0, a1; \ ) TEST_PASSFAIL diff --git a/isa/rv64ui/auipc.S b/isa/rv64ui/auipc.S index c2b5157..f5d28ec 100644 --- a/isa/rv64ui/auipc.S +++ b/isa/rv64ui/auipc.S @@ -11,22 +11,18 @@ RVTEST_RV64U RVTEST_CODE_BEGIN - TEST_CASE(2, a0, 1<<12, \ + TEST_CASE(2, a0, 10000, \ .align 3; \ - auipc a0, 0x00001; \ + lla a0, 1f + 10000; \ jal a1, 1f; \ - 1: srl a1, a1, 12; \ - sll a1, a1, 12; \ - sub a0, a0, a1; \ + 1: sub a0, a0, a1; \ ) - TEST_CASE(3, a0, -1<<12, \ + TEST_CASE(3, a0, -10000, \ .align 3; \ - auipc a0, 0xfffff; \ + lla a0, 1f - 10000; \ jal a1, 1f; \ - 1: srl a1, a1, 12; \ - sll a1, a1, 12; \ - sub a0, a0, a1; \ + 1: sub a0, a0, a1; \ ) TEST_PASSFAIL