vextractdm
Vector Extract Doubleword Mask
Extracts MSB of each doubleword into a GPR mask.
Details
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.
Pseudocode 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.
Example
Encoding
Operands
-
RA
Target -
vB
Source