xscpsgnqp
VSX Scalar Copy Sign Quad-Precision
Copies sign from B to A (128-bit).
Details
Copies the sign bit from the quad-precision floating-point value in vB to the quad-precision value in vA, placing the result in vD. The magnitude of vA is preserved while the sign of vB is applied. No condition register or status flags are affected.
Pseudocode Operation
vD[0] ← vB[0] || vA[1:127]
Programming Note
The xscpsgnqp instruction is used to copy the sign bit from one quad-precision floating-point number to another while keeping its magnitude unchanged. Ensure that the VSX (Vector Scalar Extensions) are enabled by checking and setting the appropriate bit in the MSR register. This instruction operates on 128-bit values, so both source operands must be properly aligned. Be cautious of potential exceptions if the VSX is not available or if there are alignment issues.
Example
Encoding
Operands
-
vD
Target -
vA
Src A -
vB
Src B