vextractdm

Vector Extract Doubleword Mask

vextractdm RA, vB

Extracts MSB of each doubleword into a GPR mask.

Details

The Vector Extract Doubleword Mask instruction extracts bit 0 of each doubleword element from a vector register (VSR) into a general-purpose register (GPR). The contents of bit 0 of each doubleword element are concatenated and placed into bits 62:63 of GPR[RT], while the remaining bits in GPR[RT] are set to 0.

Pseudocode Operation

if MSR.VEC=0 then Vector_Unavailable()
do i = 0 to 1
   GPR[RT].bit[62+i] ←VSR[VRB+32].dword[i].bit[0]
end
GPR[RT].bit[0:61] ←0

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

vextractdm r4, vb

Encoding

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

Operands

  • RA
    Target
  • vB
    Source