aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/c_lui.h
blob: cb76c61a52020b03e572b9c3fec9ffc9d94542f3 (plain)
1
2
3
4
5
6
require_extension('C');
if (insn.rvc_rd() == 0) { // c.addi16sp
  WRITE_REG(X_SP, sext_xlen(RVC_SP + insn.rvc_addi16sp_imm()));
} else {
  WRITE_RD(insn.rvc_imm() << 12);
}