xsnmsubqp

VSX Scalar Negative Multiply-Subtract Quad-Precision

xsnmsubqp VRT,VRA,VRB

Performs a negative multiply-subtract operation on quad-precision floating-point values.

Details

Performs a scalar negative multiply-subtract operation on quad-precision floating-point values, computing VRT = -(VRA × VRB) - VRT. 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] ← -(VRA[0:127] × VRB[0:127]) - VRT[0:127]
FPSCR ← update_exception_flags(FPSCR, result)

Programming Note

The xsnmsubqp instruction is used for performing a scalar negative multiply-subtract operation on quad-precision floating-point numbers. Ensure that the VSX (Vector Scalar Extensions) are enabled in the MSR register to avoid exceptions. Be cautious of potential overflow and underflow conditions, as indicated by the exception flags in FPSCR. The result is rounded using round-to-nearest mode by default.

Example

xsnmsubqp v1, v2, v3

Encoding

Binary Layout
64
0
VRT
16
VRA
21
VRB
26
RO
31
 
Format X-form
Opcode 0xFC0003C8
Extension VSX
Registers Altered FPSCR, VXSNAN, VXIMZ, Vxisi, OX, UX, XX, FPRF, FR, FI

Operands

  • VRT
    Target Vector Register
  • VRA
    Source Vector Register
  • VRB
    Source Vector Register