aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/csrrs.h
blob: 7632d1f40c9b996f9899e6c80c9bf663561a20e3 (plain)
1
2
3
4
5
6
7
8
bool write = insn.rs1() != 0;
int csr = validate_csr(insn.csr(), write);
reg_t old = p->get_csr(csr, insn, write);
if (write) {
  p->put_csr(csr, old | RS1);
}
WRITE_RD(sext_xlen(old));
serialize();