xxswapd

VSX Vector Swap Doubleword

xxswapd XT, XB

Swaps the two doublewords in the register.

Details

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.

Pseudocode 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.

Example

xxswapd vs1, vs3

Encoding

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

Operands

  • XT
    Target
  • XB
    Source