xvcpsgndp
VSX Vector Copy Sign Double-Precision
xvcpsgndp XT,XA,XB
Copies the sign bit from one double-precision vector element to another.
Details
For xvcpsgndp, the sign bit of each doubleword element in VSR[XB] is copied to the corresponding doubleword element in VSR[XT], while the magnitude bits remain unchanged.
Pseudocode Operation
Programming Note
This instruction is useful for copying the sign of double-precision floating-point numbers while preserving their magnitude. Ensure that VSX (Vector Scalar Extensions) are enabled in the MSR register to avoid exceptions. The operation is performed on each doubleword element independently, so alignment requirements are per-element rather than per-vector.
Extended Mnemonics
| Extended Mnemonic | Equivalent Instruction |
|---|---|
| xvmovdp |
Example
xvcpsgndp vs1, vs2, vs3
Encoding
Binary Layout
T
0
A
11
B
16
AX
21
BX
29
TX
30
Operands
-
XT
Target Vector-Specific Register -
XA
Source Vector-Specific Register -
XB
Source Vector-Specific Register