From: Andrew Waterman Date: Fri, 5 May 2017 23:28:06 +0000 (-0700) Subject: Check UXL in sstatus X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bb8f7775294e612a8ba91d65d5097b19cb00394a;p=riscv-tests.git Check UXL in sstatus --- diff --git a/env b/env index 70f5e06..d7b2fdc 160000 --- a/env +++ b/env @@ -1 +1 @@ -Subproject commit 70f5e06eef154a1eaeb65d3f034c1857771100ff +Subproject commit d7b2fdc9ed30163ac7e4f5cfc502710e862a112e diff --git a/isa/rv64si/csr.S b/isa/rv64si/csr.S index 13dbf26..0576678 100644 --- a/isa/rv64si/csr.S +++ b/isa/rv64si/csr.S @@ -24,6 +24,11 @@ RVTEST_CODE_BEGIN #define SSTATUS_SPP MSTATUS_MPP #endif + # For RV64, make sure UXL encodes RV64. (UXL does not exist for RV32.) +#if __riscv_xlen == 64 + TEST_CASE(13, a0, SSTATUS_UXL & (SSTATUS_UXL << 1), csrr a0, sstatus; li a1, SSTATUS_UXL; and a0, a0, a1) +#endif + csrwi sscratch, 3 TEST_CASE( 2, a0, 3, csrr a0, sscratch); TEST_CASE( 3, a1, 3, csrrci a1, sscratch, 1);