Browse Source
The alternative would be to #undef set_csr after including encoding.h, but this solution strikes me as cleaner. Part of the reason is that set_csr was not a great name: it sounds like it implements the CSRRS (read & set) instruction, rather than impelementing a simple write.pull/966/head
9 changed files with 11 additions and 11 deletions
@ -1,5 +1,5 @@ |
|||
int csr = validate_csr(insn.csr(), true); |
|||
reg_t old = p->get_csr(csr, insn, true); |
|||
p->set_csr(csr, RS1); |
|||
p->put_csr(csr, RS1); |
|||
WRITE_RD(sext_xlen(old)); |
|||
serialize(); |
|||
|
|||
@ -1,5 +1,5 @@ |
|||
int csr = validate_csr(insn.csr(), true); |
|||
reg_t old = p->get_csr(csr, insn, true); |
|||
p->set_csr(csr, insn.rs1()); |
|||
p->put_csr(csr, insn.rs1()); |
|||
WRITE_RD(sext_xlen(old)); |
|||
serialize(); |
|||
|
|||
Loading…
Reference in new issue