What happens if the related CFI feature is inactive for C.SSPOPCHK?
Assuming Zcmop is present, xSSE=0 retains the corresponding C.MOP behavior: no shadow-stack access, ssp update, or register write.
With xSSE=1, C.SSPOPCHK reads XLEN bits from the shadow stack and compares them with fixed x5.
C.SSPOPCHK x5 (Zicfiss with Zcmop) expands to SSPOPCHK x5 for Zicfiss backward-edge CFI. It reads an XLEN-wide return address from ssp and compares it with fixed x5; a mismatch raises a software-check exception (cause 18, xtval shadow stack fault code 3). It reuses C.MOP.5. Only xSSE=1 performs the shadow-stack operation; otherwise it retains C.MOP.5 behavior, which writes no register.
Shows only official encodings, conditions, and architectural results; it does not imply a microarchitecture.
This compressed encoding has no variable explicit register: C.SSPUSH fixes x1; C.SSPOPCHK fixes x5.
Assumes Zicfiss, Zcmop and their dependencies. xSSE is the effective enable for the current privilege mode. Only aligned ssp is modeled; RV64 assumes UXLEN/SXLEN are always 64.
C.SSPOPCHK is the fixed-x5 Zicfiss shadow-stack check; only xSSE=1 reads, compares, and may update ssp.
Understand this scenario with real code like «c.sspopchk x5».
Understand this scenario with real code like «c.sspopchk x5».
Assuming Zcmop is present, xSSE=0 retains the corresponding C.MOP behavior: no shadow-stack access, ssp update, or register write.
With xSSE=1, mem[ssp] is compared bitwise with x5. Only a successful, matching load increments ssp by XLEN/8; mismatch raises a software-check exception with cause=18 and xtval=3.