vsubfp
Vector Subtract Floating-Point
vsubfp vD, vA, vB
Subtracts four single-precision floats (Classic VMX).
Encoding
Binary Layout
4
0:5
vD
6:10
vA
11:15
vB
16:20
74
21:31
Operands
-
vD
Target -
vA
Src A -
vB
Src B
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
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.
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.