Add sqrt and powi intrinsics for long double.
[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.  "LD" is used for all long double types, since
22   /// these functions will have the same interface on different targets even 
23   /// though the data is not in the same format.
24   ///
25   enum Libcall {
26     // Integer
27     SHL_I32,
28     SHL_I64,
29     SRL_I32,
30     SRL_I64,
31     SRA_I32,
32     SRA_I64,
33     MUL_I32,
34     MUL_I64,
35     SDIV_I32,
36     SDIV_I64,
37     UDIV_I32,
38     UDIV_I64,
39     SREM_I32,
40     SREM_I64,
41     UREM_I32,
42     UREM_I64,
43     NEG_I32,
44     NEG_I64,
45
46     // FLOATING POINT
47     ADD_F32,
48     ADD_F64,
49     SUB_F32,
50     SUB_F64,
51     MUL_F32,
52     MUL_F64,
53     DIV_F32,
54     DIV_F64,
55     REM_F32,
56     REM_F64,
57     NEG_F32,
58     NEG_F64,
59     POWI_F32,
60     POWI_F64,
61     POWI_LD,
62     SQRT_F32,
63     SQRT_F64,
64     SQRT_LD,
65     SIN_F32,
66     SIN_F64,
67     COS_F32,
68     COS_F64,
69
70     // CONVERSION
71     FPEXT_F32_F64,
72     FPROUND_F64_F32,
73     FPTOSINT_F32_I32,
74     FPTOSINT_F32_I64,
75     FPTOSINT_F64_I32,
76     FPTOSINT_F64_I64,
77     FPTOSINT_LD_I64,
78     FPTOUINT_F32_I32,
79     FPTOUINT_F32_I64,
80     FPTOUINT_F64_I32,
81     FPTOUINT_F64_I64,
82     FPTOUINT_LD_I32,
83     FPTOUINT_LD_I64,
84     SINTTOFP_I32_F32,
85     SINTTOFP_I32_F64,
86     SINTTOFP_I64_F32,
87     SINTTOFP_I64_F64,
88     SINTTOFP_I64_LD,
89     UINTTOFP_I32_F32,
90     UINTTOFP_I32_F64,
91     UINTTOFP_I64_F32,
92     UINTTOFP_I64_F64,
93
94     // COMPARISON
95     OEQ_F32,
96     OEQ_F64,
97     UNE_F32,
98     UNE_F64,
99     OGE_F32,
100     OGE_F64,
101     OLT_F32,
102     OLT_F64,
103     OLE_F32,
104     OLE_F64,
105     OGT_F32,
106     OGT_F64,
107     UO_F32,
108     UO_F64,
109     O_F32,
110     O_F64,
111
112     UNKNOWN_LIBCALL
113   };
114 }
115 }
116
117 #endif