aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/c_jalr.h
blob: 694f183b9a35acf98f5fe48eedca8d01627e55e0 (plain)
1
2
3
4
5
6
7
8
9
10
require_extension(EXT_ZCA);
require(insn.rvc_rs1() != 0);
reg_t tmp = npc;
set_pc(RVC_RS1 & ~reg_t(1));
WRITE_REG(X_RA, tmp);

if (ZICFILP_xLPE(STATE.v, STATE.prv)) {
  STATE.elp = ZICFILP_IS_LP_EXPECTED(insn.rvc_rs1());
  serialize();
}