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
Open Zcmp in the explorerDependencies
Requires
Incompatible with
Required by
Instructions (6)
| Mnemonic | Name | Encoding | Match | Mask |
|---|---|---|---|---|
CM.MVA01S | Move two s0-s7 registers into a0-a1 | ----------------101011---11---10 | 0xac62 | 0xfc63 |
CM.MVSA01 | Move a0-a1 into two registers of s0-s7 | ----------------101011---01---10 | 0xac22 | 0xfc63 |
CM.POP | Destroy function call stack frame | ----------------10111010------10 | 0xba02 | 0xff03 |
CM.POPRET | Destroy function call stack frame and return to `ra` | ----------------10111110------10 | 0xbe02 | 0xff03 |
CM.POPRETZ | Destroy function call stack frame, move zero to `a0` and return to `ra` | ----------------10111100------10 | 0xbc02 | 0xff03 |
CM.PUSH | Create function call stack frame | ----------------10111000------10 | 0xb802 | 0xff03 |