vec_genmasks_16: Vector Generate Mask (Halfword)

d = vec_genmasks_16(a, b)
Generates bit masks for elements in the return vector. For each halfword element in d, a bit mask is generated. The mask consists of bits set to one starting at the bit position specified by a and ending with the bit position specified by b. All other bit positions are set to zero.
Notes:
  • If a or b is greater than 16, the operation is performed as if the value gets modulo by 16.
  • If a is greater than b, the operation is perform as if b equals 15.
Table 1. Vector Generate Mask (Halfword)
d a b
vector unsigned short 0 - 255 0 - 255