xvmuldp

VSX Vector Multiply Double-Precision

xvmuldp XT, XA, XB

Multiplies two double-precision floating-point numbers in vector registers and stores the result.

Details

The xvmuldp instruction multiplies the double-precision floating-point value in doubleword element i of VSR[XA] with the double-precision floating-point value in doubleword element i of VSR[XB], and places the result in doubleword element i of VSR[XT].

Pseudocode Operation

for i = {0, 1} do
    src1 <- VSR[XA][i]
    src2 <- VSR[XB][i]
    if src1 is QNaN or src2 is QNaN then
        v <- src1
    else if src1 is SNaN or src2 is SNaN then
        v <- Q(src1)
    else if src1 is +Infinity and src2 is +NZF then
        v <- +Infinity
    else if src1 is +Infinity and src2 is -NZF then
        v <- -Infinity
    else if src1 is -Infinity and src2 is +NZF then
        v <- -Infinity
    else if src1 is -Infinity and src2 is -NZF then
        v <- +Infinity
    else if src1 is +NZF and src2 is +Infinity then
        v <- +Infinity
    else if src1 is +NZF and src2 is -Infinity then
        v <- -Infinity
    else if src1 is -NZF and src2 is +Infinity then
        v <- -Infinity
    else if src1 is -NZF and src2 is -Infinity then
        v <- +Infinity
    else if src1 is +Zero and src2 is +Zero then
        v <- +Zero
    else if src1 is +Zero and src2 is -Zero then
        v <- -Zero
    else if src1 is -Zero and src2 is +Zero then
        v <- -Zero
    else if src1 is -Zero and src2 is -Zero then
        v <- +Zero
    else if src1 is +NZF and src2 is +Zero then
        v <- +Zero
    else if src1 is +NZF and src2 is -Zero then
        v <- -Zero
    else if src1 is -NZF and src2 is +Zero then
        v <- -Zero
    else if src1 is -NZF and src2 is -Zero then
        v <- +Zero
    else if src1 is +Zero and src2 is +NZF then
        v <- +Zero
    else if src1 is +Zero and src2 is -NZF then
        v <- -Zero
    else if src1 is -Zero and src2 is +NZF then
        v <- -Zero
    else if src1 is -Zero and src2 is -NZF then
        v <- +Zero
    else
        v <- M(src1, src2)
    VSR[XT][i] <- Q(v)
end for

Programming Note

The xvmuldp instruction performs element-wise multiplication of double-precision floating-point values in VSX registers. Ensure that the input vectors are properly aligned to avoid alignment faults. Be cautious with NaN and infinity handling, as they follow specific rules for propagation and sign determination. This instruction operates at user privilege level.

Example

xvmuldp vs1, vs2, vs3

Encoding

Binary Layout
60
0
XT
6
XA
11
XB
16
112
21
 
Format XX3-form
Opcode 0xF0000070
Extension VSX
Registers Altered FPSCR

Operands

  • XT
    Target
  • XA
    Src A
  • XB
    Src B