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.
Encoding
Binary Layout
111100
0:5
VS32
6:10
//
11:15
VS64
16:20
11010
21:30
1000
31
Operands
-
VS32
Target Vector Register -
VS64
Source Vector Register
Example
xvcvuxdsp vs1, vs1
Related
More in VSX
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
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.
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.