diff options
author | Scott Johnson <scott.johnson@arilinc.com> | 2021-09-28 21:58:18 -0700 |
---|---|---|
committer | Scott Johnson <scott.johnson@arilinc.com> | 2021-09-29 19:52:01 -0700 |
commit | 4245b20c36de0f44f173db47b45ae213023f36b1 (patch) | |
tree | 783c8dc3af50f665bc1741bfea19684e3cd3ada7 /riscv/decode.h | |
parent | 12b58975e3ff7ecee838c9590287c8fcfb563312 (diff) | |
download | spike-4245b20c36de0f44f173db47b45ae213023f36b1.zip spike-4245b20c36de0f44f173db47b45ae213023f36b1.tar.gz spike-4245b20c36de0f44f173db47b45ae213023f36b1.tar.bz2 |
Remove no-longer-needed csr_read_only check in validate_csr()
All CSR permissions checks now occur inside the
csr_t::verify_permissions() methods.
This reverts commit 62526773c0a30a41356fbfce1db0fb8a32771c30.
Diffstat (limited to 'riscv/decode.h')
-rw-r--r-- | riscv/decode.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/riscv/decode.h b/riscv/decode.h index 16b84da..7028c85 100644 --- a/riscv/decode.h +++ b/riscv/decode.h @@ -368,11 +368,7 @@ inline freg_t f128_negate(freg_t a) #define validate_csr(which, write) ({ \ if (!STATE.serialized) return PC_SERIALIZE_BEFORE; \ STATE.serialized = false; \ - /* disallow writes to read-only CSRs */ \ - unsigned csr_read_only = get_field((which), 0xC00) == 3; \ - if ((write) && csr_read_only) \ - throw trap_illegal_instruction(insn.bits()); \ - /* other permissions checks occur in get_csr */ \ + /* permissions check occurs in get_csr */ \ (which); }) /* For debug only. This will fail if the native machine's float types are not IEEE */ |