fneg
Floating Negate
fneg FRT, FRB
Negates a float.
Details
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.
Pseudocode 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.
Example
fneg f1, f3
Encoding
Binary Layout
63
0
FRT
6
0
11
FRB
16
40
21
/
31
Operands
-
FRT
Target -
FRB
Source