5327d68106adae25b3ad65448f443315a3520ce3
[oota-llvm.git] / include / llvm / CodeGen / RuntimeLibcalls.h
1 //===-- CodeGen/RuntimeLibcall.h - Runtime Library Calls --------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file was developed by the Evan Cheng and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines the enum representing the list of runtime library calls
11 // the backend may emit during code generation.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_CODEGEN_RUNTIMELIBCALLS_H
16 #define LLVM_CODEGEN_RUNTIMELIBCALLS_H
17
18 namespace llvm {
19 namespace RTLIB {
20   /// RTLIB::Libcall enum - This enum defines all of the runtime library calls
21   /// the backend can emit.  The various long double types cannot be merged,
22   /// because 80-bit library functions use "xf" and 128-bit use "tf".
23   ///
24   enum Libcall {
25     // Integer
26     SHL_I32,
27     SHL_I64,
28     SRL_I32,
29     SRL_I64,
30     SRA_I32,
31     SRA_I64,
32     MUL_I32,
33     MUL_I64,
34     SDIV_I32,
35     SDIV_I64,
36     UDIV_I32,
37     UDIV_I64,
38     SREM_I32,
39     SREM_I64,
40     UREM_I32,
41     UREM_I64,
42     NEG_I32,
43     NEG_I64,
44
45     // FLOATING POINT
46     ADD_F32,
47     ADD_F64,
48     ADD_PPCF128,
49     SUB_F32,
50     SUB_F64,
51     SUB_PPCF128,
52     MUL_F32,
53     MUL_F64,
54     MUL_PPCF128,
55     DIV_F32,
56     DIV_F64,
57     DIV_PPCF128,
58     REM_F32,
59     REM_F64,
60     REM_PPCF128,
61     NEG_F32,
62     NEG_F64,
63     POWI_F32,
64     POWI_F64,
65     POWI_F80,
66     POWI_PPCF128,
67     SQRT_F32,
68     SQRT_F64,
69     SQRT_F80,
70     SQRT_PPCF128,
71     SIN_F32,
72     SIN_F64,
73     COS_F32,
74     COS_F64,
75
76     // CONVERSION
77     FPEXT_F32_F64,
78     FPROUND_F64_F32,
79     FPTOSINT_F32_I32,
80     FPTOSINT_F32_I64,
81     FPTOSINT_F64_I32,
82     FPTOSINT_F64_I64,
83     FPTOSINT_F80_I64,
84     FPTOSINT_PPCF128_I64,
85     FPTOUINT_F32_I32,
86     FPTOUINT_F32_I64,
87     FPTOUINT_F64_I32,
88     FPTOUINT_F64_I64,
89     FPTOUINT_F80_I32,
90     FPTOUINT_F80_I64,
91     FPTOUINT_PPCF128_I64,
92     SINTTOFP_I32_F32,
93     SINTTOFP_I32_F64,
94     SINTTOFP_I64_F32,
95     SINTTOFP_I64_F64,
96     SINTTOFP_I64_F80,
97     SINTTOFP_I64_PPCF128,
98     UINTTOFP_I32_F32,
99     UINTTOFP_I32_F64,
100     UINTTOFP_I64_F32,
101     UINTTOFP_I64_F64,
102
103     // COMPARISON
104     OEQ_F32,
105     OEQ_F64,
106     UNE_F32,
107     UNE_F64,
108     OGE_F32,
109     OGE_F64,
110     OLT_F32,
111     OLT_F64,
112     OLE_F32,
113     OLE_F64,
114     OGT_F32,
115     OGT_F64,
116     UO_F32,
117     UO_F64,
118     O_F32,
119     O_F64,
120
121     UNKNOWN_LIBCALL
122   };
123 }
124 }
125
126 #endif