fneg
Floating Negate
fneg FRT, FRB
Negates a float.
Encoding
Binary Layout
63
0:5
FRT
6:10
0
11:15
FRB
16:20
40
21:30
/
31
Operands
-
FRT
Target -
FRB
Source
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
Negates a double-precision floating-point number in FRB by flipping the sign bit and places the result in FRT. No exception flags are set.
Operation
FRT ← -FRB
Programming Note
The fneg instruction is commonly used to change the sign of a floating-point number. Ensure that the source register (FRA) contains a valid floating-point value before executing this instruction. The result is stored in the target register (FRT), which must be distinct from FRA. This operation does not affect any special registers like FPSCR unless there are exceptions such as invalid operations or overflow.