Intrinsic Functions

Intrinsic functions generate in-line assembly code instead of making a call to a library function. Intrinsic functions generate less object code and perform faster than their regular counterparts. In some cases these functions generate just a single assembly instruction.

For example, for target processors that have built-in floating-point facilities, the compiler generates a single assembly instruction when it encounters this intrinsic function:

long __labs(long);

The compiler generates a sequence of instructions that are highly optimized for the target processor when it encounters this intrinsic function:

void *__memcpy(void *, const void *, size_t);

Because an intrinsic function is not a real function, a program cannot use a pointer to an intrinsic function. These statements give an example:

#include <math.h>

typedef long (*functype)(long);

functype f1 = labs; /* OK: non-intrinsic function in EWL. */

functype f2 = __labs; /* Error: intrinsic function. */