xvnegsp

VSX Vector Negate Single-Precision

xvnegsp XT, XB

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

Details

VSX Vector Negate Single-Precision negates four single-precision floating-point elements from VSX register XB, storing the results in VSX register XT. This VSX category instruction inverts the sign bit of each 32-bit element and does not affect floating-point status flags.

Pseudocode Operation

XT[0:31] ← -XB[0:31]
XT[32:63] ← -XB[32:63]
XT[64:95] ← -XB[64:95]
XT[96:127] ← -XB[96:127]

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 0xF00006E4
Extension VSX

Operands

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