RuntimeLibcalls.h revision 041cde26eaf4ef6171ff1a44aeedd08d7a1cba6c
1//===-- CodeGen/RuntimeLibcall.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. 12// 13//===----------------------------------------------------------------------===// 14 15#ifndef LLVM_CODEGEN_RUNTIMELIBCALLS_H 16#define LLVM_CODEGEN_RUNTIMELIBCALLS_H 17 18namespace llvm { 19namespace 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 /// When adding PPCF128 functions here, note that their names generally need 25 /// to be overridden for Darwin with the xxx$LDBL128 form. See 26 /// PPCISelLowering.cpp. 27 /// 28 enum Libcall { 29 // Integer 30 SHL_I32, 31 SHL_I64, 32 SRL_I32, 33 SRL_I64, 34 SRA_I32, 35 SRA_I64, 36 MUL_I32, 37 MUL_I64, 38 SDIV_I32, 39 SDIV_I64, 40 UDIV_I32, 41 UDIV_I64, 42 SREM_I32, 43 SREM_I64, 44 UREM_I32, 45 UREM_I64, 46 NEG_I32, 47 NEG_I64, 48 49 // FLOATING POINT 50 ADD_F32, 51 ADD_F64, 52 ADD_F80, 53 ADD_PPCF128, 54 SUB_F32, 55 SUB_F64, 56 SUB_F80, 57 SUB_PPCF128, 58 MUL_F32, 59 MUL_F64, 60 MUL_F80, 61 MUL_PPCF128, 62 DIV_F32, 63 DIV_F64, 64 DIV_F80, 65 DIV_PPCF128, 66 REM_F32, 67 REM_F64, 68 REM_F80, 69 REM_PPCF128, 70 POWI_F32, 71 POWI_F64, 72 POWI_F80, 73 POWI_PPCF128, 74 SQRT_F32, 75 SQRT_F64, 76 SQRT_F80, 77 SQRT_PPCF128, 78 SIN_F32, 79 SIN_F64, 80 SIN_F80, 81 SIN_PPCF128, 82 COS_F32, 83 COS_F64, 84 COS_F80, 85 COS_PPCF128, 86 POW_F32, 87 POW_F64, 88 POW_F80, 89 POW_PPCF128, 90 91 // CONVERSION 92 FPEXT_F32_F64, 93 FPROUND_F64_F32, 94 FPTOSINT_F32_I32, 95 FPTOSINT_F32_I64, 96 FPTOSINT_F32_I128, 97 FPTOSINT_F64_I32, 98 FPTOSINT_F64_I64, 99 FPTOSINT_F64_I128, 100 FPTOSINT_F80_I64, 101 FPTOSINT_F80_I128, 102 FPTOSINT_PPCF128_I32, 103 FPTOSINT_PPCF128_I64, 104 FPTOSINT_PPCF128_I128, 105 FPTOUINT_F32_I32, 106 FPTOUINT_F32_I64, 107 FPTOUINT_F32_I128, 108 FPTOUINT_F64_I32, 109 FPTOUINT_F64_I64, 110 FPTOUINT_F64_I128, 111 FPTOUINT_F80_I32, 112 FPTOUINT_F80_I64, 113 FPTOUINT_F80_I128, 114 FPTOUINT_PPCF128_I32, 115 FPTOUINT_PPCF128_I64, 116 FPTOUINT_PPCF128_I128, 117 SINTTOFP_I32_F32, 118 SINTTOFP_I32_F64, 119 SINTTOFP_I64_F32, 120 SINTTOFP_I64_F64, 121 SINTTOFP_I64_F80, 122 SINTTOFP_I64_PPCF128, 123 SINTTOFP_I128_F32, 124 SINTTOFP_I128_F64, 125 SINTTOFP_I128_F80, 126 SINTTOFP_I128_PPCF128, 127 UINTTOFP_I32_F32, 128 UINTTOFP_I32_F64, 129 UINTTOFP_I64_F32, 130 UINTTOFP_I64_F64, 131 132 // COMPARISON 133 OEQ_F32, 134 OEQ_F64, 135 UNE_F32, 136 UNE_F64, 137 OGE_F32, 138 OGE_F64, 139 OLT_F32, 140 OLT_F64, 141 OLE_F32, 142 OLE_F64, 143 OGT_F32, 144 OGT_F64, 145 UO_F32, 146 UO_F64, 147 O_F32, 148 O_F64, 149 150 UNKNOWN_LIBCALL 151 }; 152} 153} 154 155#endif 156