RISC-V ISA Explorer · Compressed (Zc*)

Zcmp: Push/Pop & Reg Save/Restore

Ratified 2023-04 · version 1.0.0

Single instructions that push or pop a list of saved registers, collapsing prologues and epilogues.

Typical use: Stack push/pop, frame save

Specification

Open Zcmp in the explorer

Dependencies

Requires

Incompatible with

Required by

Instructions (6)

MnemonicNameEncodingMatchMask
CM.MVA01SMove two s0-s7 registers into a0-a1----------------101011---11---100xac620xfc63
CM.MVSA01Move a0-a1 into two registers of s0-s7----------------101011---01---100xac220xfc63
CM.POPDestroy function call stack frame----------------10111010------100xba020xff03
CM.POPRETDestroy function call stack frame and return to `ra`----------------10111110------100xbe020xff03
CM.POPRETZDestroy function call stack frame, move zero to `a0` and return to `ra`----------------10111100------100xbc020xff03
CM.PUSHCreate function call stack frame----------------10111000------100xb8020xff03