Intrinsic functions (also known as intrinsics) are function calls that the compiler resolves directly, by generating code, rather than by calling an external function. The Alpha version of the compiler supports a number of intrinsics.
With all intrinsics, you must explicitly enable the intrinsic before calling it, by using it with the /Oi compiler option or the intrinsic pragma. The general syntax for using this pragma is:
#pragma intrinsic( intrinsic-name )
For example, to enable the use of the _InterlockedIncrement intrinsic, include a pragma as shown, along with the declaration of the function:
long _InterlockedIncrement(long *);
#pragma intrinsic(_InterlockedIncrement)
The intrinsic functions listed in the following sections correspond one-for-one with existing instructions or PAL calls in the Alpha architecture. These functions assume that the following type definitions apply:
typedef signed _ _int 64 int 64;
typedef unsigned _ _int 64 uint64;
Please note that some intrinsics may only be executed in privileged context; for example, the _ _PAL_HALT intrinsic may only be successfully executed in kernel mode. For additional information, please consult the Alpha Architecture Reference Manual or Alpha Calling Standard (contained in Visual C++ Online Documentation).