xssubqp
VSX Scalar Subtract Quad-Precision
xssubqpo VRT,VRA,VRB
Subtracts the contents of two quad-precision floating-point registers and handles special cases like NaNs.
Details
Subtracts the quad-precision floating-point operand in VSR VRB from VSR VRA and stores the result in VSR VRT, handling infinities, NaNs, and denormalised numbers according to IEEE 754 semantics. This VSX instruction may update FPSCR exception flags and the result sign. The 'o' suffix variant enables underflow/overflow exception.
Pseudocode Operation
FRT ← FRA - FRB
FPSCR ← updated with exception flags (XX, ZX, UX, OX, VXISI, VXSNAN, etc.)
Programming Note
The xssubqp instruction is used for subtracting quad-precision floating-point numbers. Ensure that the VSX feature is enabled in the MSR register to avoid exceptions. Handle special cases like NaNs and infinities by checking the FPSCR flags after execution. The result is rounded according to the rounding mode specified in FPSCR.RN.
Example
Encoding
Operands
-
vD
Target -
vA
Src A -
vB
Src B -
VRT
Target Vector-Scalar Register -
VRA
Source Vector-Scalar Register -
VRB
Source Vector-Scalar Register