1 //===-- llvm/Instrinsics.h - LLVM Intrinsic Function Handling ---*- C++ -*-===//
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.
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_INTRINSICS_H
10 #define LLVM_INTRINSICS_H
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().
16 namespace LLVMIntrinsic {
18 not_intrinsic = 0, // Must be zero
20 // Varargs handling intrinsics...
21 va_start, // Used to represent a va_start call in C
22 va_end, // Used to represent a va_end call in C
23 va_copy, // Used to represent a va_copy call in C
25 // Setjmp/Longjmp intrinsics...
26 setjmp, // Used to represent a setjmp call in C
27 longjmp, // Used to represent a longjmp call in C
28 sigsetjmp, // Used to represent a sigsetjmp call in C
29 siglongjmp, // Used to represent a siglongjmp call in C
31 //===------------------------------------------------------------------===//
32 // This section defines intrinsic functions used to represent Alpha
35 alpha_ctlz, // CTLZ (count leading zero): counts the number of leading
36 // zeros in the given ulong value
38 alpha_cttz, // CTTZ (count trailing zero): counts the number of trailing
39 // zeros in the given ulong value
41 alpha_ctpop, // CTPOP (count population): counts the number of ones in
42 // the given ulong value
44 alpha_umulh, // UMULH (unsigned multiply quadword high): Takes two 64-bit
45 // (ulong) values, and returns the upper 64 bits of their
46 // 128 bit product as a ulong
48 alpha_vecop, // A generic vector operation. This function is used to
49 // represent various Alpha vector/multimedia instructions.
50 // It takes 4 parameters:
51 // - the first two are 2 ulong vectors
52 // - the third (uint) is the size (in bytes) of each
53 // vector element. Thus a value of 1 means that the two
54 // input vectors consist of 8 bytes
55 // - the fourth (uint) is the operation to be performed on
56 // the vectors. Its possible values are defined in the
57 // enumeration AlphaVecOps.
59 alpha_pup, // A pack/unpack operation. This function is used to
60 // represent Alpha pack/unpack operations.
61 // It takes 3 parameters:
62 // - the first is an ulong to pack/unpack
63 // - the second (uint) is the size of each component
64 // Valid values are 2 (word) or 4 (longword)
65 // - the third (uint) is the operation to be performed.
66 // Possible values defined in the enumeration
69 alpha_bytezap, // This intrinsic function takes two parameters: a ulong
70 // (64-bit) value and a ubyte value, and returns a ulong.
71 // Each bit in the ubyte corresponds to a byte in the
72 // ulong. If the bit is 0, the byte in the output equals
73 // the corresponding byte in the input, else the byte in
74 // the output is zero.
76 alpha_bytemanip,// This intrinsic function represents all Alpha byte
77 // manipulation instructions. It takes 3 parameters:
78 // - The first two are ulong inputs to operate on
79 // - The third (uint) is the operation to perform.
80 // Possible values defined in the enumeration
83 alpha_dfpbop, // This intrinsic function represents Alpha instructions
84 // that operate on two doubles and return a double. The
85 // first two parameters are the two double values to
86 // operate on, and the third is a uint that specifies the
87 // operation to perform. Its possible values are defined in
88 // the enumeration AlphaFloatingBinaryOps
90 alpha_dfpuop, // This intrinsic function represents operation on a single
91 // double precision floating point value. The first
92 // paramters is the value and the second is the operation.
93 // The possible values for the operations are defined in the
94 // enumeration AlphaFloatingUnaryOps
96 alpha_unordered,// This intrinsic function tests if two double precision
97 // floating point values are unordered. It has two
98 // parameters: the two values to be tested. It return a
99 // boolean true if the two are unordered, else false.
101 alpha_uqtodfp, // A generic function that converts a ulong to a double.
102 // How the conversion is performed is specified by the
103 // second parameter, the possible values for which are
104 // defined in the AlphaUqToDfpOps enumeration
106 alpha_uqtosfp, // A generic function that converts a ulong to a float.
107 // How the conversion is performed is specified by the
108 // second parameter, the possible values for which are
109 // defined in the AlphaUqToSfpOps enumeration
111 alpha_dfptosq, // A generic function that converts double to a long.
112 // How the conversion is performed is specified by the
113 // second parameter, the possible values for which are
114 // defined in the AlphaDfpToSqOps enumeration
116 alpha_sfptosq, // A generic function that converts a float to a long.
117 // How the conversion is performed is specified by the
118 // second parameter, the possible values for which are
119 // defined in the AlphaSfpToSq enumeration