1 //===-- CodeGen/RuntimeLibcall.h - Runtime Library Calls --------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
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.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_CODEGEN_RUNTIMELIBCALLS_H
16 #define LLVM_CODEGEN_RUNTIMELIBCALLS_H
18 #include "llvm/CodeGen/ValueTypes.h"
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".
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.
157 FPTOSINT_PPCF128_I32,
158 FPTOSINT_PPCF128_I64,
159 FPTOSINT_PPCF128_I128,
169 FPTOUINT_PPCF128_I32,
170 FPTOUINT_PPCF128_I64,
171 FPTOUINT_PPCF128_I128,
175 SINTTOFP_I32_PPCF128,
179 SINTTOFP_I64_PPCF128,
183 SINTTOFP_I128_PPCF128,
187 UINTTOFP_I32_PPCF128,
191 UINTTOFP_I64_PPCF128,
195 UINTTOFP_I128_PPCF128,
218 /// getFPEXT - Return the FPEXT_*_* value for the given types, or
219 /// UNKNOWN_LIBCALL if there is none.
220 Libcall getFPEXT(MVT OpVT, MVT RetVT);
222 /// getFPROUND - Return the FPROUND_*_* value for the given types, or
223 /// UNKNOWN_LIBCALL if there is none.
224 Libcall getFPROUND(MVT OpVT, MVT RetVT);
226 /// getFPTOSINT - Return the FPTOSINT_*_* value for the given types, or
227 /// UNKNOWN_LIBCALL if there is none.
228 Libcall getFPTOSINT(MVT OpVT, MVT RetVT);
230 /// getFPTOUINT - Return the FPTOUINT_*_* value for the given types, or
231 /// UNKNOWN_LIBCALL if there is none.
232 Libcall getFPTOUINT(MVT OpVT, MVT RetVT);
234 /// getSINTTOFP - Return the SINTTOFP_*_* value for the given types, or
235 /// UNKNOWN_LIBCALL if there is none.
236 Libcall getSINTTOFP(MVT OpVT, MVT RetVT);
238 /// getUINTTOFP - Return the UINTTOFP_*_* value for the given types, or
239 /// UNKNOWN_LIBCALL if there is none.
240 Libcall getUINTTOFP(MVT OpVT, MVT RetVT);