What happens if the related CFI feature is inactive for C.SSPOPCHK?
Zicfiss instructions degrade according to the official Zimop/Zcmop-compatible behavior and do not perform shadow-stack checks or updates.
C.SSPOPCHK reads the shadow return address at ssp and checks it against x1/x5.
C.SSPOPCHK x5 (Zicfiss, depends on Zcmop) expands to SSPOPCHK x5 for Zicfiss backward-edge CFI. It loads the shadow return address from ssp and compares it with x5, trapping on mismatch. Encoding reuses c.mop.5. Only effective when xSSE=1; otherwise executes as c.mop.5 (no-op).
C.SSPOPCHK belongs to the RISC-V CFI instruction set; behavior depends on whether Zicfilp/Zicfiss is enabled and on environment configuration.
Understand this scenario with real code like «c.sspopchk x5».
Understand this scenario with real code like «c.sspopchk x5».
Understand this scenario with real code like «c.sspopchk x5».
Zicfiss instructions degrade according to the official Zimop/Zcmop-compatible behavior and do not perform shadow-stack checks or updates.
The Control-Flow Integrity chapter of the RISC-V Unprivileged ISA defines LPAD, SSPUSH, SSPOPCHK, SSRDP, and SSAMOSWAP.