vcfux

Vector Convert from Unsigned Fixed-Point Word

vcfux vD, vB, UIM

Converts 4 unsigned 32-bit integers to floats.

Details

The vcfux instruction converts a vector of signed floating-point values to unsigned fixed-point integers, rounding towards zero. Each element is multiplied by 2 raised to the power of UIM and then converted to an unsigned integer. If the result exceeds 2^32 - 1, it saturates to that value.

Pseudocode Operation

if MSR.VEC=0 then Vector_Unavailable()
do i = 0 to 3
   src ← VSR[VRB+32].word[i]
   VSR[VRT+32].word[i] ← ui32_CONVERT_FROM_BFP32(src, UIM)
end

Programming Note

The vcfux instruction is used for converting signed floating-point values to unsigned fixed-point integers. Ensure that the Vector Facility (MSR.VEC) is enabled before using this instruction; otherwise, a Vector_Unavailable exception will be raised. Be cautious of saturation when results exceed 2^32 - 1.

Example

vcfux vd, vb, uim

Encoding

Binary Layout
4
0
vD
6
UIM
11
vB
16
778
21
 
Format VX-form
Opcode 0x1000030A
Extension VMX (AltiVec)
Registers Altered MSR

Operands

  • vD
    Target
  • vB
    Source
  • UIM
    Fraction bits