From: Luke Kenneth Casson Leighton Date: Tue, 13 Nov 2018 15:53:27 +0000 (+0000) Subject: csrrwi cut out extraneous get_csr X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=60183bf4b31396dd839b8f88f1fa0d1c8a28b6f4;p=riscv-isa-sim.git csrrwi cut out extraneous get_csr --- diff --git a/riscv/insns/csrrwi.h b/riscv/insns/csrrwi.h index 7e1c4f7..1fe1945 100644 --- a/riscv/insns/csrrwi.h +++ b/riscv/insns/csrrwi.h @@ -15,8 +15,7 @@ if (csr == CSR_USVVL || csr == CSR_USVMVL) old = p->get_csr(csr); } #else -reg_t old = p->get_csr(csr); -p->set_csr(csr, insn.insn_t::rs1()); +reg_t old = p->set_csr(csr, insn.insn_t::rs1()); #endif WRITE_RD(sext_xlen(sv_reg_t(old))); serialize();