cm.push

Creates a stack frame: store `ra` and 0 to 12 saved registers to the stack frame, optionally allocate additional stack space. This instruction pushes (stores) the registers in `reg_list` to the memory below the stack pointer, and then creates the stack frame by decrementing the stack pointer by `stack_adj`. Restrictions on stack_adj: * it must be enough to store all of the listed registers * it must be a multiple of 16 (bytes): ** for RV32 the allowed values are: 16, 32, 48, 64, 80, 96, 112 ** for RV64 the allowed values are: 16, 32, 48, 64, 80, 96, 112, 128, 144, 160

Synopsis

cm.push reg_list, -stack_adj

Encoding

Type:

01234781510spimmrlist10111000
funct7: 1011100

RISC-V Instruction Encoder/Decoder

open cm.push in rvcodecjs

Availability