xvcvspdp

VSX Vector Convert Single to Double

xvcvspdp XT, XB

Converts two floats to two doubles.

Details

Converts two single-precision floating-point values in VSR[XB] to double-precision format and places the results in VSR[XT]. The single-precision elements (0 and 1) are expanded to double-precision elements (0 and 1). No rounding is required for this widening conversion.

Pseudocode Operation

VSR[XT].element[0] ← ConvertSP_to_DP(VSR[XB].element[0])
VSR[XT].element[1] ← ConvertSP_to_DP(VSR[XB].element[1])

Programming Note

The xvcvspdp instruction is used to convert a vector of single-precision floating-point values to double-precision. Ensure that the VSX (Vector Scalar Extensions) are enabled in the MSR register, otherwise, an exception will be raised. Handle special cases like signaling NaNs by checking and setting the appropriate flags in FPSCR.

Example

xvcvspdp vs1, vs3

Encoding

Binary Layout
60
0
XT
6
0
11
XB
16
457
21
 
Format XX2-form
Opcode 0xF0000724
Extension VSX
Registers Altered FPSCR, MSR

Operands

  • XT
    Target
  • XB
    Source