From 60183bf4b31396dd839b8f88f1fa0d1c8a28b6f4 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Tue, 13 Nov 2018 15:53:27 +0000 Subject: [PATCH] csrrwi cut out extraneous get_csr --- riscv/insns/csrrwi.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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(); -- 2.30.2