blob: 040d7ecb4af31f2cc305b75958b5deb036735f5a (
plain)
1
2
3
4
5
6
7
8
9
|
require_extension('C');
require(insn.rvc_rd() != 0);
if (insn.rvc_imm() == 0) { // c.jalr
reg_t tmp = npc;
set_pc(RVC_RS1 & ~reg_t(1));
WRITE_REG(X_RA, tmp);
} else {
WRITE_RD(insn.rvc_imm() << 12);
}
|