vextractd
Vector Extract Doubleword
vextractd RA, vB, UIM
Extracts a doubleword from a vector into a GPR.
Encoding
Binary Layout
4
0:5
RA
6:10
UIM
11:15
vB
16:20
717
21:31
Operands
-
RA
Target GPR -
vB
Source Vector -
UIM
Index
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
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.
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.