vec_genwm

Purpose

Creates an element mask for word 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_genwm (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 int unsigned long long

Result value

The bits in a are numbered from left to right.

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

All bits of the ith element of d are set to 0 if the ith bit of the 4-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 4-bit value in a is equal to 1.

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