fsw

Store a float to memory

Stores the single-precision value in f1 at the address in t1 plus an offset.

RISC-V manual: fsw

Forms

  • fsw , ()

Pseudo-instructions

The assembler turns these into one or more real instructions.

Store 32-bit value from f1 to effective memory word address

Store 32-bit value from f1 to effective memory word address using t3 as a temporary

  • Store to Address

Operands

f1
Any floating-point register, f0 to f31, or its named alias, such as ft0, fa0 or ft11.
imm12
A signed 12-bit immediate, -2048 to 2047.
t1
Any integer register, x0 to x31, or its named alias, such as zero, t0 or t6.
t2
An integer register. It may be the same register as t1.
imm32
A 32-bit immediate, -2147483648 to 4294967295.
t3
An integer register. It may be the same register as t1.
label
A named address in the program, such as the start of a loop or a variable in .data.
# value is initialized and naturally aligned for this operation.
.data
value: .word 0
.text
la t0, value
li t1, 42
fcvt.s.w f1, t1
# Store 42.0 (bytes 00 00 28 42) at value; inspect Memory.
fsw f1, 0(t0)