xsmsubqp
VSX Scalar Multiply-Subtract Quad-Precision
xsmsubqpo VRT,VRA,VRB
Performs a multiply-subtract operation on quad-precision floating-point values.
Details
Performs a scalar multiply-subtract operation on quad-precision floating-point values, computing VRT = VRT - (VRA × VRB). The result is rounded according to the current rounding mode in FPSCR. This instruction requires VSX support and updates FPSCR exception flags based on the operation result.
Pseudocode Operation
VRT[0:127] ← VRT[0:127] - (VRA[0:127] × VRB[0:127])
FPSCR ← update_exception_flags(FPSCR, result)
Programming Note
The xsmsubqp instruction is used for performing a multiply-subtract operation on quad-precision floating-point numbers. Ensure that the VSX (Vector Scalar Extensions) are enabled in the MSR register to avoid an exception. Be cautious of rounding modes and exceptions, as they can affect the result and set flags in the FPSCR register. This instruction operates on 128-bit aligned data in vector registers VSR[VRA+32], VSR[VRT+32], and VSR[VRB+32].
Example
Encoding
Operands
-
VRT
Target Vector Register -
VRA
Source Vector Register -
VRB
Source Vector Register