aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/csrrci.h
blob: 4d83cc0617edd871ebb9ad823d86a4663c310ce9 (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);
if (write) {
  p->set_csr(csr, old & ~(reg_t)insn.rs1());
}
WRITE_RD(sext_xlen(old));
serialize();