vextracthm
Vector Extract Halfword Mask
Extracts MSB of each halfword into a GPR mask.
Details
The vextracthm instruction extracts bit 0 of each halfword element from a vector register (VSR) into a general-purpose register (GPR). The contents of these bits are concatenated and placed into the upper bits of GPR[RT], while the lower bits of GPR[RT] are set to zero.
Pseudocode Operation
Programming Note
The vextracthm instruction is useful for extracting the least significant bit of each halfword from a vector register and placing them into a general-purpose register. Ensure that the Vector Facility (MSR.VEC) is enabled before using this instruction; otherwise, it will raise an exception. The upper 16 bits of the destination GPR will contain the extracted bits, with the lower 48 bits set to zero.
Example
Encoding
Operands
-
RA
Target -
vB
Source