vminsb

Vector Minimum Signed Byte

vminsb vD, vA, vB

Compares the signed byte elements of two vector registers and stores the minimum values in a third vector register.

Details

For vminsb, each byte element of VSR[VRA+32] is compared to the corresponding byte element of VSR[VRB+32]. The smaller value is stored in the corresponding byte element of VSR[VRT+32].

Pseudocode Operation

if MSR.VEC=0 then
    Vector_Unavailable()
do i = 0 to 15
    src1 ← VSR[VRA+32].byte[i]
    src2 ← VSR[VRB+32].byte[i]
    lt_flag ← EXTS(src1) < EXTS(src2)
    VSR[VRT+32].byte[i] ← lt_flag=1 ? src1 : src2
end

Programming Note

This instruction is used to perform element-wise minimum comparison on signed byte values. Ensure that the Vector Facility (MSR.VEC) is enabled before using this instruction; otherwise, a Vector_Unavailable exception will be raised. The operation respects the sign of the bytes, so it correctly handles negative numbers. There are no specific alignment requirements for the vector registers involved.

Example

vminsb vd, va, vb

Encoding

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

Operands

  • vD
    Target
  • vA
    Src A
  • vB
    Src B
  • VRT
    Target Vector Register
  • VRA
    Source Vector Register
  • VRB
    Source Vector Register