xsmulqp

VSX Scalar Multiply Quad-Precision

xsmulqp vD, vA, vB

Multiplies two quad-precision floating-point numbers and rounds the result to odd.

Details

Multiplies two 128-bit quad-precision floating-point numbers held in VSX register pairs and stores the result in another VSX register pair, rounding to odd. The operation computes the full product and rounds using the round-to-odd mode to ensure correct rounding behavior. This instruction requires VSX support and updates FPSCR with exception flags.

Pseudocode Operation

FPR[vD:vD+1] ← quad_precision_round_to_odd(FPR[vA:vA+1] × FPR[vB:vB+1])
FPSCR ← updated with exception flags

Programming Note

The xsmulqp instruction handles special cases like NaNs and infinities, setting flags accordingly. Ensure proper handling of these conditions to avoid unexpected results. The instruction operates at the VSX privilege level and may raise exceptions for invalid operations. Performance can vary based on input values and rounding modes.

Example

xsmulqp v2, v3, v4

// Scientific Quad-Float Multiply.

Encoding

Binary Layout
63
0
FRT
6
FRA
11
FRB
16
36
21
Rc
31
 
Format X-form
Opcode 0xFC000048
Extension VSX
Registers Altered vximz_flag, vxsnan_flag

Operands

  • vD
    Target
  • vA
    Source A
  • vB
    Source B
  • VRT
    Target Vector Register
  • VRA
    Source Vector Register
  • VRB
    Source Vector Register