3.4 Intrinsic Functions

In the function descriptions below, assume that the following type definitions apply:

typedef signed __int64 int64;

typedef unsigned __int64 uint64;

CLAXP supports the following intrinsic functions. All of them correspond one-for-one with corresponding instructions or PAL- calls in the Alpha AXP architecture.

Unsigned Quadword Multiply High (UMULH)

uint64 __UMULH(uint64 operand1, uint64 operand2);

Trap Barrier (TRAPB)

void __TRAPB(void);

Read Cycle Counter (RCC)

unsigned int __RCC(void);

Halt Processor (HALT)

void __PAL_HALT(void);

Generate Trap (GENTRAP)

void __PAL_GENTRAP(uint64 trap_code);

Memory Barrier (MB)

void __MB(void);

Instruction Memory Barrier

void __PAL_IMB(void);

The following intrinsics are intended for use in stdarg.h and varargs.h only:

int __builtin_isfloat(type-name);

void * __builtin_va_start(

va_list, last-fixed-formal-name, bool);

The following intrinsic is intended for use in setjmp.h only:

int _setjmp(jmp_buf buffer);

CLAXP has intrinsic support to generate special code for the following Microsoft C functions:

_alloca

abs

fabs

labs

_lrotl

_lrotr

_rotl

_rotr

memcpy

memset

strcmp

strcpy

strlen


For the other Microsoft C intrinsics, normal external calls to the standard library functions are generated whether or not the intrinsic forms are enabled by command line options or pragmas.