__setb, __builtin_ppc_setb

Purpose

Sets boolean extension.

Note: This built-in function is valid only when both of the following conditions are met:
  • The -mcpu option is set to target POWER9 processors or higher.
  • The compiler mode is 64-bit.

Prototype

long long __builtin_ppc_setb (signed long long a, signed long long b);

long long __setb (signed long long a, signed long long b);

Note:
  • The built-in function in the form of __name is a synonym of the built-in function in the form of __builtin_ppc_name.
  • The built-in function in the form of __name is provided for compatibility with IBM® XL C/C++ for AIX® 16.1.0 or earlier releases. This built-in function form might be deprecated in the future.

Usage

The function compares the two parameters and returns the result:

  • If a is smaller than b, the result is -1.
  • If a is larger than b, the result is 1.
  • If a is equal to b, the result is 0.