vextractd

Vector Extract Doubleword

vextractd RA, vB, UIM

Extracts a doubleword from a vector into a GPR.

Details

Extracts an unsigned doubleword element from vB at the position specified by UIM and stores the 64-bit value into general-purpose register RA. The doubleword index (0–1) is provided by the 1-bit immediate UIM. No status flags are affected. This instruction is part of the VMX (AltiVec) extension.

Pseudocode Operation

index ← UIM[0:1]
RA ← vB[index*64 : index*64+63]

Programming Note

The vextractd instruction is used to extract an 8-byte doubleword from a source vector register into the destination vector register, starting at a specified byte index. Ensure that the MSR.VEC bit is set to enable vector operations; otherwise, a Vector_Unavailable exception will be raised. Be cautious with the UIM index; if it exceeds 8, the results are undefined. The destination register's second doubleword is zeroed out.

Example

vextractd r4, vb, uim

Encoding

Binary Layout
4
0
RA
6
UIM
11
vB
16
717
21
 
Format VX-form
Opcode 0x100002CD
Extension VMX (AltiVec)
Registers Altered MSR

Operands

  • RA
    Target GPR
  • vB
    Source Vector
  • UIM
    Index