What happens if the related CFI feature is inactive for LPAD?
LPAD executes as a no-op.
Zicfilp landing-pad instruction; validates indirect jump/call targets when forward-edge CFI is enabled.
RV32/RV64 Zicfilp (depends on Zicsr); syntax lpad label, with a 20-bit LPL from 0 through 1048575, not a PC-relative offset.
32-bit U-type: LPL=bits31:12, rd=00000, AUIPC opcode=0010111; there is no general-register destination operand.
Only xLPE=1 and ELP=LP_EXPECTED checks four-byte PC alignment and matching nonzero LPL against x7[31:12]; success clears ELP, otherwise software-check (cause=18, xtval=2).
With xLPE=0 or ELP=NO_LP_EXPECTED this is a no-op; trap entry separately saves old ELP to xPELP and clears ELP.
With Zicfilp enabled, JALR/C.JR/C.JALR requires a landing pad when rs1 is not x1, x5, or x7. With ELP=LP_EXPECTED, the next instruction must be a 4-byte-aligned LPAD; a nonzero 20-bit LPL must match x7[31:12], or a software-check exception occurs (cause=18, xtval=2). Success sets ELP=NO_LP_EXPECTED; LPAD is a no-op when disabled or no landing pad is expected.
Shows only specification-defined encodings, conditions, and architectural state; it does not model pipelines, cache coherence, or platform policy.
LPAD belongs to the RISC-V Zicfilp forward-edge CFI instructions; behavior depends on whether Zicfilp is enabled and on environment configuration.
Assume RV64 Zicfilp enabled, ELP=LP_EXPECTED and PC=0x2000; lpad 0 skips label matching and sets ELP=NO_LP_EXPECTED.
Assume RV64 Zicfilp enabled, ELP=LP_EXPECTED and PC=0x2000; lpad 0 skips label matching and sets ELP=NO_LP_EXPECTED.
Assume RV64 Zicfilp enabled, ELP=LP_EXPECTED and PC=0x2000; lpad 0 skips label matching and sets ELP=NO_LP_EXPECTED.
LPAD executes as a no-op.
JALR/C.JR/C.JALR with rs1=x1, x5, or x7 does not set ELP=LP_EXPECTED; the x7 form is a software guarded branch.