Add alpha intrinsics, contributed by Rahul Joshi
[oota-llvm.git] / include / llvm / Intrinsics.h
1 //===-- llvm/Instrinsics.h - LLVM Intrinsic Function Handling ---*- C++ -*-===//
2 //
3 // This file defines a set of enums which allow processing of intrinsic
4 // functions.  Values of these enum types are returned by
5 // Function::getIntrinsicID.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_INTRINSICS_H
10 #define LLVM_INTRINSICS_H
11
12 /// LLVMIntrinsic Namespace - This namespace contains an enum with a value for
13 /// every intrinsic/builtin function known by LLVM.  These enum values are
14 /// returned by Function::getIntrinsicID().
15 ///
16 namespace LLVMIntrinsic {
17   enum ID {
18     not_intrinsic = 0,   // Must be zero
19
20     va_start,       // Used to represent a va_start call in C
21     va_end,         // Used to represent a va_end call in C
22     va_copy,        // Used to represent a va_copy call in C
23
24     setjmp,         // Used to represent a setjmp call in C
25     longjmp,        // Used to represent a longjmp call in C
26
27     //===------------------------------------------------------------------===//
28     // This section defines intrinsic functions used to represent Alpha
29     // instructions...
30     //
31     alpha_ctlz,     // CTLZ (count leading zero): counts the number of leading
32                     // zeros in the given ulong value
33     alpha_cttz,     // CTTZ (count trailing zero): counts the number of trailing
34                     // zeros in the given ulong value 
35     alpha_ctpop,    // CTPOP (count population): counts the number of ones in
36                     // the given ulong value 
37     alpha_umulh,    // UMULH (unsigned multiply quadword high): Takes two 64-bit
38                     // (ulong) values, and returns the upper 64 bits of their
39                     // 128 bit product as a ulong
40   };
41 }
42
43 #endif