vextractdm
Vector Extract Doubleword Mask
vextractdm RA, vB
Extracts MSB of each doubleword into a GPR mask.
Encoding
Binary Layout
4
0:5
RA
6:10
0
11:15
vB
16:20
1794
21:31
Operands
-
RA
Target -
vB
Source
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
Extracts the most significant bit from each doubleword element in the source vector and packs these bits into a general-purpose register as a mask. This is a VMX instruction with no effect on condition registers or status fields.
Operation
result ← 0
for i in 0 to 3 do
if vB[i*64] = 1 then
result[i] ← 1
else
result[i] ← 0
end if
end for
RA ← result
Programming Note
This instruction is useful for extracting the least significant bit of each doubleword in a vector register and placing it into a general-purpose register. Ensure that the Vector Facility (MSR.VEC) is enabled before using this instruction; otherwise, a Vector_Unavailable exception will be raised. The result is stored in bits 62:63 of the target GPR, with all other bits set to zero.