fneg.s
FP negate (single)
Sets the first register to the negation of the single-precision value in the second.
Used in
- Floating point and the F and D extensionsRISC-V assembly
Forms
Operands
f1- Any floating-point register,
f0tof31, or its named alias, such asft0,fa0orft11. f2- A floating-point register. It may be the same register as
f1.
.data
a: .float 6.0
.text
la t0, a
flw f1, 0(t0)
# f1 (ft1)=6; result in f3 (ft3) is -6.
fneg.s f3, f1