xscpsgndp

VSX Scalar Copy Sign Double-Precision

xscpsgndp XT,XA,XB

Copies the sign of a double-precision floating-point value from one register to another.

Details

Copies the sign bit from the double-precision floating-point value in VSR[XA] to the double-precision value in VSR[XB], placing the result in VSR[XT]. The magnitude of the result comes from XB and the sign comes from XA. FPSCR is not affected; this instruction operates on the scalar element of the VSX register.

Pseudocode Operation

XT[0] ← XA[0]
XT[1:63] ← XB[1:63]

Programming Note

This instruction can be used to operate on single-precision source operands. Previous versions of the architecture allowed the contents of doubleword 1 of the result register to be undefined. However, all processors that support this instruction write 0s into doubleword 1 of the result register, as is required by this version of the architecture.

Example

xscpsgndp vs1, vs2, vs3

Encoding

Binary Layout
176
0
AX
6
BX
11
TX
16
T
21
A
29
B
30
 
Format X-form
Opcode 0xF0000580
Extension VSX
Registers Altered MSR

Operands

  • XT
    Target Vector-Scalar Register
  • XA
    Source Vector-Scalar Register for Sign Bit
  • XB
    Source Vector-Scalar Register for Magnitude