__cdtbcd, __builtin_ppc_cdtbcd

Purpose

Convert Declets to Binary Coded Decimal.

The low-order 20 bits of each word of the source contain two declets that are converted to six, 4-bit BCD fields; each set of six, 4-bit BCD fields is placed into the low-order 24 bits of the corresponding word in the result. The high-order 8 bits in each word of the result are set to 0.
Note: The built-in function is available starting from IBM® Open XL C/C++ for AIX® 17.1.2.11.

Prototype

long long __builtin_ppc_cdtbcd (long long); long long __cdtbcd (long long);

unsigned int __builtin_ppc_cdtbcd (unsigned int);

Note:
  • For the prototype with long long type parameters, the built-in function in the form of __name is a synonym of the built-in function in the form of __builtin_ppc_name.
  • For the prototype with long long type parameters, 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.