aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/csrrc.h
blob: 019a9ce4eb7f87a5cbd17cf1c05c3e54c2fb21a1 (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();