xvcvuxdsp

VSX Vector Convert with round Unsigned Doubleword to Single-Precision format

xvcvuxdsp VS32,VS64

Converts an unsigned doubleword to a single-precision floating-point value with rounding.

Details

Converts a 64-bit unsigned doubleword integer (in the doubleword elements of VS64) to 32-bit single-precision floating-point format with rounding and stores the result in the corresponding word elements of VS32. This is a VSX instruction that performs IEEE-compliant rounding and may update FPSCR.

Pseudocode Operation

for i in 0 to 1:
  VS32[2*i:2*i+1] ← CONVERT_UNSIGNED_DWORD_TO_SINGLE_PRECISION_ROUNDED(VS64[i])

Programming Note

This instruction is useful for converting unsigned 64-bit integers to single-precision floating-point numbers. Ensure that the source vector elements are properly aligned and consider the current rounding mode's effect on conversion results. The target vector register will have its lower words zeroed out, so handle this if you need to preserve data in those positions.

Example

xvcvuxdsp vs1, vs1

Encoding

Binary Layout
111100
0
VS32
6
//
11
VS64
16
11010
21
1000
31
 
Format XX2-form
Opcode 0xF00006A0
Extension VSX

Operands

  • VS32
    Target Vector Register
  • VS64
    Source Vector Register