c.sw

Stores a 32-bit value in register xs2 to memory. It computes an effective address by adding the zero-extended offset, scaled by 4, to the base address in register xs1. It expands to `sw` `rs2, offset(xs1)`.

Synopsis

c.sw xs2, imm(xs1)

Encoding

Type:

012456791012131500xs2immimmxs1imm110

RISC-V Instruction Encoder/Decoder

open c.sw in rvcodecjs

Availability