PowerPC platforms support RS/6000 machine instructions not available on other platforms. If performance is critical to your application, the VisualAge C++ compilers provide a set of built-in functions that directly map to certain PowerPC instructions. By using these functions, function call return costs, parameter passing, stack adjustment and all the additional costs related with function invocations are eliminated.
Not all functions described below are supported by all RS/6000 processors. Using an unsupported function will result in an error message being displayed.
Name | Prototype | Return Value or Action Performed |
---|---|---|
__fmadds( ) | float __fmadds (float, float, float); | __fmadds (a, x, y) = [a * x + y] |
__fmadd( ) | double __fmadd (double, double, double); | __fmadd (a, x, y) = [a * x + y] |
__fmsubs( ) | float __fmsubs (float, float, float); | __fmsubs (a, x, y) = [a * x - y] |
__fmsub( ) | double __fmsub (double, double, double); | __fmsub (a, x, y) = [a * x - y] |
__fnmadds( ) |
float __fnmadds (float, float, float); | __fnmadds (a, x, y) = [- (a * x + y)] |
__fnmadd( ) | double __fnmadd (double, double, double); | __fnmadd (a, x, y) = [- (a * x + y)] |
__fnmsubs( ) |
float __fnmsubs (float, float, float); | __fnmsubs (a, x, y) = [- (a * x - y)] |
__fnmsub( ) | double __fnmsub (double double, double); | __fnmsub (a, x, y) = [- (a * x - y)] |
__fsqrts( ) | float __fsqrts (float); | __fsqrts (x) = square root of x |
__fsqrt( ) | double __fsqrt (double); | __fsqrt (x) = square root of x |
__frsqrte( ) | double __frsqrte (double); | __frsqrte (x) = [(estimate of) 1.0/sqrt(x)] |
__fres( ) | float __fres (float); | __fres (x) = [(estimate of) 1.0/x] |
__fsels( ) | float __fsels (float, float, float); | if (a >= 0.0) then __fsels (a, x, y)
= x; else __fsels (a, x, y) = y |
__fsel( ) | double __fsel (double, double, double); | if (a >= 0.0) then __fsel (a, x, y)
= x; else __fsel (a, x, y) = y |
__fabss( ) | float __fabss (float); | __fabss (x) = |x| |
__fabs( ) | double __fabs (double); | __fabs (x) = |x| |
__fnabss( ) | float __fnabss (float); | __fnabss (x) = -|x| |
__fnabs( ) | double __fnabs (double); | __fnabs (x) = -|x| |
__dcbt( ) | void __dcbt (void *); | Data Cache Block Touch. Loads the block of memory containing the specified address into the data cache. |
__dcbz( ) | void __dcbz (void *); | Data Cache Block set to Zero. Sets the specified address in the data cache to zero (0). |
__trap( ) | void __trap (int); | Trap if the parameter is not zero. |
__trapd( ) | void __trapd (longlong); | Trap if the parameter is not zero. |
Other builtin functions contained in /usr/vacpp/include/builtins.h have the following prototype:
Acceptable Compiler Mode and Processor Architecture Combinations