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 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
24 setjmp, // Used to represent a setjmp call in C
25 longjmp, // Used to represent a longjmp call in C
27 //===------------------------------------------------------------------===//
28 // This section defines intrinsic functions used to represent Alpha
31 alpha_ctlz, // CTLZ (count leading zero): counts the number of leading
32 // zeros in the given ulong value
34 alpha_cttz, // CTTZ (count trailing zero): counts the number of trailing
35 // zeros in the given ulong value
37 alpha_ctpop, // CTPOP (count population): counts the number of ones in
38 // the given ulong value
40 alpha_umulh, // UMULH (unsigned multiply quadword high): Takes two 64-bit
41 // (ulong) values, and returns the upper 64 bits of their
42 // 128 bit product as a ulong
44 alpha_vecop, // A generic vector operation. This function is used to
45 // represent various Alpha vector/multimedia instructions.
46 // It takes 4 parameters:
47 // - the first two are 2 ulong vectors
48 // - the third (uint) is the size (in bytes) of each
49 // vector element. Thus a value of 1 means that the two
50 // input vectors consist of 8 bytes
51 // - the fourth (uint) is the operation to be performed on
52 // the vectors. Its possible values are defined in the
53 // enumeration AlphaVecOps.
55 alpha_pup, // A pack/unpack operation. This function is used to
56 // represent Alpha pack/unpack operations.
57 // It takes 3 parameters:
58 // - the first is an ulong to pack/unpack
59 // - the second (uint) is the size of each component
60 // Valid values are 2 (word) or 4 (longword)
61 // - the third (uint) is the operation to be performed.
62 // Possible values defined in the enumeration
65 alpha_bytezap, // This intrinsic function takes two parameters: a ulong
66 // (64-bit) value and a ubyte value, and returns a ulong.
67 // Each bit in the ubyte corresponds to a byte in the
68 // ulong. If the bit is 0, the byte in the output equals
69 // the corresponding byte in the input, else the byte in
70 // the output is zero.
72 alpha_bytemanip,// This intrinsic function represents all Alpha byte
73 // manipulation instructions. It takes 3 parameters:
74 // - The first two are ulong inputs to operate on
75 // - The third (uint) is the operation to perform.
76 // Possible values defined in the enumeration
79 alpha_dfpbop, // This intrinsic function represents Alpha instructions
80 // that operate on two doubles and return a double. The
81 // first two parameters are the two double values to
82 // operate on, and the third is a uint that specifies the
83 // operation to perform. Its possible values are defined in
84 // the enumeration AlphaFloatingBinaryOps
86 alpha_dfpuop, // This intrinsic function represents operation on a single
87 // double precision floating point value. The first
88 // paramters is the value and the second is the operation.
89 // The possible values for the operations are defined in the
90 // enumeration AlphaFloatingUnaryOps
92 alpha_unordered,// This intrinsic function tests if two double precision
93 // floating point values are unordered. It has two
94 // parameters: the two values to be tested. It return a
95 // boolean true if the two are unordered, else false.
97 alpha_uqtodfp, // A generic function that converts a ulong to a double.
98 // How the conversion is performed is specified by the
99 // second parameter, the possible values for which are
100 // defined in the AlphaUqToDfpOps enumeration
102 alpha_uqtosfp, // A generic function that converts a ulong to a float.
103 // How the conversion is performed is specified by the
104 // second parameter, the possible values for which are
105 // defined in the AlphaUqToSfpOps enumeration
107 alpha_dfptosq, // A generic function that converts double to a long.
108 // How the conversion is performed is specified by the
109 // second parameter, the possible values for which are
110 // defined in the AlphaDfpToSqOps enumeration
112 alpha_sfptosq, // A generic function that converts a float to a long.
113 // How the conversion is performed is specified by the
114 // second parameter, the possible values for which are
115 // defined in the AlphaSfpToSq enumeration