# `fneg.s`

[RISC-V Documentation](https://asm-editor.specy.app/documentation/risc-v.md) › [Instructions](https://asm-editor.specy.app/documentation/risc-v/instruction.md)

Web page: https://asm-editor.specy.app/documentation/risc-v/instruction/fneg.s

**FP negate (single)** · Pseudo-instruction

Category: Floating point

Sets the first register to the negation of the single-precision value in the second.

[RISC-V manual: fsgnjn.s](https://docs.riscv.org/reference/isa/v20260120/unpriv/f-st-ext.html#norm:fsgnj-s_fsgnjn-s_fsgnjx-s_op)

Used in: [Floating point and the F and D extensions](https://asm-editor.specy.app/learn/courses/risc-v/think-in-assembly/floating-point-and-the-f-and-d-extensions.md) (RISC-V assembly)

## Forms

- `fneg.s f1, f2`
  - `fneg.s f1, f2` → `fsgnjn.s f1, f2, f2`

## Operands

- `f1`: Any floating-point register, `f0` to `f31`, or its named alias, such as `ft0`, `fa0` or `ft11`.
- `f2`: A floating-point register. It may be the same register as `f1`.

## Example

```riscv
.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
```
