__builtin_bcdtruncate
Purpose
Decimal truncate.
This built-in function is valid only when -qarch(-mcpu) is set to utilize the POWER9™ technology and the altivec.h file is included.
Prototype
vector unsigned char __builtin_bcdtruncate(vector unsigned char a, int b, unsigned char c);
Usage
The built-in function copies the rightmost b digits of the signed decimal value of a into the result.
The sign code of the result is set according to the following rules:
- If a is positive, the sign code is set to 0xD.
- If a is negative, the sign code is set according to the following rules:
- If c equals to 0, the sign code is set to 0xC.
- If c equals to 1, the sign code is set to 0xF.
The other digits of the result are set to zero.