xvabssp

VSX Vector Absolute Value Single-Precision

xvabssp XT, XB

Computes absolute value for four single-precision floats.

Details

The xvabssp instruction computes the absolute value of each single-precision floating-point element in a vector register and stores the result in another vector register. It processes four elements per operation.

Pseudocode Operation

if MSR.VSX=0 then VSX_Unavailable()
do i = 0 to 3
   src ←VSR[32×BX+B].word[i]
   VSR[32×TX+T].word[i] ←bfp32_ABSOLUTE(src)
end

Programming Note

The xvabssp instruction is used to compute the absolute value of each single-precision floating-point element in a vector register. Ensure that the VSX (Vector Scalar Extensions) are enabled by checking and setting the appropriate bit in the MSR register. This instruction processes four elements per operation, so ensure your data is appropriately aligned for optimal performance.

Example

xvabssp vs1, vs3

Encoding

Binary Layout
60
0
XT
6
0
11
XB
16
409
21
 
Format XX2-form
Opcode 0xF0000199
Extension VSX
Registers Altered MSR

Operands

  • XT
    Target
  • XB
    Source