xsabsdp

VSX Scalar Absolute Value Double-Precision

xsabsdp XT, XB

Computes the absolute value of a double-precision floating-point number.

Details

The absolute value of the double-precision floating-point operand in doubleword element 0 of VSR[XB] is placed into doubleword element 0 of VSR[XT] in double-precision format. The contents of doubleword element 1 of VSR[XT] are set to 0.

Pseudocode Operation

if MSR.VSX=0 then VSX_Unavailable()
src ←VSR[32×BX+B].dword[0]
Let XT be the value 32×TX + T.
VSR[XT].dword[0] ←bfp64_ABSOLUTE(src)
VSR[XT].dword[1] ←0x0000_0000_0000_0000

Programming Note

This instruction can be used to operate on a single-precision source operand. Previous versions of the architecture allowed the contents of doubleword 1 of the result register to be undefined. However, all processors that support this instruction write 0s into doubleword 1 of the result register, as is required by this version of the architecture.

Example

xsabsdp vs1, vs3

Encoding

Binary Layout
60
0
XT
16
0
21
XB
26
345
31
 
Format XX2-form
Opcode 0xF0000159
Extension VSX
Registers Altered MSR

Operands

  • XT
    Target
  • XB
    Source