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