vsubfp
Vector Subtract Floating-Point
Subtracts four single-precision floats (Classic VMX).
Details
Subtracts four single-precision floating-point elements in vB from the corresponding elements in vA, storing the IEEE 754 results in vD. No condition flags are set by this instruction. This is a Classic VMX (AltiVec) floating-point operation.
Pseudocode Operation
for i in 0 to 3 do
vD[i] ← vA[i] - vB[i] (IEEE 754 single precision)
endfor
Programming Note
The vsubfp instruction is used for vectorized subtraction of single-precision floating-point numbers. Ensure that the Vector Facility (MSR.VEC) is enabled before using this instruction; otherwise, a Vector_Unavailable exception will be raised. The operation processes four elements at a time, so ensure that the input vectors are properly aligned and contain valid floating-point data to avoid unexpected results.
Example
Encoding
Operands
-
vD
Target -
vA
Src A -
vB
Src B