vec_genhm

Purpose

Creates an element mask for halfword elements from a bit mask.

Note: This built-in function is valid only when the -mcpu option is set to target Power10 processors.

Syntax

d = vec_genhm (a)

Result and argument types

The following table describes the types of the returned value and the function arguments.

Table 1. Result and argument types
d a
vector unsigned short unsigned long long

Result value

The bits in a are numbered from left to right.

For each integer i from 0 to 7, the leftmost element of d is counted as the 0th element, and the rightmost element is counted as the 7th element.

All bits of the ith element of d are set to 0 if the ith bit of the 8-bit value in a is equal to 0.

All bits of the ith element of d are set to 1 if the ith bit of the 8-bit value in a is equal to 1.

For example:
Argument Example
a 10 10 01 01
d 0x ffff 0000 ffff 0000 0000 ffff 0000 ffff