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.
167 FPTOSINT_PPCF128_I32,
168 FPTOSINT_PPCF128_I64,
169 FPTOSINT_PPCF128_I128,
181 FPTOUINT_PPCF128_I32,
182 FPTOUINT_PPCF128_I64,
183 FPTOUINT_PPCF128_I128,
187 SINTTOFP_I32_PPCF128,
191 SINTTOFP_I64_PPCF128,
195 SINTTOFP_I128_PPCF128,
199 UINTTOFP_I32_PPCF128,
203 UINTTOFP_I64_PPCF128,
207 UINTTOFP_I128_PPCF128,
227 // EXCEPTION HANDLING
233 /// getFPEXT - Return the FPEXT_*_* value for the given types, or
234 /// UNKNOWN_LIBCALL if there is none.
235 Libcall getFPEXT(MVT OpVT, MVT RetVT);
237 /// getFPROUND - Return the FPROUND_*_* value for the given types, or
238 /// UNKNOWN_LIBCALL if there is none.
239 Libcall getFPROUND(MVT OpVT, MVT RetVT);
241 /// getFPTOSINT - Return the FPTOSINT_*_* value for the given types, or
242 /// UNKNOWN_LIBCALL if there is none.
243 Libcall getFPTOSINT(MVT OpVT, MVT RetVT);
245 /// getFPTOUINT - Return the FPTOUINT_*_* value for the given types, or
246 /// UNKNOWN_LIBCALL if there is none.
247 Libcall getFPTOUINT(MVT OpVT, MVT RetVT);
249 /// getSINTTOFP - Return the SINTTOFP_*_* value for the given types, or
250 /// UNKNOWN_LIBCALL if there is none.
251 Libcall getSINTTOFP(MVT OpVT, MVT RetVT);
253 /// getUINTTOFP - Return the UINTTOFP_*_* value for the given types, or
254 /// UNKNOWN_LIBCALL if there is none.
255 Libcall getUINTTOFP(MVT OpVT, MVT RetVT);