aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/lpad.h
blob: 733e91d6b30f832889401d5775f9c82f86f0bdf0 (plain)
1
2
3
4
5
6
if (ZICFILP_xLPE(STATE.v, STATE.prv) && STATE.elp == elp_t::LP_EXPECTED) {
  software_check(pc % 4 == 0 &&
                 ((READ_REG(7) & 0xFFFFF000ULL) == (static_cast<uint64_t>(insn.u_imm()) & 0xFFFFF000ULL) || insn.u_imm() == 0LL),
                 LANDING_PAD_FAULT);
  STATE.elp = elp_t::NO_LP_EXPECTED;
}