aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/csrrsi.h
blob: b673725b54d1cbc8eb0a4e27e4af7d6563eb45b6 (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 | insn.rs1());
}
WRITE_RD(sext_xlen(old));
serialize();