vextractd

Vector Extract Doubleword

vextractd RA, vB, UIM

Extracts a doubleword from a vector into a GPR.

Details

The vextractd instruction extracts a doubleword (8 bytes) from the source vector register specified by VRB and places it into the destination vector register specified by VRT. The extraction starts at the byte index specified by UIM. If UIM is greater than 8, the results are undefined.

Pseudocode Operation

if MSR.VEC=0 then Vector_Unavailable()
src ←VSR[VRB+32].byte[UIM:UIM+7]
VSR[VRT+32].dword[0] ←src
VSR[VRT+32].dword[1] ←0x0000_0000_0000_0000

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