fcpsgn
Floating Copy Sign
fcpsgn FRT, FRA, FRB
Copies sign from FRB to FRA.
Encoding
Binary Layout
63
0:5
FRT
6:10
FRA
11:15
FRB
16:20
8
21:30
/
31
Operands
-
FRT
Target -
FRA
Source -
FRB
Sign Source
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
Copies the sign bit from FRB to FRA, placing the result in FRT. The magnitude of FRA is preserved while the sign is replaced by that of FRB. No exception flags are set.
Operation
FRT ← (abs(FRA) with sign bit from FRB)
Programming Note
Use fcpsgn to change the sign of a floating-point number without altering its magnitude. Ensure both source and target registers are properly aligned and accessible. This instruction operates at user privilege level but may raise exceptions if operands are invalid or if there are precision issues.