__builtin_cfuged

Purpose

Separates the bits of the input argument to the right and left within a target variable, according to the mask in the corresponding element of the second input argument.

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

Syntax

d=__builtin_cfuged(a,b)

Result and argument types

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

Table 1. Types of the returned value and function arguments
d a b
unsigned long long unsigned long long unsigned long long

Result value

For a, the bits whose corresponding bits in the mask in b equal 1 are placed in the rightmost bits in d, maintaining their original relative order. The other bits of a are placed in the leftmost bits in d, maintaining their original relative order.

Here is an example for doubleword inputs:
Argument Value
a 0x 0123 4567 89ab cdef
b 0x 0f0f 0f0f 0f0f 0f0f
d 0x 0246 8ace 1357 9bdf