xvnegsp

VSX Vector Negate Single-Precision

xvnegsp XT, XB

Negates the contents of a single-precision floating-point register.

Details

The xvnegsp instruction negates the single-precision floating-point elements of a vector. It complements the sign bit of each element in the source vector and stores the result in the destination vector.

Pseudocode Operation

VRT <- -VRB

Programming Note

Use xvnegsp to negate each single-precision float in a VSX vector. Ensure vectors are properly aligned; misalignment can cause exceptions. This instruction operates at user privilege level.

Example

xvnegsp vs1, vs3

Encoding

Binary Layout
60
0
XT
6
0
11
XB
16
425
21
 
Format XX2-form
Opcode 0xF00001A9
Extension VSX

Operands

  • XT
    Target
  • XB
    Source
  • VRT
    Target Vector Register
  • VRB
    Source Vector Register