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
 
Format X-form
Opcode 0xFC000010
Extension Floating-Point

Operands

  • FRT
    Target
  • FRA
    Source
  • FRB
    Sign Source

Example

fcpsgn f1, f2, f3

Registers Altered

FPSCR

Related

More in Floating-Point

Reference

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.