C.SWSP
Compressed Store Word to Stack Pointer
C.SWSP rs2, offset(x2)
Stores a word to the stack pointer (x2).
Encoding
Binary Layout
?
31:16
110
15:13
c_uimm8sp_s
12:7
c_rs2
6:2
10
1:0
Operands
-
rs2
Source -
offset
Offset
Example
C.SWSP x10, 8(x2)
// Store to stack.
Related
More in C
Reference
View in RISC-V Unprivileged ISA Specification ↗
RISC-V ISA Manual
Description
Stores the low 32 bits of rs2 to a stack-pointer-relative address.
Operation
M[R[2] + offset][31:0] = R[rs2];