vminuw

Vector Minimum Unsigned Word

vminuw vD, vA, vB

Selects minimum value per word (unsigned).

Details

The vminuw instruction performs a vector minimum operation on unsigned words. It compares each pair of corresponding elements from two source vectors and stores the smaller value in the destination vector.

Pseudocode Operation

if MSR.VEC=0 then Vector_Unavailable()
do i = 0 to 3
   src1 ←VSR[VRA+32].word[i]
   src2 ←VSR[VRB+32].word[i]

   lt_flag ←EXTZ(src1) < EXTZ(src2)
   VSR[VRT+32].word[i] ←lt_flag=1 ? src1 : src2
end

Programming Note

The vminuw instruction is used to perform element-wise minimum operations on unsigned words from two vectors. Ensure that the Vector Facility (MSR.VEC) is enabled before using this instruction; otherwise, a Vector_Unavailable exception will be raised. The operation is performed in parallel across four elements per vector register.

Example

vminuw vd, va, vb

Encoding

Binary Layout
4
0
vD
6
vA
11
vB
16
1154
21
 
Format VA-form
Opcode 0x10000482
Extension VMX (AltiVec)
Registers Altered MSR

Operands

  • vD
    Target
  • vA
    Src A
  • vB
    Src B