fcpsgn
Floating Copy Sign
fcpsgn FRT, FRA, FRB
Copies sign from FRB to FRA.
Details
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.
Pseudocode 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.
Example
fcpsgn f1, f2, f3
Encoding
Binary Layout
63
0
FRT
6
FRA
11
FRB
16
8
21
/
31
Operands
-
FRT
Target -
FRA
Source -
FRB
Sign Source