vec_gendm

Purpose

Creates an element mask for doubleword 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_gendm (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 long long unsigned long long

Result value

The bits in a are numbered from left to right.

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

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

For example:
Argument Example
a 0 1
d 0x 0000 0000 0000 0000 ffff ffff ffff ffff