]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/include/llvm/CodeGen/RuntimeLibcalls.h
Merge ^/head r326936 through r327149.
[FreeBSD/FreeBSD.git] / contrib / llvm / include / llvm / CodeGen / RuntimeLibcalls.h
1 //===-- CodeGen/RuntimeLibcalls.h - Runtime Library Calls -------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // 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, and also some helper functions.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_CODEGEN_RUNTIMELIBCALLS_H
16 #define LLVM_CODEGEN_RUNTIMELIBCALLS_H
17
18 #include "llvm/CodeGen/ValueTypes.h"
19
20 namespace llvm {
21 namespace RTLIB {
22   /// RTLIB::Libcall enum - This enum defines all of the runtime library calls
23   /// the backend can emit.  The various long double types cannot be merged,
24   /// because 80-bit library functions use "xf" and 128-bit use "tf".
25   ///
26   /// When adding PPCF128 functions here, note that their names generally need
27   /// to be overridden for Darwin with the xxx$LDBL128 form.  See
28   /// PPCISelLowering.cpp.
29   ///
30   enum Libcall {
31 #define HANDLE_LIBCALL(code, name) code,
32     #include "RuntimeLibcalls.def"
33 #undef HANDLE_LIBCALL
34   };
35
36   /// getFPEXT - Return the FPEXT_*_* value for the given types, or
37   /// UNKNOWN_LIBCALL if there is none.
38   Libcall getFPEXT(EVT OpVT, EVT RetVT);
39
40   /// getFPROUND - Return the FPROUND_*_* value for the given types, or
41   /// UNKNOWN_LIBCALL if there is none.
42   Libcall getFPROUND(EVT OpVT, EVT RetVT);
43
44   /// getFPTOSINT - Return the FPTOSINT_*_* value for the given types, or
45   /// UNKNOWN_LIBCALL if there is none.
46   Libcall getFPTOSINT(EVT OpVT, EVT RetVT);
47
48   /// getFPTOUINT - Return the FPTOUINT_*_* value for the given types, or
49   /// UNKNOWN_LIBCALL if there is none.
50   Libcall getFPTOUINT(EVT OpVT, EVT RetVT);
51
52   /// getSINTTOFP - Return the SINTTOFP_*_* value for the given types, or
53   /// UNKNOWN_LIBCALL if there is none.
54   Libcall getSINTTOFP(EVT OpVT, EVT RetVT);
55
56   /// getUINTTOFP - Return the UINTTOFP_*_* value for the given types, or
57   /// UNKNOWN_LIBCALL if there is none.
58   Libcall getUINTTOFP(EVT OpVT, EVT RetVT);
59
60   /// Return the SYNC_FETCH_AND_* value for the given opcode and type, or
61   /// UNKNOWN_LIBCALL if there is none.
62   Libcall getSYNC(unsigned Opc, MVT VT);
63
64   /// getMEMCPY_ELEMENT_UNORDERED_ATOMIC - Return
65   /// MEMCPY_ELEMENT_UNORDERED_ATOMIC_* value for the given element size or
66   /// UNKNOW_LIBCALL if there is none.
67   Libcall getMEMCPY_ELEMENT_UNORDERED_ATOMIC(uint64_t ElementSize);
68
69   /// getMEMMOVE_ELEMENT_UNORDERED_ATOMIC - Return
70   /// MEMMOVE_ELEMENT_UNORDERED_ATOMIC_* value for the given element size or
71   /// UNKNOW_LIBCALL if there is none.
72   Libcall getMEMMOVE_ELEMENT_UNORDERED_ATOMIC(uint64_t ElementSize);
73
74   /// getMEMSET_ELEMENT_UNORDERED_ATOMIC - Return
75   /// MEMSET_ELEMENT_UNORDERED_ATOMIC_* value for the given element size or
76   /// UNKNOW_LIBCALL if there is none.
77   Libcall getMEMSET_ELEMENT_UNORDERED_ATOMIC(uint64_t ElementSize);
78
79 }
80 }
81
82 #endif