C.SWSP

Compressed Store Word to Stack Pointer

C.SWSP rs2, offset(x2)

Stores a word to the stack pointer (x2).

Details

Stores the low 32 bits of rs2 to a stack-pointer-relative address.

Pseudocode Operation

M[R[2] + offset][31:0] = R[rs2];

Example

C.SWSP x10, 8(x2)

Encoding

Binary Layout
110
15:13
imm
rs2
12:8
10
7:6
 
Format CSS
Opcode 02
Extension C

Operands

  • rs2
    Source
  • offset
    Offset