xxswapd

VSX Vector Swap Doubleword

xxswapd XT, XB

Swaps the two doublewords in the register.

Encoding

Binary Layout
60
0:5
XT
6:10
0
11:15
XB
16:20
250
21:31
 
Format XX2-form
Opcode 0xF00000FA
Extension VSX

Operands

  • XT
    Target
  • XB
    Source

Example

xxswapd vs1, vs3

Registers Altered

MSR

Related

More in VSX

Reference

Description

Swaps the two doublewords within the XB register and stores the result in XT. The high doubleword becomes the low doubleword and vice versa. This is a VSX instruction that does not affect condition or status flags.

Operation

XT[0:63] ← XB[64:127]
XT[64:127] ← XB[0:63]

Programming Note

The xxswapd instruction swaps doubleword elements between two VSX registers based on the DM bit setting. Ensure that the VSX facility is enabled in the MSR register to avoid a VSX_Unavailable exception. This instruction operates at user privilege level and does not require specific alignment of data.