vsubfp

Vector Subtract Floating-Point

vsubfp vD, vA, vB

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

vsubfp vd, va, vb

Encoding

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

Operands

  • vD
    Target
  • vA
    Src A
  • vB
    Src B