SPRU514Z July 2001 – October 2023 SM320F28335-EP
The following built-in functions are supported:
The __builtin_frame_address() function always returns zero.
The __builtin_sqrt() and __builtin_sqrtf() functions are supported only if hardware float support is enabled. That is, __builtin_sqrt() is supported only if the Trigonometric Math Unit (TMU) is enabled. And, __builtin_sqrtf() is supported only if the TMU is enabled or using the CLA compiler.
When calling built-in functions that may be unavailable at run-time, use the Clang __has_builtin macro as shown in the following example to make sure the function is supported:
#if __has_builtin(__builtin_sqrt)
double estimate = __builtin_sqrt(x);
#else
double estimate = fast_approximate_sqrt(x);
#endif
If the built-in function is supported and the device has the appropriate hardware support, the built-in function will invoke the hardware support.
If the built-in function is supported but the device does not have the appropriate hardware enabled, the built-in function will usually become a call to an RTS library function. For example, __builtin_sqrt() will become a call to the library function sqrt().
The __builtin_return_address() function always returns zero.