SW
Store Word
SW rs2, offset(rs1)
Stores a 32-bit word to memory.
Details
SW stores the least-significant 32-bit word of rs2 to memory at address rs1+sext(offset).
Pseudocode Operation
M[R[rs1] + sext(offset)][31:0] = R[rs2][31:0];
Example
SW x5, 8(x10)
Encoding
Binary Layout
imm[11:5]
31:25
rs2
24:20
rs1
19:15
010
14:12
imm[4:0]
11:7
0100011
6:0
Operands
-
rs2
Source -
rs1
Base Address -
offset
Offset