xvcvuxwsp

VSX Vector Convert Unsigned Word to Single

xvcvuxwsp XT, XB

Converts four 32-bit unsigned integers to four floats.

Details

Converts four 32-bit unsigned integer values in VSR[XB] to four single-precision floating-point results and places them in VSR[XT]. Each unsigned word element is converted to the corresponding single-precision element. Rounding is performed according to the current rounding mode in FPSCR.

Pseudocode Operation

VSR[XT].element[0] ← ConvertUW_to_SP(VSR[XB].element[0])
VSR[XT].element[1] ← ConvertUW_to_SP(VSR[XB].element[1])
VSR[XT].element[2] ← ConvertUW_to_SP(VSR[XB].element[2])
VSR[XT].element[3] ← ConvertUW_to_SP(VSR[XB].element[3])

Programming Note

This instruction is commonly used for converting unsigned integer data to floating-point format in vector operations. Ensure that the VSX (Vector Scalar Extensions) are enabled by checking and setting MSR.VSX before using this instruction. Be aware of potential exceptions during conversion, as no results will be written to the target register if any trap-enabled exception occurs. The rounding mode is determined by FPSCR.RN, so ensure it's set appropriately for your application.

Example

xvcvuxwsp vs1, vs3

Encoding

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

Operands

  • XT
    Target
  • XB
    Source