vcmpgefp.

Vector Compare Greater Than or Equal Floating-Point

vcmpgefp. VRT, VRA, VRB

Compares the elements of two vector registers and sets the result in a third vector register based on whether each element is greater than or equal to the corresponding element in the other vector.

Details

The vcmpgefp. instruction compares corresponding single-precision floating-point elements of vector registers VRA and VRB. For each of the four 32-bit floating-point elements, if the element in VRA is greater than or equal to the corresponding element in VRB, the corresponding element in VRT is set to all 1s (0xFFFFFFFF); otherwise, it is set to all 0s (0x00000000). The dot form (vcmpgefp.) additionally updates the CR6 field of the Condition Register to reflect whether all elements, some elements, or no elements satisfied the comparison.

Pseudocode Operation

for i = 0 to 7 do
    if (VRA[i] >= VRB[i]) then
        VRT[i] <- 1
    else
        VRT[i] <- 0
    end if
end for

Programming Note

Use vcmpgefp. to compare four single-precision floating-point elements in two vector registers. Ensure both input vectors are properly aligned and initialized. The dot form updates CR6, indicating the comparison results, which can be useful for conditional branching.

Example

vcmpgefp. v1, v2, v3

Encoding

Binary Layout
000100
0
VRT
6
VRA
11
VRB
16
.0111
21
000110
31
 
Format VC-form
Opcode 0x10000006
Extension Base

Operands

  • VRT
    Target Vector Register
  • VRA
    Source Vector Register A
  • VRB
    Source Vector Register B