//===-- llvm/RuntimeLibcallList.td - Describe libcalls --------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// include "llvm/IR/RuntimeLibcallsImpl.td" //-------------------------------------------------------------------- // Utility classes //-------------------------------------------------------------------- class DuplicateLibcallImplWithPrefix : RuntimeLibcallImpl; /// Libcall Predicates def isOSDarwin : RuntimeLibcallPredicate<"TT.isOSDarwin()">; def isOSOpenBSD : RuntimeLibcallPredicate<"TT.isOSOpenBSD()">; def isNotOSOpenBSD : RuntimeLibcallPredicate<"!TT.isOSOpenBSD()">; def isOSWindows : RuntimeLibcallPredicate<"TT.isOSWindows()">; def isNotOSWindows : RuntimeLibcallPredicate<"!TT.isOSWindows()">; def isNotOSLinux : RuntimeLibcallPredicate<[{!TT.isOSLinux()}]>; def isNotOSMSVCRT : RuntimeLibcallPredicate<"!TT.isOSMSVCRT()">; def isPS : RuntimeLibcallPredicate<"TT.isPS()">; def isMacOSX : RuntimeLibcallPredicate<[{TT.isMacOSX()}]>; def isNotOSWindowsOrIsCygwinMinGW : RuntimeLibcallPredicate<"!TT.isOSWindows() || TT.isOSCygMing()">; def isWindowsMSVCEnvironment : RuntimeLibcallPredicate< [{TT.isWindowsMSVCEnvironment()}]>; def isNotOSLinuxAndNotOSOpenBSD : RuntimeLibcallPredicate< [{!TT.isOSLinux() && !TT.isOSOpenBSD()}]>; def isNotOSAIXAndNotOSOpenBSD : RuntimeLibcallPredicate< [{!TT.isOSAIX() && !TT.isOSOpenBSD()}]>; def isNotPS : RuntimeLibcallPredicate< [{!TT.isPS()}]>; // OpenBSD uses __guard_local. AIX uses __ssp_canary_word, MSVC/Windows // Itanium uses __security_cookie def hasStackChkFail : RuntimeLibcallPredicate< [{ !TT.isOSOpenBSD() && !TT.isWindowsMSVCEnvironment() && !TT.isWindowsItaniumEnvironment()}]>; def isWindowsMSVCOrItaniumEnvironment : RuntimeLibcallPredicate< [{TT.isWindowsMSVCEnvironment() || TT.isWindowsItaniumEnvironment()}]>; def isAndroid : RuntimeLibcallPredicate<"TT.isAndroid()">; def isGNUEnvironment : RuntimeLibcallPredicate<"TT.isGNUEnvironment()">; def darwinHasSinCosStret : RuntimeLibcallPredicate<"darwinHasSinCosStret(TT)">; def darwinHasExp10 : RuntimeLibcallPredicate<"darwinHasExp10(TT)">; def darwinHasMemsetPattern : RuntimeLibcallPredicate<[{darwinHasMemsetPattern(TT)}]>; def hasExp10 : RuntimeLibcallPredicate<[{!TT.isOSDarwin()}]>; def hasSinCos : RuntimeLibcallPredicate<"hasSinCos(TT)">; // FIXME: Way to combine predicates def hasSinCos_f32_f64 : RuntimeLibcallPredicate<"hasSinCos_f32_f64(TT)">; def ExceptionModelIsNotNone : RuntimeLibcallPredicate< [{ExceptionModel != ExceptionHandling::None}] >; def ExceptionModelHasUnwindResume : RuntimeLibcallPredicate< [{ExceptionModel != ExceptionHandling::None && ExceptionModel != ExceptionHandling::SjLj}] >; def ExceptionModelIsSjLj : RuntimeLibcallPredicate< [{ExceptionModel == ExceptionHandling::SjLj}] >; //-------------------------------------------------------------------- // Declare all kinds of used libcalls //-------------------------------------------------------------------- // Integer foreach IntTy = ["I16", "I32", "I64", "I128"] in { def SHL_#IntTy : RuntimeLibcall; def SRL_#IntTy : RuntimeLibcall; def SRA_#IntTy : RuntimeLibcall; } foreach IntTy = ["I8", "I16", "I32", "I64", "I128"] in { def MUL_#IntTy : RuntimeLibcall; } foreach IntTy = ["I32", "I64", "I128" ] in { def MULO_#IntTy : RuntimeLibcall; } foreach IntTy = ["I8", "I16", "I32", "I64", "I128"] in { def SDIV_#IntTy : RuntimeLibcall; def UDIV_#IntTy : RuntimeLibcall; def SREM_#IntTy : RuntimeLibcall; def UREM_#IntTy : RuntimeLibcall; def SDIVREM_#IntTy : RuntimeLibcall; def UDIVREM_#IntTy : RuntimeLibcall; } foreach IntTy = ["I32", "I64" ] in { def NEG_#IntTy : RuntimeLibcall; } foreach IntTy = ["I32", "I64", "I128"] in { def CTLZ_#IntTy : RuntimeLibcall; def CTPOP_#IntTy : RuntimeLibcall; } foreach FPTy = ["F32", "F64", "F80", "F128", "PPCF128"] in { def ADD_#FPTy : RuntimeLibcall; def FAST_ADD_#FPTy : RuntimeLibcall; def SUB_#FPTy : RuntimeLibcall; def FAST_SUB_#FPTy : RuntimeLibcall; def MUL_#FPTy : RuntimeLibcall; def FAST_MUL_#FPTy : RuntimeLibcall; def DIV_#FPTy : RuntimeLibcall; def FAST_DIV_#FPTy : RuntimeLibcall; def REM_#FPTy : RuntimeLibcall; def FMA_#FPTy : RuntimeLibcall; def POWI_#FPTy : RuntimeLibcall; def SQRT_#FPTy : RuntimeLibcall; def FAST_SQRT_#FPTy : RuntimeLibcall; def CBRT_#FPTy : RuntimeLibcall; def LOG_#FPTy : RuntimeLibcall; def LOG_FINITE_#FPTy : RuntimeLibcall; def LOG2_#FPTy : RuntimeLibcall; def LOG2_FINITE_#FPTy : RuntimeLibcall; def LOG10_#FPTy : RuntimeLibcall; def LOG10_FINITE_#FPTy : RuntimeLibcall; def EXP_#FPTy : RuntimeLibcall; def EXP_FINITE_#FPTy : RuntimeLibcall; def EXP2_#FPTy : RuntimeLibcall; def EXP2_FINITE_#FPTy : RuntimeLibcall; def EXP10_#FPTy : RuntimeLibcall; def EXP10_FINITE_#FPTy : RuntimeLibcall; def SIN_#FPTy : RuntimeLibcall; def COS_#FPTy : RuntimeLibcall; def TAN_#FPTy : RuntimeLibcall; def SINH_#FPTy : RuntimeLibcall; def COSH_#FPTy : RuntimeLibcall; def TANH_#FPTy : RuntimeLibcall; def ASIN_#FPTy : RuntimeLibcall; def ACOS_#FPTy : RuntimeLibcall; def ATAN_#FPTy : RuntimeLibcall; def ATAN2_#FPTy : RuntimeLibcall; def SINCOS_#FPTy : RuntimeLibcall; def REMQUO_#FPTy : RuntimeLibcall; def FDIM_#FPTy : RuntimeLibcall; def CABS_#FPTy : RuntimeLibcall; } foreach FPTy = [ "F32", "F64" ] in { def SINCOS_STRET_#FPTy : RuntimeLibcall; } foreach FPTy = ["F32", "F64", "F80", "F128", "PPCF128"] in { def POW_#FPTy : RuntimeLibcall; def POW_FINITE_#FPTy : RuntimeLibcall; def CEIL_#FPTy : RuntimeLibcall; def TRUNC_#FPTy : RuntimeLibcall; def RINT_#FPTy : RuntimeLibcall; def NEARBYINT_#FPTy : RuntimeLibcall; def ROUND_#FPTy : RuntimeLibcall; def ROUNDEVEN_#FPTy : RuntimeLibcall; def FLOOR_#FPTy : RuntimeLibcall; def COPYSIGN_#FPTy : RuntimeLibcall; def FMIN_#FPTy : RuntimeLibcall; def FMAX_#FPTy : RuntimeLibcall; def FMINIMUM_#FPTy : RuntimeLibcall; def FMAXIMUM_#FPTy : RuntimeLibcall; def FMINIMUM_NUM_#FPTy : RuntimeLibcall; def FMAXIMUM_NUM_#FPTy : RuntimeLibcall; def LROUND_#FPTy : RuntimeLibcall; def LLROUND_#FPTy : RuntimeLibcall; def LRINT_#FPTy : RuntimeLibcall; def LLRINT_#FPTy : RuntimeLibcall; def LDEXP_#FPTy : RuntimeLibcall; def FREXP_#FPTy : RuntimeLibcall; def SINCOSPI_#FPTy : RuntimeLibcall; def MODF_#FPTy : RuntimeLibcall; def NAN_#FPTy : RuntimeLibcall; def NEXTTOWARD_#FPTy : RuntimeLibcall; def REMAINDER_#FPTy : RuntimeLibcall; def SCALBLN_#FPTy : RuntimeLibcall; def SCALBN_#FPTy : RuntimeLibcall; def TGAMMA_#FPTy : RuntimeLibcall; } defvar F32VectorSuffixes = ["V2F32", "V4F32", "V8F32", "V16F32", "NXV4F32"]; defvar F64VectorSuffixes = ["V2F64", "V4F64", "V8F64", "NXV2F64"]; foreach S = !listconcat(F32VectorSuffixes, F64VectorSuffixes) in { def ACOS_#S : RuntimeLibcall; def ACOSH_#S : RuntimeLibcall; def ASIN_#S : RuntimeLibcall; def ASINH_#S : RuntimeLibcall; def ATAN_#S : RuntimeLibcall; def ATAN2_#S : RuntimeLibcall; def ATANH_#S : RuntimeLibcall; def CBRT_#S : RuntimeLibcall; def CEIL_#S : RuntimeLibcall; def COPYSIGN_#S : RuntimeLibcall; def COS_#S : RuntimeLibcall; def COSH_#S : RuntimeLibcall; def COSPI_#S : RuntimeLibcall; def ERFC_#S : RuntimeLibcall; def ERFCINV_#S : RuntimeLibcall; def ERF_#S : RuntimeLibcall; def ERFINV_#S : RuntimeLibcall; def EXP_#S : RuntimeLibcall; def EXP_FINITE_#S : RuntimeLibcall; def EXP10_#S : RuntimeLibcall; def EXP2_#S : RuntimeLibcall; def EXPM1_#S : RuntimeLibcall; def FABS_#S : RuntimeLibcall; def FDIM_#S : RuntimeLibcall; def FLOOR_#S : RuntimeLibcall; def FMA_#S : RuntimeLibcall; def FMAX_#S : RuntimeLibcall; def FMIN_#S : RuntimeLibcall; def REM_#S : RuntimeLibcall; // "fmod" def HYPOT_#S : RuntimeLibcall; def ILOGB_#S : RuntimeLibcall; def LDEXP_#S : RuntimeLibcall; def LGAMMA_#S : RuntimeLibcall; def LOG_#S : RuntimeLibcall; def LOG10_#S : RuntimeLibcall; def LOG1P_#S : RuntimeLibcall; def LOG2_#S : RuntimeLibcall; def LOGB_#S : RuntimeLibcall; def MODF_#S : RuntimeLibcall; def NEXTAFTER_#S : RuntimeLibcall; def POW_#S : RuntimeLibcall; def SINCOS_#S : RuntimeLibcall; def SINCOSPI_#S : RuntimeLibcall; def SIN_#S : RuntimeLibcall; def SINH_#S : RuntimeLibcall; def SINPI_#S : RuntimeLibcall; def SQRT_#S : RuntimeLibcall; def TAN_#S : RuntimeLibcall; def TANH_#S : RuntimeLibcall; def TGAMMA_#S : RuntimeLibcall; def CDFNORM_#S : RuntimeLibcall; def CDFNORMINV_#S : RuntimeLibcall; def ROUND_#S : RuntimeLibcall; } foreach S = F64VectorSuffixes in { def LOG_FINITE_#S : RuntimeLibcall; def POW_FINITE_#S : RuntimeLibcall; } def FEGETENV : RuntimeLibcall; def FESETENV : RuntimeLibcall; def FEGETMODE : RuntimeLibcall; def FESETMODE : RuntimeLibcall; def FPEXT_BF16_F32 : RuntimeLibcall; def FPEXT_F32_PPCF128 : RuntimeLibcall; def FPEXT_F64_PPCF128 : RuntimeLibcall; def FPEXT_F80_F128 : RuntimeLibcall; def FPEXT_F64_F128 : RuntimeLibcall; def FPEXT_F32_F128 : RuntimeLibcall; def FPEXT_F16_F128 : RuntimeLibcall; def FPEXT_F16_F80 : RuntimeLibcall; def FPEXT_F32_F64 : RuntimeLibcall; def FPEXT_F16_F64 : RuntimeLibcall; def FPEXT_F16_F32 : RuntimeLibcall; def FPROUND_F32_F16 : RuntimeLibcall; def FPROUND_F64_F16 : RuntimeLibcall; def FPROUND_F80_F16 : RuntimeLibcall; def FPROUND_F128_F16 : RuntimeLibcall; def FPROUND_PPCF128_F16 : RuntimeLibcall; def FPROUND_F32_BF16 : RuntimeLibcall; def FPROUND_F64_BF16 : RuntimeLibcall; def FPROUND_F80_BF16 : RuntimeLibcall; def FPROUND_F128_BF16 : RuntimeLibcall; def FPROUND_F64_F32 : RuntimeLibcall; def FPROUND_F80_F32 : RuntimeLibcall; def FPROUND_F128_F32 : RuntimeLibcall; def FPROUND_PPCF128_F32 : RuntimeLibcall; def FPROUND_F80_F64 : RuntimeLibcall; def FPROUND_F128_F64 : RuntimeLibcall; def FPROUND_PPCF128_F64 : RuntimeLibcall; def FPROUND_F128_F80 : RuntimeLibcall; def FPTOSINT_F16_I32 : RuntimeLibcall; def FPTOSINT_F16_I64 : RuntimeLibcall; def FPTOSINT_F16_I128 : RuntimeLibcall; def FPTOSINT_F32_I32 : RuntimeLibcall; def FPTOSINT_F32_I64 : RuntimeLibcall; def FPTOSINT_F32_I128 : RuntimeLibcall; def FPTOSINT_F64_I32 : RuntimeLibcall; def FPTOSINT_F64_I64 : RuntimeLibcall; def FPTOSINT_F64_I128 : RuntimeLibcall; def FPTOSINT_F80_I32 : RuntimeLibcall; def FPTOSINT_F80_I64 : RuntimeLibcall; def FPTOSINT_F80_I128 : RuntimeLibcall; def FPTOSINT_F128_I32 : RuntimeLibcall; def FPTOSINT_F128_I64 : RuntimeLibcall; def FPTOSINT_F128_I128 : RuntimeLibcall; def FPTOSINT_PPCF128_I32 : RuntimeLibcall; def FPTOSINT_PPCF128_I64 : RuntimeLibcall; def FPTOSINT_PPCF128_I128 : RuntimeLibcall; def FPTOUINT_F16_I32 : RuntimeLibcall; def FPTOUINT_F16_I64 : RuntimeLibcall; def FPTOUINT_F16_I128 : RuntimeLibcall; def FPTOUINT_F32_I32 : RuntimeLibcall; def FPTOUINT_F32_I64 : RuntimeLibcall; def FPTOUINT_F32_I128 : RuntimeLibcall; def FPTOUINT_F64_I32 : RuntimeLibcall; def FPTOUINT_F64_I64 : RuntimeLibcall; def FPTOUINT_F64_I128 : RuntimeLibcall; def FPTOUINT_F80_I32 : RuntimeLibcall; def FPTOUINT_F80_I64 : RuntimeLibcall; def FPTOUINT_F80_I128 : RuntimeLibcall; def FPTOUINT_F128_I32 : RuntimeLibcall; def FPTOUINT_F128_I64 : RuntimeLibcall; def FPTOUINT_F128_I128 : RuntimeLibcall; def FPTOUINT_PPCF128_I32 : RuntimeLibcall; def FPTOUINT_PPCF128_I64 : RuntimeLibcall; def FPTOUINT_PPCF128_I128 : RuntimeLibcall; def SINTTOFP_I32_F16 : RuntimeLibcall; def SINTTOFP_I32_F32 : RuntimeLibcall; def SINTTOFP_I32_F64 : RuntimeLibcall; def SINTTOFP_I32_F80 : RuntimeLibcall; def SINTTOFP_I32_F128 : RuntimeLibcall; def SINTTOFP_I32_PPCF128 : RuntimeLibcall; def SINTTOFP_I64_BF16 : RuntimeLibcall; def SINTTOFP_I64_F16 : RuntimeLibcall; def SINTTOFP_I64_F32 : RuntimeLibcall; def SINTTOFP_I64_F64 : RuntimeLibcall; def SINTTOFP_I64_F80 : RuntimeLibcall; def SINTTOFP_I64_F128 : RuntimeLibcall; def SINTTOFP_I64_PPCF128 : RuntimeLibcall; def SINTTOFP_I128_F16 : RuntimeLibcall; def SINTTOFP_I128_F32 : RuntimeLibcall; def SINTTOFP_I128_F64 : RuntimeLibcall; def SINTTOFP_I128_F80 : RuntimeLibcall; def SINTTOFP_I128_F128 : RuntimeLibcall; def SINTTOFP_I128_PPCF128 : RuntimeLibcall; def UINTTOFP_I32_F16 : RuntimeLibcall; def UINTTOFP_I32_F32 : RuntimeLibcall; def UINTTOFP_I32_F64 : RuntimeLibcall; def UINTTOFP_I32_F80 : RuntimeLibcall; def UINTTOFP_I32_F128 : RuntimeLibcall; def UINTTOFP_I32_PPCF128 : RuntimeLibcall; def UINTTOFP_I64_BF16 : RuntimeLibcall; def UINTTOFP_I64_F16 : RuntimeLibcall; def UINTTOFP_I64_F32 : RuntimeLibcall; def UINTTOFP_I64_F64 : RuntimeLibcall; def UINTTOFP_I64_F80 : RuntimeLibcall; def UINTTOFP_I64_F128 : RuntimeLibcall; def UINTTOFP_I64_PPCF128 : RuntimeLibcall; def UINTTOFP_I128_F16 : RuntimeLibcall; def UINTTOFP_I128_F32 : RuntimeLibcall; def UINTTOFP_I128_F64 : RuntimeLibcall; def UINTTOFP_I128_F80 : RuntimeLibcall; def UINTTOFP_I128_F128 : RuntimeLibcall; def UINTTOFP_I128_PPCF128 : RuntimeLibcall; def CONVERT_F128_PPCF128 : RuntimeLibcall; def CONVERT_PPCF128_F128 : RuntimeLibcall; // Comparisons foreach FPTy = ["F32", "F64", "F128", "PPCF128"] in { def OEQ_#FPTy : RuntimeLibcall; def UNE_#FPTy : RuntimeLibcall; def OGE_#FPTy : RuntimeLibcall; def OLT_#FPTy : RuntimeLibcall; def OLE_#FPTy : RuntimeLibcall; def OGT_#FPTy : RuntimeLibcall; def UO_#FPTy : RuntimeLibcall; } // Memory def MEMCMP : RuntimeLibcall; def MEMCPY : RuntimeLibcall; def MEMCPY_CHK : RuntimeLibcall; def MEMMOVE : RuntimeLibcall; def MEMMOVE_CHK : RuntimeLibcall; def MEMSET : RuntimeLibcall; def MEMSET_CHK : RuntimeLibcall; def MALLOC : RuntimeLibcall; def CALLOC : RuntimeLibcall; def FREE : RuntimeLibcall; def BZERO : RuntimeLibcall; def STRLEN : RuntimeLibcall; // Element-wise unordered-atomic memory of different sizes foreach MemSize = [1, 2, 4, 8, 16] in { def MEMCPY_ELEMENT_UNORDERED_ATOMIC_#MemSize : RuntimeLibcall; def MEMMOVE_ELEMENT_UNORDERED_ATOMIC_#MemSize : RuntimeLibcall; def MEMSET_ELEMENT_UNORDERED_ATOMIC_#MemSize : RuntimeLibcall; } // Exception handling def UNWIND_RESUME : RuntimeLibcall; def UNWIND_REGISTER : RuntimeLibcall; def UNWIND_UNREGISTER : RuntimeLibcall; def UNWIND_CALL_PERSONALITY : RuntimeLibcall; def CXA_END_CLEANUP : RuntimeLibcall; // Note: there are two sets of atomics libcalls; see // for more info on the // difference between them. // Atomic '__sync_*' libcalls. defset list LibCalls__sync = { foreach MemSize = [1, 2, 4, 8, 16] in { def SYNC_VAL_COMPARE_AND_SWAP_#MemSize : RuntimeLibcall; def SYNC_LOCK_TEST_AND_SET_#MemSize : RuntimeLibcall; def SYNC_FETCH_AND_ADD_#MemSize : RuntimeLibcall; def SYNC_FETCH_AND_SUB_#MemSize : RuntimeLibcall; def SYNC_FETCH_AND_AND_#MemSize : RuntimeLibcall; def SYNC_FETCH_AND_OR_#MemSize : RuntimeLibcall; def SYNC_FETCH_AND_XOR_#MemSize : RuntimeLibcall; def SYNC_FETCH_AND_NAND_#MemSize : RuntimeLibcall; def SYNC_FETCH_AND_MAX_#MemSize : RuntimeLibcall; def SYNC_FETCH_AND_UMAX_#MemSize : RuntimeLibcall; def SYNC_FETCH_AND_MIN_#MemSize : RuntimeLibcall; def SYNC_FETCH_AND_UMIN_#MemSize : RuntimeLibcall; } } defset list LibCalls__atomic = { // Atomic `__atomic_*' libcalls. foreach MemSize = ["", "_1", "_2", "_4", "_8", "_16"] in { def ATOMIC_LOAD#MemSize : RuntimeLibcall; def ATOMIC_STORE#MemSize : RuntimeLibcall; def ATOMIC_EXCHANGE#MemSize : RuntimeLibcall; def ATOMIC_COMPARE_EXCHANGE#MemSize : RuntimeLibcall; } foreach MemSize = [1, 2, 4, 8, 16] in { def ATOMIC_FETCH_ADD_#MemSize : RuntimeLibcall; def ATOMIC_FETCH_SUB_#MemSize : RuntimeLibcall; def ATOMIC_FETCH_AND_#MemSize : RuntimeLibcall; def ATOMIC_FETCH_OR_#MemSize : RuntimeLibcall; def ATOMIC_FETCH_XOR_#MemSize : RuntimeLibcall; def ATOMIC_FETCH_NAND_#MemSize : RuntimeLibcall; } } multiclass AtomicOrderSizeLibcall { def _RELAX : RuntimeLibcall; def _ACQ : RuntimeLibcall; def _REL : RuntimeLibcall; def _ACQ_REL : RuntimeLibcall; } multiclass AtomicOrderSizeLibcallImpl { def _relax : RuntimeLibcallImpl(ProvidesBase#"_RELAX")>; def _acq : RuntimeLibcallImpl(ProvidesBase#"_ACQ")>; def _rel : RuntimeLibcallImpl(ProvidesBase#"_REL")>; def _acq_rel : RuntimeLibcallImpl(ProvidesBase#"_ACQ_REL")>; } // Out-of-line atomics libcalls defset list LibCalls__OutOfLineAtomic = { foreach MemSize = [1, 2, 4, 8, 16] in { defm OUTLINE_ATOMIC_CAS#MemSize : AtomicOrderSizeLibcall; defm OUTLINE_ATOMIC_SWP#MemSize : AtomicOrderSizeLibcall; defm OUTLINE_ATOMIC_LDADD#MemSize : AtomicOrderSizeLibcall; defm OUTLINE_ATOMIC_LDSET#MemSize : AtomicOrderSizeLibcall; defm OUTLINE_ATOMIC_LDCLR#MemSize : AtomicOrderSizeLibcall; defm OUTLINE_ATOMIC_LDEOR#MemSize : AtomicOrderSizeLibcall; } } // Stack Protector Fail def STACKPROTECTOR_CHECK_FAIL : RuntimeLibcall; def STACK_SMASH_HANDLER : RuntimeLibcall; // Safe stack def SAFESTACK_POINTER_ADDRESS : RuntimeLibcall; // Really a global variable, not a function def SAFESTACK_UNSAFE_STACK_PTR : RuntimeLibcall; def STACK_PROBE : RuntimeLibcall; def SECURITY_CHECK_COOKIE : RuntimeLibcall; // Deoptimization def DEOPTIMIZE : RuntimeLibcall; // Return address def RETURN_ADDRESS : RuntimeLibcall; // GPU profiling def PROFILE_INSTRUMENT_GPU : RuntimeLibcall; // Clear cache def CLEAR_CACHE : RuntimeLibcall; def RISCV_FLUSH_ICACHE : RuntimeLibcall; // Mips16 calls def MIPS16_RET_DC : RuntimeLibcall; def MIPS16_RET_DF : RuntimeLibcall; def MIPS16_RET_SC : RuntimeLibcall; def MIPS16_RET_SF : RuntimeLibcall; multiclass LibmLongDoubleLibCall { def NAME#"_f128" : RuntimeLibcallImpl(libcall_basename#"_F128"), rtname>; def NAME#"_ppcf128" : RuntimeLibcallImpl(libcall_basename#"_PPCF128"), rtname>; def NAME#"_f80" : RuntimeLibcallImpl(libcall_basename#"_F80"), rtname>; } // AArch64 calls def SC_MEMCPY : RuntimeLibcall; def SC_MEMMOVE : RuntimeLibcall; def SC_MEMSET : RuntimeLibcall; def SC_MEMCHR: RuntimeLibcall; // AArch64 SME ABI calls def SMEABI_SME_STATE : RuntimeLibcall; def SMEABI_TPIDR2_SAVE : RuntimeLibcall; def SMEABI_ZA_DISABLE : RuntimeLibcall; def SMEABI_TPIDR2_RESTORE : RuntimeLibcall; def SMEABI_GET_CURRENT_VG : RuntimeLibcall; def SMEABI_SME_STATE_SIZE : RuntimeLibcall; def SMEABI_SME_SAVE : RuntimeLibcall; def SMEABI_SME_RESTORE : RuntimeLibcall; // ARM EABI calls def AEABI_MEMCPY4 : RuntimeLibcall; // Align 4 def AEABI_MEMCPY8 : RuntimeLibcall; // Align 8 def AEABI_MEMMOVE4 : RuntimeLibcall; def AEABI_MEMMOVE8 : RuntimeLibcall; def AEABI_MEMSET4 : RuntimeLibcall; def AEABI_MEMSET8 : RuntimeLibcall; def AEABI_MEMCLR : RuntimeLibcall; def AEABI_MEMCLR4 : RuntimeLibcall; def AEABI_MEMCLR8 : RuntimeLibcall; def AEABI_UREAD4 : RuntimeLibcall; def AEABI_UREAD8 : RuntimeLibcall; def AEABI_UWRITE4 : RuntimeLibcall; def AEABI_UWRITE8 : RuntimeLibcall; // Hexagon calls def HEXAGON_MEMCPY_LIKELY_ALIGNED_MIN32BYTES_MULT8BYTES : RuntimeLibcall; def HEXAGON_VOLATILE_MEMCPY : RuntimeLibcall; // XCore calls def MEMCPY_ALIGN_4 : RuntimeLibcall; // Objective-C calls def OBJC_AUTORELEASE : RuntimeLibcall; def OBJC_AUTORELEASEPOOLPOP : RuntimeLibcall; def OBJC_AUTORELEASEPOOLPUSH : RuntimeLibcall; def OBJC_AUTORELEASERETURNVALUE : RuntimeLibcall; def OBJC_COPYWEAK : RuntimeLibcall; def OBJC_DESTROYWEAK : RuntimeLibcall; def OBJC_INITWEAK : RuntimeLibcall; def OBJC_LOADWEAK : RuntimeLibcall; def OBJC_LOADWEAKRETAINED : RuntimeLibcall; def OBJC_MOVEWEAK : RuntimeLibcall; def OBJC_RELEASE : RuntimeLibcall; def OBJC_RETAIN : RuntimeLibcall; def OBJC_RETAINAUTORELEASE : RuntimeLibcall; def OBJC_RETAINAUTORELEASERETURNVALUE : RuntimeLibcall; def OBJC_RETAINAUTORELEASEDRETURNVALUE : RuntimeLibcall; def OBJC_CLAIMAUTORELEASEDRETURNVALUE : RuntimeLibcall; def OBJC_RETAINBLOCK : RuntimeLibcall; def OBJC_STORESTRONG : RuntimeLibcall; def OBJC_STOREWEAK : RuntimeLibcall; def OBJC_UNSAFECLAIMAUTORELEASEDRETURNVALUE : RuntimeLibcall; def OBJC_RETAINEDOBJECT : RuntimeLibcall; def OBJC_UNRETAINEDOBJECT : RuntimeLibcall; def OBJC_UNRETAINEDPOINTER : RuntimeLibcall; def OBJC_RETAIN_AUTORELEASE : RuntimeLibcall; def OBJC_SYNC_ENTER : RuntimeLibcall; def OBJC_SYNC_EXIT : RuntimeLibcall; def ABORT : RuntimeLibcall; def ABS : RuntimeLibcall; def ACCESS : RuntimeLibcall; def ALIGNED_ALLOC : RuntimeLibcall; def ATEXIT : RuntimeLibcall; def ATOF : RuntimeLibcall; def ATOI : RuntimeLibcall; def ATOL : RuntimeLibcall; def ATOLL : RuntimeLibcall; def BCMP : RuntimeLibcall; def BCOPY : RuntimeLibcall; def CHMOD : RuntimeLibcall; def CHOWN : RuntimeLibcall; def CLEARERR : RuntimeLibcall; def CLOSEDIR : RuntimeLibcall; def CTERMID : RuntimeLibcall; def CXA_ATEXIT : RuntimeLibcall; def CXA_GUARD_ABORT : RuntimeLibcall; def CXA_GUARD_ACQUIRE : RuntimeLibcall; def CXA_GUARD_RELEASE : RuntimeLibcall; def CXA_THROW : RuntimeLibcall; def DUNDER_ISOC99_SCANF : RuntimeLibcall; def DUNDER_ISOC99_SSCANF : RuntimeLibcall; def DUNDER_STRDUP : RuntimeLibcall; def DUNDER_STRNDUP : RuntimeLibcall; def DUNDER_STRTOK_R : RuntimeLibcall; def ENUM_VARIANT : RuntimeLibcall; def EXECL : RuntimeLibcall; def EXECLE : RuntimeLibcall; def EXECLP : RuntimeLibcall; def EXECV : RuntimeLibcall; def EXECVE : RuntimeLibcall; def EXECVP : RuntimeLibcall; def EXECVPE : RuntimeLibcall; def EXIT : RuntimeLibcall; def FCLOSE : RuntimeLibcall; def FDOPEN : RuntimeLibcall; def FEOF : RuntimeLibcall; def FERROR : RuntimeLibcall; def FFLUSH : RuntimeLibcall; def FFS : RuntimeLibcall; def FFSL : RuntimeLibcall; def FFSLL : RuntimeLibcall; def FGETC : RuntimeLibcall; def FGETC_UNLOCKED : RuntimeLibcall; def FGETPOS : RuntimeLibcall; def FGETS : RuntimeLibcall; def FGETS_UNLOCKED : RuntimeLibcall; def FILENO : RuntimeLibcall; def FIPRINTF : RuntimeLibcall; def FLOCKFILE : RuntimeLibcall; def FLS : RuntimeLibcall; def FLSL : RuntimeLibcall; def FLSLL : RuntimeLibcall; def FOPEN : RuntimeLibcall; def FOPEN64 : RuntimeLibcall; def FORK : RuntimeLibcall; def FPRINTF : RuntimeLibcall; def FPUTC : RuntimeLibcall; def FPUTC_UNLOCKED : RuntimeLibcall; def FPUTS : RuntimeLibcall; def FPUTS_UNLOCKED : RuntimeLibcall; def FREAD : RuntimeLibcall; def FREAD_UNLOCKED : RuntimeLibcall; def FSCANF : RuntimeLibcall; def FSEEK : RuntimeLibcall; def FSEEKO : RuntimeLibcall; def FSEEKO64 : RuntimeLibcall; def FSETPOS : RuntimeLibcall; def FSTAT : RuntimeLibcall; def FSTAT64 : RuntimeLibcall; def FSTATVFS : RuntimeLibcall; def FSTATVFS64 : RuntimeLibcall; def FTELL : RuntimeLibcall; def FTELLO : RuntimeLibcall; def FTELLO64 : RuntimeLibcall; def FTRYLOCKFILE : RuntimeLibcall; def FUNLOCKFILE : RuntimeLibcall; def FWRITE : RuntimeLibcall; def FWRITE_UNLOCKED : RuntimeLibcall; def GETC : RuntimeLibcall; def GETCHAR : RuntimeLibcall; def GETCHAR_UNLOCKED : RuntimeLibcall; def GETC_UNLOCKED : RuntimeLibcall; def GETENV : RuntimeLibcall; def GETITIMER : RuntimeLibcall; def GETLOGIN_R : RuntimeLibcall; def GETPWNAM : RuntimeLibcall; def GETS : RuntimeLibcall; def GETTIMEOFDAY : RuntimeLibcall; def HTONL : RuntimeLibcall; def HTONS : RuntimeLibcall; def IPRINTF : RuntimeLibcall; def ISASCII : RuntimeLibcall; def ISDIGIT : RuntimeLibcall; def LABS : RuntimeLibcall; def LCHOWN : RuntimeLibcall; def LLABS : RuntimeLibcall; def LSTAT : RuntimeLibcall; def LSTAT64 : RuntimeLibcall; def MEMALIGN : RuntimeLibcall; def MEMCCPY : RuntimeLibcall; def MEMCCPY_CHK : RuntimeLibcall; def MEMCHR : RuntimeLibcall; def MEMPCPY : RuntimeLibcall; def MEMPCPY_CHK : RuntimeLibcall; def MEMRCHR : RuntimeLibcall; def MEMSET_PATTERN16 : RuntimeLibcall; def MEMSET_PATTERN4 : RuntimeLibcall; def MEMSET_PATTERN8 : RuntimeLibcall; def MKDIR : RuntimeLibcall; def MKTIME : RuntimeLibcall; def MSVC_DELETE_ARRAY_PTR32 : RuntimeLibcall; def MSVC_DELETE_ARRAY_PTR32_INT : RuntimeLibcall; def MSVC_DELETE_ARRAY_PTR32_NOTHROW : RuntimeLibcall; def MSVC_DELETE_ARRAY_PTR64 : RuntimeLibcall; def MSVC_DELETE_ARRAY_PTR64_LONGLONG : RuntimeLibcall; def MSVC_DELETE_ARRAY_PTR64_NOTHROW : RuntimeLibcall; def MSVC_DELETE_PTR32 : RuntimeLibcall; def MSVC_DELETE_PTR32_INT : RuntimeLibcall; def MSVC_DELETE_PTR32_NOTHROW : RuntimeLibcall; def MSVC_DELETE_PTR64 : RuntimeLibcall; def MSVC_DELETE_PTR64_LONGLONG : RuntimeLibcall; def MSVC_DELETE_PTR64_NOTHROW : RuntimeLibcall; def MSVC_NEW_ARRAY_INT : RuntimeLibcall; def MSVC_NEW_ARRAY_INT_NOTHROW : RuntimeLibcall; def MSVC_NEW_ARRAY_LONGLONG : RuntimeLibcall; def MSVC_NEW_ARRAY_LONGLONG_NOTHROW : RuntimeLibcall; def MSVC_NEW_INT : RuntimeLibcall; def MSVC_NEW_INT_NOTHROW : RuntimeLibcall; def MSVC_NEW_LONGLONG : RuntimeLibcall; def MSVC_NEW_LONGLONG_NOTHROW : RuntimeLibcall; def NTOHL : RuntimeLibcall; def NTOHS : RuntimeLibcall; def OPEN : RuntimeLibcall; def OPEN64 : RuntimeLibcall; def OPENDIR : RuntimeLibcall; def PCLOSE : RuntimeLibcall; def PERROR : RuntimeLibcall; def POPEN : RuntimeLibcall; def POSIX_MEMALIGN : RuntimeLibcall; def PREAD : RuntimeLibcall; def PRINTF : RuntimeLibcall; def PUTC : RuntimeLibcall; def PUTCHAR : RuntimeLibcall; def PUTCHAR_UNLOCKED : RuntimeLibcall; def PUTC_UNLOCKED : RuntimeLibcall; def PUTS : RuntimeLibcall; def PVALLOC : RuntimeLibcall; def PWRITE : RuntimeLibcall; def QSORT : RuntimeLibcall; def READ : RuntimeLibcall; def READLINK : RuntimeLibcall; def REALLOC : RuntimeLibcall; def REALLOCARRAY : RuntimeLibcall; def REALLOCF : RuntimeLibcall; def REALPATH : RuntimeLibcall; def REMOVE : RuntimeLibcall; def RENAME : RuntimeLibcall; def REWIND : RuntimeLibcall; def RMDIR : RuntimeLibcall; def SCANF : RuntimeLibcall; def SETBUF : RuntimeLibcall; def SETITIMER : RuntimeLibcall; def SETVBUF : RuntimeLibcall; def SIPRINTF : RuntimeLibcall; def SIZE_RETURNING_NEW : RuntimeLibcall; def SIZE_RETURNING_NEW_ALIGNED : RuntimeLibcall; def SIZE_RETURNING_NEW_ALIGNED_HOT_COLD : RuntimeLibcall; def SIZE_RETURNING_NEW_HOT_COLD : RuntimeLibcall; def SMALL_FPRINTF : RuntimeLibcall; def SMALL_PRINTF : RuntimeLibcall; def SMALL_SPRINTF : RuntimeLibcall; def SNPRINTF : RuntimeLibcall; def SNPRINTF_CHK : RuntimeLibcall; def SPRINTF : RuntimeLibcall; def SPRINTF_CHK : RuntimeLibcall; def SSCANF : RuntimeLibcall; def STAT : RuntimeLibcall; def STAT64 : RuntimeLibcall; def STATVFS : RuntimeLibcall; def STATVFS64 : RuntimeLibcall; def STPCPY : RuntimeLibcall; def STPCPY_CHK : RuntimeLibcall; def STPNCPY : RuntimeLibcall; def STPNCPY_CHK : RuntimeLibcall; def STRCASECMP : RuntimeLibcall; def STRCAT : RuntimeLibcall; def STRCAT_CHK : RuntimeLibcall; def STRCHR : RuntimeLibcall; def STRCMP : RuntimeLibcall; def STRCOLL : RuntimeLibcall; def STRCPY : RuntimeLibcall; def STRCPY_CHK : RuntimeLibcall; def STRCSPN : RuntimeLibcall; def STRDUP : RuntimeLibcall; def STRLCAT : RuntimeLibcall; def STRLCAT_CHK : RuntimeLibcall; def STRLCPY : RuntimeLibcall; def STRLCPY_CHK : RuntimeLibcall; def STRLEN_CHK : RuntimeLibcall; def STRNCASECMP : RuntimeLibcall; def STRNCAT : RuntimeLibcall; def STRNCAT_CHK : RuntimeLibcall; def STRNCMP : RuntimeLibcall; def STRNCPY : RuntimeLibcall; def STRNCPY_CHK : RuntimeLibcall; def STRNDUP : RuntimeLibcall; def STRNLEN : RuntimeLibcall; def STRPBRK : RuntimeLibcall; def STRRCHR : RuntimeLibcall; def STRSPN : RuntimeLibcall; def STRSTR : RuntimeLibcall; def STRTOD : RuntimeLibcall; def STRTOF : RuntimeLibcall; def STRTOK : RuntimeLibcall; def STRTOK_R : RuntimeLibcall; def STRTOL : RuntimeLibcall; def STRTOLD : RuntimeLibcall; def STRTOLL : RuntimeLibcall; def STRTOUL : RuntimeLibcall; def STRTOULL : RuntimeLibcall; def STRXFRM : RuntimeLibcall; def SYSTEM : RuntimeLibcall; def TERMINATE : RuntimeLibcall; def TIMES : RuntimeLibcall; def TMPFILE : RuntimeLibcall; def TMPFILE64 : RuntimeLibcall; def TOASCII : RuntimeLibcall; def UNAME : RuntimeLibcall; def UNDER_IO_GETC : RuntimeLibcall; def UNDER_IO_PUTC : RuntimeLibcall; def UNGETC : RuntimeLibcall; def UNLINK : RuntimeLibcall; def UNSETENV : RuntimeLibcall; def UTIME : RuntimeLibcall; def UTIMES : RuntimeLibcall; def VALLOC : RuntimeLibcall; def VEC_CALLOC : RuntimeLibcall; def VEC_FREE : RuntimeLibcall; def VEC_MALLOC : RuntimeLibcall; def VEC_REALLOC : RuntimeLibcall; def VFPRINTF : RuntimeLibcall; def VFSCANF : RuntimeLibcall; def VPRINTF : RuntimeLibcall; def VSCANF : RuntimeLibcall; def VSNPRINTF : RuntimeLibcall; def VSNPRINTF_CHK : RuntimeLibcall; def VSPRINTF : RuntimeLibcall; def VSPRINTF_CHK : RuntimeLibcall; def VSSCANF : RuntimeLibcall; def WCSLEN : RuntimeLibcall; def WRITE : RuntimeLibcall; def ZDAPV : RuntimeLibcall; def ZDAPVJ : RuntimeLibcall; def ZDAPVJST11ALIGN_VAL_T : RuntimeLibcall; def ZDAPVM : RuntimeLibcall; def ZDAPVMST11ALIGN_VAL_T : RuntimeLibcall; def ZDAPVRKST9NOTHROW_T : RuntimeLibcall; def ZDAPVST11ALIGN_VAL_T : RuntimeLibcall; def ZDAPVST11ALIGN_VAL_TRKST9NOTHROW_T : RuntimeLibcall; def ZDLPV : RuntimeLibcall; def ZDLPVJ : RuntimeLibcall; def ZDLPVJST11ALIGN_VAL_T : RuntimeLibcall; def ZDLPVM : RuntimeLibcall; def ZDLPVMST11ALIGN_VAL_T : RuntimeLibcall; def ZDLPVRKST9NOTHROW_T : RuntimeLibcall; def ZDLPVST11ALIGN_VAL_T : RuntimeLibcall; def ZDLPVST11ALIGN_VAL_TRKST9NOTHROW_T : RuntimeLibcall; def ZNAJ : RuntimeLibcall; def ZNAJRKST9NOTHROW_T : RuntimeLibcall; def ZNAJST11ALIGN_VAL_T : RuntimeLibcall; def ZNAJST11ALIGN_VAL_TRKST9NOTHROW_T : RuntimeLibcall; def ZNAM : RuntimeLibcall; def ZNAM12__HOT_COLD_T : RuntimeLibcall; def ZNAMRKST9NOTHROW_T : RuntimeLibcall; def ZNAMRKST9NOTHROW_T12__HOT_COLD_T : RuntimeLibcall; def ZNAMST11ALIGN_VAL_T : RuntimeLibcall; def ZNAMST11ALIGN_VAL_T12__HOT_COLD_T : RuntimeLibcall; def ZNAMST11ALIGN_VAL_TRKST9NOTHROW_T : RuntimeLibcall; def ZNAMST11ALIGN_VAL_TRKST9NOTHROW_T12__HOT_COLD_T : RuntimeLibcall; def ZNWJ : RuntimeLibcall; def ZNWJRKST9NOTHROW_T : RuntimeLibcall; def ZNWJST11ALIGN_VAL_T : RuntimeLibcall; def ZNWJST11ALIGN_VAL_TRKST9NOTHROW_T : RuntimeLibcall; def ZNWM : RuntimeLibcall; def ZNWM12__HOT_COLD_T : RuntimeLibcall; def ZNWMRKST9NOTHROW_T : RuntimeLibcall; def ZNWMRKST9NOTHROW_T12__HOT_COLD_T : RuntimeLibcall; def ZNWMST11ALIGN_VAL_T : RuntimeLibcall; def ZNWMST11ALIGN_VAL_T12__HOT_COLD_T : RuntimeLibcall; def ZNWMST11ALIGN_VAL_TRKST9NOTHROW_T : RuntimeLibcall; def ZNWMST11ALIGN_VAL_TRKST9NOTHROW_T12__HOT_COLD_T : RuntimeLibcall; def KMPC_ALLOC_SHARED : RuntimeLibcall; def KMPC_FREE_SHARED : RuntimeLibcall; //-------------------------------------------------------------------- // Global variable references //-------------------------------------------------------------------- // // TODO: These are not libcalls and probably should be distinguished // in some way from callable functions. // -------------------------------------------------------------------- def STACK_CHECK_GUARD : RuntimeLibcall; //-------------------------------------------------------------------- // Define implementation default libcalls //-------------------------------------------------------------------- let IsDefault = true in { //-------------------------------------------------------------------- // compiler-rt / libgcc //-------------------------------------------------------------------- def __ashlhi3 : RuntimeLibcallImpl; def __ashlsi3 : RuntimeLibcallImpl; def __ashldi3 : RuntimeLibcallImpl; def __lshrhi3 : RuntimeLibcallImpl; def __lshrsi3 : RuntimeLibcallImpl; def __lshrdi3 : RuntimeLibcallImpl; def __ashrhi3 : RuntimeLibcallImpl; def __ashrsi3 : RuntimeLibcallImpl; def __ashrdi3 : RuntimeLibcallImpl; def __mulqi3 : RuntimeLibcallImpl; def __mulhi3 : RuntimeLibcallImpl; def __mulsi3 : RuntimeLibcallImpl; def __muldi3 : RuntimeLibcallImpl; def __mulosi4 : RuntimeLibcallImpl; def __divqi3 : RuntimeLibcallImpl; def __divhi3 : RuntimeLibcallImpl; def __divsi3 : RuntimeLibcallImpl; def __divdi3 : RuntimeLibcallImpl; def __divti3 : RuntimeLibcallImpl; def __udivqi3 : RuntimeLibcallImpl; def __udivhi3 : RuntimeLibcallImpl; def __udivsi3 : RuntimeLibcallImpl; def __udivdi3 : RuntimeLibcallImpl; def __udivti3 : RuntimeLibcallImpl; def __modqi3 : RuntimeLibcallImpl; def __modhi3 : RuntimeLibcallImpl; def __modsi3 : RuntimeLibcallImpl; def __moddi3 : RuntimeLibcallImpl; def __modti3 : RuntimeLibcallImpl; def __umodqi3 : RuntimeLibcallImpl; def __umodhi3 : RuntimeLibcallImpl; def __umodsi3 : RuntimeLibcallImpl; def __umoddi3 : RuntimeLibcallImpl; def __umodti3 : RuntimeLibcallImpl; def __negsi2 : RuntimeLibcallImpl; def __negdi2 : RuntimeLibcallImpl; def __clzsi2 : RuntimeLibcallImpl; def __clzdi2 : RuntimeLibcallImpl; def __clzti2 : RuntimeLibcallImpl; def __popcountsi2 : RuntimeLibcallImpl; def __popcountdi2 : RuntimeLibcallImpl; def __popcountti2 : RuntimeLibcallImpl; def __addsf3 : RuntimeLibcallImpl; def __adddf3 : RuntimeLibcallImpl; def __addxf3 : RuntimeLibcallImpl; def __addtf3 : RuntimeLibcallImpl; def __gcc_qadd : RuntimeLibcallImpl; def __subsf3 : RuntimeLibcallImpl; def __subdf3 : RuntimeLibcallImpl; def __subxf3 : RuntimeLibcallImpl; def __subtf3 : RuntimeLibcallImpl; def __gcc_qsub : RuntimeLibcallImpl; def __mulsf3 : RuntimeLibcallImpl; def __muldf3 : RuntimeLibcallImpl; def __mulxf3 : RuntimeLibcallImpl; def __multf3 : RuntimeLibcallImpl; def __gcc_qmul : RuntimeLibcallImpl; def __divsf3 : RuntimeLibcallImpl; def __divdf3 : RuntimeLibcallImpl; def __divxf3 : RuntimeLibcallImpl; def __divtf3 : RuntimeLibcallImpl; def __gcc_qdiv : RuntimeLibcallImpl; defset list PowiLibcallImpls = { def __powisf2 : RuntimeLibcallImpl; def __powidf2 : RuntimeLibcallImpl; def __powixf2 : RuntimeLibcallImpl; def __powitf2_f128 : RuntimeLibcallImpl; def __powitf2_ppc128 : RuntimeLibcallImpl; } // Conversion def __extendbfsf2 : RuntimeLibcallImpl; def __gcc_stoq : RuntimeLibcallImpl; def __gcc_dtoq : RuntimeLibcallImpl; def __extendxftf2 : RuntimeLibcallImpl; def __extenddftf2 : RuntimeLibcallImpl; def __extendsftf2 : RuntimeLibcallImpl; def __extendhftf2 : RuntimeLibcallImpl; def __extendhfxf2 : RuntimeLibcallImpl; def __extendsfdf2 : RuntimeLibcallImpl; def __extendhfdf2 : RuntimeLibcallImpl; def __extendhfsf2 : RuntimeLibcallImpl; def __truncsfhf2 : RuntimeLibcallImpl; def __truncdfhf2 : RuntimeLibcallImpl; def __truncxfhf2 : RuntimeLibcallImpl; def __trunctfhf2_f128 : RuntimeLibcallImpl; def __trunctfhf2_ppcf128 : RuntimeLibcallImpl; def __truncsfbf2 : RuntimeLibcallImpl; def __truncdfbf2 : RuntimeLibcallImpl; def __truncxfbf2 : RuntimeLibcallImpl; def __trunctfbf2 : RuntimeLibcallImpl; def __truncdfsf2 : RuntimeLibcallImpl; def __truncxfsf2 : RuntimeLibcallImpl; def __trunctfsf2 : RuntimeLibcallImpl; def __gcc_qtos : RuntimeLibcallImpl; def __truncxfdf2 : RuntimeLibcallImpl; def __trunctfdf2 : RuntimeLibcallImpl; def __gcc_qtod : RuntimeLibcallImpl; def __trunctfxf2 : RuntimeLibcallImpl; def __fixhfsi : RuntimeLibcallImpl; def __fixhfdi : RuntimeLibcallImpl; def __fixhfti : RuntimeLibcallImpl; def __fixsfsi : RuntimeLibcallImpl; def __fixsfdi : RuntimeLibcallImpl; def __fixsfti : RuntimeLibcallImpl; def __fixdfsi : RuntimeLibcallImpl; def __fixdfdi : RuntimeLibcallImpl; def __fixdfti : RuntimeLibcallImpl; def __fixxfsi : RuntimeLibcallImpl; def __fixxfdi : RuntimeLibcallImpl; def __fixxfti : RuntimeLibcallImpl; def __fixtfsi : RuntimeLibcallImpl; def __fixtfdi_f128 : RuntimeLibcallImpl; def __fixtfti_f128 : RuntimeLibcallImpl; def __gcc_qtou : RuntimeLibcallImpl; def __fixtfdi_ppcf128 : RuntimeLibcallImpl; def __fixtfti_ppcf128 : RuntimeLibcallImpl; def __fixunshfsi : RuntimeLibcallImpl; def __fixunshfdi : RuntimeLibcallImpl; def __fixunshfti : RuntimeLibcallImpl; def __fixunssfsi : RuntimeLibcallImpl; def __fixunssfdi : RuntimeLibcallImpl; def __fixunssfti : RuntimeLibcallImpl; def __fixunsdfsi : RuntimeLibcallImpl; def __fixunsdfdi : RuntimeLibcallImpl; def __fixunsdfti : RuntimeLibcallImpl; def __fixunsxfsi : RuntimeLibcallImpl; def __fixunsxfdi : RuntimeLibcallImpl; def __fixunsxfti : RuntimeLibcallImpl; def __fixunstfsi_f128 : RuntimeLibcallImpl; def __fixunstfdi_f128 : RuntimeLibcallImpl; def __fixunstfti_f128 : RuntimeLibcallImpl; def __fixunstfsi_ppcf128 : RuntimeLibcallImpl; def __fixunstfdi_ppcf128 : RuntimeLibcallImpl; def __fixunstfti_ppcf128 : RuntimeLibcallImpl; def __floatsihf : RuntimeLibcallImpl; def __floatsisf : RuntimeLibcallImpl; def __floatsidf : RuntimeLibcallImpl; def __floatsixf : RuntimeLibcallImpl; def __floatsitf : RuntimeLibcallImpl; def __gcc_itoq : RuntimeLibcallImpl; def __floatdibf : RuntimeLibcallImpl; def __floatdihf : RuntimeLibcallImpl; def __floatdisf : RuntimeLibcallImpl; def __floatdidf : RuntimeLibcallImpl; def __floatdixf : RuntimeLibcallImpl; def __floatditf_f128 : RuntimeLibcallImpl; def __floatditf_ppcf128 : RuntimeLibcallImpl; def __floattihf : RuntimeLibcallImpl; def __floattisf : RuntimeLibcallImpl; def __floattidf : RuntimeLibcallImpl; def __floattixf : RuntimeLibcallImpl; def __floattitf_f128 : RuntimeLibcallImpl; def __floattitf_ppcf128 : RuntimeLibcallImpl; def __floatunsihf : RuntimeLibcallImpl; def __floatunsisf : RuntimeLibcallImpl; def __floatunsidf : RuntimeLibcallImpl; def __floatunsixf : RuntimeLibcallImpl; def __floatunsitf : RuntimeLibcallImpl; def __gcc_utoq : RuntimeLibcallImpl; def __floatundibf : RuntimeLibcallImpl; def __floatundihf : RuntimeLibcallImpl; def __floatundisf : RuntimeLibcallImpl; def __floatundidf : RuntimeLibcallImpl; def __floatundixf : RuntimeLibcallImpl; def __floatunditf_f128 : RuntimeLibcallImpl; def __floatunditf_ppcf128 : RuntimeLibcallImpl; def __floatuntihf : RuntimeLibcallImpl; def __floatuntisf : RuntimeLibcallImpl; def __floatuntidf : RuntimeLibcallImpl; def __floatuntixf : RuntimeLibcallImpl; def __floatuntitf_f128 : RuntimeLibcallImpl; def __floatuntitf_ppcf128 : RuntimeLibcallImpl; def __extendkftf2 : RuntimeLibcallImpl; def __trunctfkf2 : RuntimeLibcallImpl; // Comparison def __eqsf2 : RuntimeLibcallImpl; def __eqdf2 : RuntimeLibcallImpl; def __eqtf2 : RuntimeLibcallImpl; def __gcc_qeq : RuntimeLibcallImpl; def __nesf2 : RuntimeLibcallImpl; def __nedf2 : RuntimeLibcallImpl; def __netf2 : RuntimeLibcallImpl; def __gcc_qne : RuntimeLibcallImpl; def __gesf2 : RuntimeLibcallImpl; def __gedf2 : RuntimeLibcallImpl; def __getf2 : RuntimeLibcallImpl; def __gcc_qge : RuntimeLibcallImpl; def __ltsf2 : RuntimeLibcallImpl; def __ltdf2 : RuntimeLibcallImpl; def __lttf2 : RuntimeLibcallImpl; def __gcc_qlt : RuntimeLibcallImpl; def __lesf2 : RuntimeLibcallImpl; def __ledf2 : RuntimeLibcallImpl; def __letf2 : RuntimeLibcallImpl; def __gcc_qle : RuntimeLibcallImpl; def __gtsf2 : RuntimeLibcallImpl; def __gtdf2 : RuntimeLibcallImpl; def __gttf2 : RuntimeLibcallImpl; def __gcc_qgt : RuntimeLibcallImpl; def __unordsf2 : RuntimeLibcallImpl; def __unorddf2 : RuntimeLibcallImpl; def __unordtf2 : RuntimeLibcallImpl; def __gcc_qunord : RuntimeLibcallImpl; // Element-wise unordered-atomic memory of different sizes foreach MemSize = [ 1, 2, 4, 8, 16 ] in { def __llvm_memcpy_element_unordered_atomic_#MemSize : RuntimeLibcallImpl< !cast("MEMCPY_ELEMENT_UNORDERED_ATOMIC_"#MemSize)>; def __llvm_memmove_element_unordered_atomic_#MemSize : RuntimeLibcallImpl< !cast("MEMMOVE_ELEMENT_UNORDERED_ATOMIC_"#MemSize)>; def __llvm_memset_element_unordered_atomic_#MemSize : RuntimeLibcallImpl< !cast("MEMSET_ELEMENT_UNORDERED_ATOMIC_"#MemSize)>; } // Atomic '__sync_*' libcalls. foreach lc = LibCalls__sync in { def __#!tolower(!cast(lc)) : RuntimeLibcallImpl; } // Atomic `__atomic_*' libcalls. foreach lc = LibCalls__atomic in { def __#!tolower(!cast(lc)) : RuntimeLibcallImpl; } // Deoptimization def __llvm_deoptimize : RuntimeLibcallImpl; // Clear cache def __clear_cache : RuntimeLibcallImpl; //-------------------------------------------------------------------- // libm //-------------------------------------------------------------------- def fmodf : RuntimeLibcallImpl; def fmod : RuntimeLibcallImpl; def fmodl_f128 : RuntimeLibcallImpl; def fmodl_f80 : RuntimeLibcallImpl; def fmodl_ppc128 : RuntimeLibcallImpl; def fmaf : RuntimeLibcallImpl; def fma : RuntimeLibcallImpl; defm fmal : LibmLongDoubleLibCall; def sqrtf : RuntimeLibcallImpl; def sqrt : RuntimeLibcallImpl; defm sqrtl : LibmLongDoubleLibCall; def cbrtf : RuntimeLibcallImpl; def cbrt : RuntimeLibcallImpl; defm cbrtl : LibmLongDoubleLibCall; def logf : RuntimeLibcallImpl; def log : RuntimeLibcallImpl; defm logl : LibmLongDoubleLibCall; def __logf_finite : RuntimeLibcallImpl; def __log_finite : RuntimeLibcallImpl; def __logl_finite_f80 : RuntimeLibcallImpl; def __logl_finite_f128 : RuntimeLibcallImpl; def __logl_finite_ppcf128 : RuntimeLibcallImpl; def log2f : RuntimeLibcallImpl; def log2 : RuntimeLibcallImpl; defm log2l : LibmLongDoubleLibCall; def __log2f_finite : RuntimeLibcallImpl; def __log2_finite : RuntimeLibcallImpl; def __log2l_finite_f80 : RuntimeLibcallImpl; def __log2l_finite_f128 : RuntimeLibcallImpl; def __log2l_finite_ppcf128 : RuntimeLibcallImpl; def log10f : RuntimeLibcallImpl; def log10 : RuntimeLibcallImpl; defm log10l : LibmLongDoubleLibCall; def __log10f_finite : RuntimeLibcallImpl; def __log10_finite : RuntimeLibcallImpl; def __log10l_finite_f80 : RuntimeLibcallImpl; def __log10l_finite_f128 : RuntimeLibcallImpl; def __log10l_finite_ppcf128 : RuntimeLibcallImpl; def expf : RuntimeLibcallImpl; def exp : RuntimeLibcallImpl; defm expl : LibmLongDoubleLibCall<"EXP">; def __expf_finite : RuntimeLibcallImpl; def __exp_finite : RuntimeLibcallImpl; def __expl_finite_f80 : RuntimeLibcallImpl; def __expl_finite_f128 : RuntimeLibcallImpl; def __expl_finite_ppcf128 : RuntimeLibcallImpl; def exp2f : RuntimeLibcallImpl; def exp2 : RuntimeLibcallImpl; defm exp2l : LibmLongDoubleLibCall<"EXP2">; def __exp2f_finite : RuntimeLibcallImpl; def __exp2_finite : RuntimeLibcallImpl; def __exp2l_finite_f80 : RuntimeLibcallImpl; def __exp2l_finite_f128 : RuntimeLibcallImpl; def __exp2l_finite_ppcf128 : RuntimeLibcallImpl; def sinf : RuntimeLibcallImpl; def sin : RuntimeLibcallImpl; defm sinl : LibmLongDoubleLibCall; def cosf : RuntimeLibcallImpl; def cos : RuntimeLibcallImpl; defm cosl : LibmLongDoubleLibCall; def tanf : RuntimeLibcallImpl; def tan : RuntimeLibcallImpl; defm tanl : LibmLongDoubleLibCall; def sinhf : RuntimeLibcallImpl; def sinh : RuntimeLibcallImpl; defm sinhl : LibmLongDoubleLibCall; def coshf : RuntimeLibcallImpl; def cosh : RuntimeLibcallImpl; defm coshl : LibmLongDoubleLibCall; def tanhf : RuntimeLibcallImpl; def tanh : RuntimeLibcallImpl; defm tanhl : LibmLongDoubleLibCall; def asinf : RuntimeLibcallImpl; def asin : RuntimeLibcallImpl; defm asinl : LibmLongDoubleLibCall; def acosf : RuntimeLibcallImpl; def acos : RuntimeLibcallImpl; defm acosl : LibmLongDoubleLibCall; def atanf : RuntimeLibcallImpl; def atan : RuntimeLibcallImpl; defm atanl : LibmLongDoubleLibCall; def atan2f : RuntimeLibcallImpl; def atan2 : RuntimeLibcallImpl; defm atan2l : LibmLongDoubleLibCall; def powf : RuntimeLibcallImpl; def pow : RuntimeLibcallImpl; defm powl : LibmLongDoubleLibCall; def __powf_finite : RuntimeLibcallImpl; def __pow_finite : RuntimeLibcallImpl; def __powl_finite_f80 : RuntimeLibcallImpl; def __powl_finite_f128 : RuntimeLibcallImpl; def __powl_finite_ppcf128 : RuntimeLibcallImpl; def ceilf : RuntimeLibcallImpl; def ceil : RuntimeLibcallImpl; defm ceill : LibmLongDoubleLibCall; def truncf : RuntimeLibcallImpl; def trunc : RuntimeLibcallImpl; defm truncl : LibmLongDoubleLibCall; def rintf : RuntimeLibcallImpl; def rint : RuntimeLibcallImpl; defm rintl : LibmLongDoubleLibCall; def nearbyintf : RuntimeLibcallImpl; def nearbyint : RuntimeLibcallImpl; defm nearbyintl : LibmLongDoubleLibCall; def roundf : RuntimeLibcallImpl; def round : RuntimeLibcallImpl; defm roundl : LibmLongDoubleLibCall; def roundevenf : RuntimeLibcallImpl; def roundeven : RuntimeLibcallImpl; defm roundevenl : LibmLongDoubleLibCall; def floorf : RuntimeLibcallImpl; def floor : RuntimeLibcallImpl; defm floorl : LibmLongDoubleLibCall; def copysignf : RuntimeLibcallImpl; def copysign : RuntimeLibcallImpl; defm copysignl : LibmLongDoubleLibCall; def fminf : RuntimeLibcallImpl; def fmin : RuntimeLibcallImpl; defm fminl : LibmLongDoubleLibCall; def fmaxf : RuntimeLibcallImpl; def fmax : RuntimeLibcallImpl; defm fmaxl : LibmLongDoubleLibCall; def fminimumf : RuntimeLibcallImpl; def fminimum : RuntimeLibcallImpl; defm fminimuml : LibmLongDoubleLibCall; def fmaximumf : RuntimeLibcallImpl; def fmaximum : RuntimeLibcallImpl; defm fmaximuml : LibmLongDoubleLibCall; def fminimum_numf : RuntimeLibcallImpl; def fminimum_num : RuntimeLibcallImpl; defm fminimum_numl : LibmLongDoubleLibCall; def fmaximum_numf : RuntimeLibcallImpl; def fmaximum_num : RuntimeLibcallImpl; defm fmaximum_numl : LibmLongDoubleLibCall; def lroundf : RuntimeLibcallImpl; def lround : RuntimeLibcallImpl; defm lroundl : LibmLongDoubleLibCall; def llroundf : RuntimeLibcallImpl; def llround : RuntimeLibcallImpl; defm llroundl : LibmLongDoubleLibCall; def lrintf : RuntimeLibcallImpl; def lrint : RuntimeLibcallImpl; defm lrintl : LibmLongDoubleLibCall; def llrintf : RuntimeLibcallImpl; def llrint : RuntimeLibcallImpl; defm llrintl : LibmLongDoubleLibCall; def ldexpf : RuntimeLibcallImpl; def ldexp : RuntimeLibcallImpl; defm ldexpl : LibmLongDoubleLibCall; def frexpf : RuntimeLibcallImpl; def frexp : RuntimeLibcallImpl; defm frexpl : LibmLongDoubleLibCall; def modff : RuntimeLibcallImpl; def modf : RuntimeLibcallImpl; defm modfl : LibmLongDoubleLibCall; def nanf : RuntimeLibcallImpl; def nan : RuntimeLibcallImpl; defm nanl : LibmLongDoubleLibCall; def nexttowardf : RuntimeLibcallImpl; def nexttoward : RuntimeLibcallImpl; defm nexttowardl : LibmLongDoubleLibCall; def remainderf : RuntimeLibcallImpl; def remainder : RuntimeLibcallImpl; defm remainderl : LibmLongDoubleLibCall; def remquof : RuntimeLibcallImpl; def remquo : RuntimeLibcallImpl; defm remquol : LibmLongDoubleLibCall; def fdimf : RuntimeLibcallImpl; def fdim : RuntimeLibcallImpl; defm fdiml : LibmLongDoubleLibCall; def scalbnf : RuntimeLibcallImpl; def scalbn : RuntimeLibcallImpl; defm scalbnl : LibmLongDoubleLibCall; def scalblnf : RuntimeLibcallImpl; def scalbln : RuntimeLibcallImpl; defm scalblnl : LibmLongDoubleLibCall; def tgammaf : RuntimeLibcallImpl; def tgamma : RuntimeLibcallImpl; defm tgammal : LibmLongDoubleLibCall; // Floating point environment def fegetenv : RuntimeLibcallImpl; def fesetenv : RuntimeLibcallImpl; // Floating point control modes def fegetmode : RuntimeLibcallImpl; def fesetmode : RuntimeLibcallImpl; //-------------------------------------------------------------------- // libc //-------------------------------------------------------------------- // Memory def memcpy : RuntimeLibcallImpl; def memmove : RuntimeLibcallImpl; def memset : RuntimeLibcallImpl; def __memcpy_chk : RuntimeLibcallImpl; def __memmove_chk : RuntimeLibcallImpl; def __memset_chk : RuntimeLibcallImpl; def malloc : RuntimeLibcallImpl; // DSEPass can emit calloc if it finds a pair of malloc/memset def calloc : RuntimeLibcallImpl; def free : RuntimeLibcallImpl; } // End let IsDefault = true def exp10f : RuntimeLibcallImpl; def exp10 : RuntimeLibcallImpl; def exp10l_f80 : RuntimeLibcallImpl; def exp10l_f128 : RuntimeLibcallImpl; def exp10l_ppcf128 : RuntimeLibcallImpl; // Stack Protector Fail def __stack_chk_fail : RuntimeLibcallImpl; //-------------------------------------------------------------------- // Other functions from TargetLibraryInfo // // TODO: These need to be organized by library and added to relevant // systems. /// // -------------------------------------------------------------------- def __2_YAPAXI_Z : RuntimeLibcallImpl; def __2_YAPAXIABUnothrow_t_std___Z : RuntimeLibcallImpl; def __2_YAPEAX_K_Z : RuntimeLibcallImpl; def __2_YAPEAX_KAEBUnothrow_t_std___Z : RuntimeLibcallImpl; def __3_YAXPAX_Z : RuntimeLibcallImpl; def __3_YAXPAXABUnothrow_t_std___Z : RuntimeLibcallImpl; def __3_YAXPAXI_Z : RuntimeLibcallImpl; def __3_YAXPEAX_Z : RuntimeLibcallImpl; def __3_YAXPEAXAEBUnothrow_t_std___Z : RuntimeLibcallImpl; def __3_YAXPEAX_K_Z : RuntimeLibcallImpl; def ___U_YAPAXI_Z : RuntimeLibcallImpl; def ___U_YAPAXIABUnothrow_t_std___Z : RuntimeLibcallImpl; def ___U_YAPEAX_K_Z : RuntimeLibcallImpl; def ___U_YAPEAX_KAEBUnothrow_t_std___Z : RuntimeLibcallImpl; def ___V_YAXPAX_Z : RuntimeLibcallImpl; def ___V_YAXPAXABUnothrow_t_std___Z : RuntimeLibcallImpl; def ___V_YAXPAXI_Z : RuntimeLibcallImpl; def ___V_YAXPEAX_Z : RuntimeLibcallImpl; def ___V_YAXPEAXAEBUnothrow_t_std___Z : RuntimeLibcallImpl; def ___V_YAXPEAX_K_Z : RuntimeLibcallImpl; def _IO_getc : RuntimeLibcallImpl; def _IO_putc : RuntimeLibcallImpl; def _ZdaPv : RuntimeLibcallImpl; def _ZdaPvRKSt9nothrow_t : RuntimeLibcallImpl; def _ZdaPvSt11align_val_t : RuntimeLibcallImpl; def _ZdaPvSt11align_val_tRKSt9nothrow_t : RuntimeLibcallImpl; def _ZdaPvj : RuntimeLibcallImpl; def _ZdaPvjSt11align_val_t : RuntimeLibcallImpl; def _ZdaPvm : RuntimeLibcallImpl; def _ZdaPvmSt11align_val_t : RuntimeLibcallImpl; def _ZdlPv : RuntimeLibcallImpl; def _ZdlPvRKSt9nothrow_t : RuntimeLibcallImpl; def _ZdlPvSt11align_val_t : RuntimeLibcallImpl; def _ZdlPvSt11align_val_tRKSt9nothrow_t : RuntimeLibcallImpl; def _ZdlPvj : RuntimeLibcallImpl; def _ZdlPvjSt11align_val_t : RuntimeLibcallImpl; def _ZdlPvm : RuntimeLibcallImpl; def _ZdlPvmSt11align_val_t : RuntimeLibcallImpl; def _Znaj : RuntimeLibcallImpl; def _ZnajRKSt9nothrow_t : RuntimeLibcallImpl; def _ZnajSt11align_val_t : RuntimeLibcallImpl; def _ZnajSt11align_val_tRKSt9nothrow_t : RuntimeLibcallImpl; def _Znam : RuntimeLibcallImpl; def _Znam12__hot_cold_t : RuntimeLibcallImpl; def _ZnamRKSt9nothrow_t : RuntimeLibcallImpl; def _ZnamRKSt9nothrow_t12__hot_cold_t : RuntimeLibcallImpl; def _ZnamSt11align_val_t : RuntimeLibcallImpl; def _ZnamSt11align_val_t12__hot_cold_t : RuntimeLibcallImpl; def _ZnamSt11align_val_tRKSt9nothrow_t : RuntimeLibcallImpl; def _ZnamSt11align_val_tRKSt9nothrow_t12__hot_cold_t : RuntimeLibcallImpl; def _Znwj : RuntimeLibcallImpl; def _ZnwjRKSt9nothrow_t : RuntimeLibcallImpl; def _ZnwjSt11align_val_t : RuntimeLibcallImpl; def _ZnwjSt11align_val_tRKSt9nothrow_t : RuntimeLibcallImpl; def _Znwm : RuntimeLibcallImpl; def _Znwm12__hot_cold_t : RuntimeLibcallImpl; def _ZnwmRKSt9nothrow_t : RuntimeLibcallImpl; def _ZnwmRKSt9nothrow_t12__hot_cold_t : RuntimeLibcallImpl; def _ZnwmSt11align_val_t : RuntimeLibcallImpl; def _ZnwmSt11align_val_t12__hot_cold_t : RuntimeLibcallImpl; def _ZnwmSt11align_val_tRKSt9nothrow_t : RuntimeLibcallImpl; def _ZnwmSt11align_val_tRKSt9nothrow_t12__hot_cold_t : RuntimeLibcallImpl; def __size_returning_new : RuntimeLibcallImpl; def __size_returning_new_hot_cold : RuntimeLibcallImpl; def __size_returning_new_aligned : RuntimeLibcallImpl; def __size_returning_new_aligned_hot_cold : RuntimeLibcallImpl; def __cxa_atexit : RuntimeLibcallImpl; def atexit : RuntimeLibcallImpl; def abort : RuntimeLibcallImpl; def exit : RuntimeLibcallImpl; def _Exit : RuntimeLibcallImpl; def _ZSt9terminatev : RuntimeLibcallImpl; def __cxa_throw : RuntimeLibcallImpl; def __cxa_guard_abort : RuntimeLibcallImpl; def __cxa_guard_acquire : RuntimeLibcallImpl; def __cxa_guard_release : RuntimeLibcallImpl; def __isoc99_scanf : RuntimeLibcallImpl; def __isoc99_sscanf : RuntimeLibcallImpl; def __kmpc_alloc_shared : RuntimeLibcallImpl; def __kmpc_free_shared : RuntimeLibcallImpl; def __memccpy_chk : RuntimeLibcallImpl; def __mempcpy_chk : RuntimeLibcallImpl; def __small_fprintf : RuntimeLibcallImpl; def __small_printf : RuntimeLibcallImpl; def __small_sprintf : RuntimeLibcallImpl; def __snprintf_chk : RuntimeLibcallImpl; def __sprintf_chk : RuntimeLibcallImpl; def __stpcpy_chk : RuntimeLibcallImpl; def __stpncpy_chk : RuntimeLibcallImpl; def __strcat_chk : RuntimeLibcallImpl; def __strcpy_chk : RuntimeLibcallImpl; def __strdup : RuntimeLibcallImpl; def __strlcat_chk : RuntimeLibcallImpl; def __strlcpy_chk : RuntimeLibcallImpl; def __strlen_chk : RuntimeLibcallImpl; def __strncat_chk : RuntimeLibcallImpl; def __strncpy_chk : RuntimeLibcallImpl; def __strndup : RuntimeLibcallImpl; def __strtok_r : RuntimeLibcallImpl; def __vsnprintf_chk : RuntimeLibcallImpl; def __vsprintf_chk : RuntimeLibcallImpl; def abs : RuntimeLibcallImpl; def access : RuntimeLibcallImpl; def aligned_alloc : RuntimeLibcallImpl; def atof : RuntimeLibcallImpl; def atoi : RuntimeLibcallImpl; def atol : RuntimeLibcallImpl; def atoll : RuntimeLibcallImpl; def bcmp : RuntimeLibcallImpl; def bcopy : RuntimeLibcallImpl; def cabs : RuntimeLibcallImpl; def cabsf : RuntimeLibcallImpl; defm cabsl : LibmLongDoubleLibCall; def chmod : RuntimeLibcallImpl; def chown : RuntimeLibcallImpl; def clearerr : RuntimeLibcallImpl; def closedir : RuntimeLibcallImpl; def ctermid : RuntimeLibcallImpl; def execl : RuntimeLibcallImpl; def execle : RuntimeLibcallImpl; def execlp : RuntimeLibcallImpl; def execv : RuntimeLibcallImpl; def execvP : RuntimeLibcallImpl; def execve : RuntimeLibcallImpl; def execvp : RuntimeLibcallImpl; def execvpe : RuntimeLibcallImpl; def fclose : RuntimeLibcallImpl; def fdopen : RuntimeLibcallImpl; def feof : RuntimeLibcallImpl; def ferror : RuntimeLibcallImpl; def fflush : RuntimeLibcallImpl; def ffs : RuntimeLibcallImpl; def ffsl : RuntimeLibcallImpl; def ffsll : RuntimeLibcallImpl; def fgetc : RuntimeLibcallImpl; def fgetc_unlocked : RuntimeLibcallImpl; def fgetpos : RuntimeLibcallImpl; def fgets : RuntimeLibcallImpl; def fgets_unlocked : RuntimeLibcallImpl; def fileno : RuntimeLibcallImpl; def fiprintf : RuntimeLibcallImpl; def flockfile : RuntimeLibcallImpl; def fls : RuntimeLibcallImpl; def flsl : RuntimeLibcallImpl; def flsll : RuntimeLibcallImpl; def fopen : RuntimeLibcallImpl; def fopen64 : RuntimeLibcallImpl; def fork : RuntimeLibcallImpl; def fprintf : RuntimeLibcallImpl; def fputc : RuntimeLibcallImpl; def fputc_unlocked : RuntimeLibcallImpl; def fputs : RuntimeLibcallImpl; def fputs_unlocked : RuntimeLibcallImpl; def fread : RuntimeLibcallImpl; def fread_unlocked : RuntimeLibcallImpl; def fscanf : RuntimeLibcallImpl; def fseek : RuntimeLibcallImpl; def fseeko : RuntimeLibcallImpl; def fseeko64 : RuntimeLibcallImpl; def fsetpos : RuntimeLibcallImpl; def fstat : RuntimeLibcallImpl; def fstat64 : RuntimeLibcallImpl; def fstatvfs : RuntimeLibcallImpl; def fstatvfs64 : RuntimeLibcallImpl; def ftell : RuntimeLibcallImpl; def ftello : RuntimeLibcallImpl; def ftello64 : RuntimeLibcallImpl; def ftrylockfile : RuntimeLibcallImpl; def funlockfile : RuntimeLibcallImpl; def fwrite : RuntimeLibcallImpl; def fwrite_unlocked : RuntimeLibcallImpl; def getc : RuntimeLibcallImpl; def getc_unlocked : RuntimeLibcallImpl; def getchar : RuntimeLibcallImpl; def getchar_unlocked : RuntimeLibcallImpl; def getenv : RuntimeLibcallImpl; def getitimer : RuntimeLibcallImpl; def getlogin_r : RuntimeLibcallImpl; def getpwnam : RuntimeLibcallImpl; def gets : RuntimeLibcallImpl; def gettimeofday : RuntimeLibcallImpl; def htonl : RuntimeLibcallImpl; def htons : RuntimeLibcallImpl; def iprintf : RuntimeLibcallImpl; def isascii : RuntimeLibcallImpl; def isdigit : RuntimeLibcallImpl; def labs : RuntimeLibcallImpl; def lchown : RuntimeLibcallImpl; def llabs : RuntimeLibcallImpl; def lstat : RuntimeLibcallImpl; def lstat64 : RuntimeLibcallImpl; def memalign : RuntimeLibcallImpl; def memccpy : RuntimeLibcallImpl; def memchr : RuntimeLibcallImpl; def memcmp : RuntimeLibcallImpl; def mempcpy : RuntimeLibcallImpl; def memrchr : RuntimeLibcallImpl; def memset_pattern16 : RuntimeLibcallImpl; def memset_pattern4 : RuntimeLibcallImpl; def memset_pattern8 : RuntimeLibcallImpl; def mkdir : RuntimeLibcallImpl; def mktime : RuntimeLibcallImpl; def ntohl : RuntimeLibcallImpl; def ntohs : RuntimeLibcallImpl; def open : RuntimeLibcallImpl; def open64 : RuntimeLibcallImpl; def opendir : RuntimeLibcallImpl; def pclose : RuntimeLibcallImpl; def perror : RuntimeLibcallImpl; def popen : RuntimeLibcallImpl; def posix_memalign : RuntimeLibcallImpl; def pread : RuntimeLibcallImpl; def printf : RuntimeLibcallImpl; def putc : RuntimeLibcallImpl; def putc_unlocked : RuntimeLibcallImpl; def putchar : RuntimeLibcallImpl; def putchar_unlocked : RuntimeLibcallImpl; def puts : RuntimeLibcallImpl; def pvalloc : RuntimeLibcallImpl; def pwrite : RuntimeLibcallImpl; def qsort : RuntimeLibcallImpl; def read : RuntimeLibcallImpl; def readlink : RuntimeLibcallImpl; def realloc : RuntimeLibcallImpl; def reallocf : RuntimeLibcallImpl; def reallocarray : RuntimeLibcallImpl; def realpath : RuntimeLibcallImpl; def remove : RuntimeLibcallImpl; def rename : RuntimeLibcallImpl; def rewind : RuntimeLibcallImpl; def rmdir : RuntimeLibcallImpl; def scanf : RuntimeLibcallImpl; def setbuf : RuntimeLibcallImpl; def setitimer : RuntimeLibcallImpl; def setvbuf : RuntimeLibcallImpl; def siprintf : RuntimeLibcallImpl; def snprintf : RuntimeLibcallImpl; def sprintf : RuntimeLibcallImpl; def sscanf : RuntimeLibcallImpl; def stat : RuntimeLibcallImpl; def stat64 : RuntimeLibcallImpl; def statvfs : RuntimeLibcallImpl; def statvfs64 : RuntimeLibcallImpl; def stpcpy : RuntimeLibcallImpl; def stpncpy : RuntimeLibcallImpl; def strcasecmp : RuntimeLibcallImpl; def strcat : RuntimeLibcallImpl; def strchr : RuntimeLibcallImpl; def strcmp : RuntimeLibcallImpl; def strcoll : RuntimeLibcallImpl; def strcpy : RuntimeLibcallImpl; def strcspn : RuntimeLibcallImpl; def strdup : RuntimeLibcallImpl; def strlcat : RuntimeLibcallImpl; def strlcpy : RuntimeLibcallImpl; def strlen : RuntimeLibcallImpl; def strncasecmp : RuntimeLibcallImpl; def strncat : RuntimeLibcallImpl; def strncmp : RuntimeLibcallImpl; def strncpy : RuntimeLibcallImpl; def strndup : RuntimeLibcallImpl; def strnlen : RuntimeLibcallImpl; def strpbrk : RuntimeLibcallImpl; def strrchr : RuntimeLibcallImpl; def strspn : RuntimeLibcallImpl; def strstr : RuntimeLibcallImpl; def strtod : RuntimeLibcallImpl; def strtof : RuntimeLibcallImpl; def strtok : RuntimeLibcallImpl; def strtok_r : RuntimeLibcallImpl; def strtol : RuntimeLibcallImpl; def strtold : RuntimeLibcallImpl; def strtoll : RuntimeLibcallImpl; def strtoul : RuntimeLibcallImpl; def strtoull : RuntimeLibcallImpl; def strxfrm : RuntimeLibcallImpl; def system : RuntimeLibcallImpl; def times : RuntimeLibcallImpl; def tmpfile : RuntimeLibcallImpl; def tmpfile64 : RuntimeLibcallImpl; def toascii : RuntimeLibcallImpl; def uname : RuntimeLibcallImpl; def ungetc : RuntimeLibcallImpl; def unlink : RuntimeLibcallImpl; def unsetenv : RuntimeLibcallImpl; def utime : RuntimeLibcallImpl; def utimes : RuntimeLibcallImpl; def valloc : RuntimeLibcallImpl; def vec_calloc : RuntimeLibcallImpl; def vec_free : RuntimeLibcallImpl; def vec_malloc : RuntimeLibcallImpl; def vec_realloc : RuntimeLibcallImpl; def vfprintf : RuntimeLibcallImpl; def vfscanf : RuntimeLibcallImpl; def vprintf : RuntimeLibcallImpl; def vscanf : RuntimeLibcallImpl; def vsnprintf : RuntimeLibcallImpl; def vsprintf : RuntimeLibcallImpl; def vsscanf : RuntimeLibcallImpl; def wcslen : RuntimeLibcallImpl; def write : RuntimeLibcallImpl; //-------------------------------------------------------------------- // compiler-rt/libgcc but 64-bit only, not available by default //-------------------------------------------------------------------- // Exist in libgcc and compiler-rt for 64-bit targets, or if // COMPILER_RT_ENABLE_SOFTWARE_INT128. defset list Int128RTLibcalls = { def __ashlti3 : RuntimeLibcallImpl; def __lshrti3 : RuntimeLibcallImpl; def __ashrti3 : RuntimeLibcallImpl; def __multi3 : RuntimeLibcallImpl; } //-------------------------------------------------------------------- // compiler-rt only, not available by default //-------------------------------------------------------------------- defset list CompilerRTOnlyInt64Libcalls = { def __mulodi4 : RuntimeLibcallImpl; } defset list CompilerRTOnlyInt128Libcalls = { def __muloti4 : RuntimeLibcallImpl; } //-------------------------------------------------------------------- // Define implementation other libcalls //-------------------------------------------------------------------- // TODO: Define other custom names targets use to override def __exp10f : RuntimeLibcallImpl; def __exp10 : RuntimeLibcallImpl; def __sincosf_stret : RuntimeLibcallImpl; def __sincos_stret : RuntimeLibcallImpl; def sincosf : RuntimeLibcallImpl; def sincos : RuntimeLibcallImpl; defm sincosl : LibmLongDoubleLibCall; // Exists in sun math library def sincospif : RuntimeLibcallImpl; def sincospi : RuntimeLibcallImpl; defm sincospil : LibmLongDoubleLibCall; // Exists on macOS def __sincospif : RuntimeLibcallImpl; def __sincospi : RuntimeLibcallImpl; def bzero : RuntimeLibcallImpl; def __bzero : RuntimeLibcallImpl; // Exception handling defset list DefaultExceptionHandlingLibcalls = { def _Unwind_Resume : RuntimeLibcallImpl; def __cxa_end_cleanup : RuntimeLibcallImpl; } defset list SjLjExceptionHandlingLibcalls = { def _Unwind_SjLj_Resume : RuntimeLibcallImpl; def _Unwind_SjLj_Register : RuntimeLibcallImpl; def _Unwind_SjLj_Unregister : RuntimeLibcallImpl; } // Only used on wasm? def _Unwind_CallPersonality : RuntimeLibcallImpl; // Used on OpenBSD def __stack_smash_handler : RuntimeLibcallImpl; def __riscv_flush_icache : RuntimeLibcallImpl; def _chkstk : RuntimeLibcallImpl; def _alloca : RuntimeLibcallImpl; def __chkstk : RuntimeLibcallImpl; def ___chkstk_ms : RuntimeLibcallImpl; def __chkstk_arm64ec : RuntimeLibcallImpl; def __security_check_cookie : RuntimeLibcallImpl; def __security_check_cookie_arm64ec : RuntimeLibcallImpl; // Safe stack. def __safestack_pointer_address : RuntimeLibcallImpl; def __safestack_unsafe_stack_ptr : RuntimeLibcallImpl; //===----------------------------------------------------------------------===// // F128 libm Runtime Libcalls //===----------------------------------------------------------------------===// defset list LibmF128Libcalls = { def logf128 : RuntimeLibcallImpl; def log2f128 : RuntimeLibcallImpl; def log10f128 : RuntimeLibcallImpl; def expf128 : RuntimeLibcallImpl; def exp2f128 : RuntimeLibcallImpl; def exp10f128 : RuntimeLibcallImpl; def sinf128 : RuntimeLibcallImpl; def cosf128 : RuntimeLibcallImpl; def tanf128 : RuntimeLibcallImpl; def tanhf128 : RuntimeLibcallImpl; def sincosf128 : RuntimeLibcallImpl; def powf128 : RuntimeLibcallImpl; def fminf128 : RuntimeLibcallImpl; def fmaxf128 : RuntimeLibcallImpl; def fmodf128 : RuntimeLibcallImpl; def sqrtf128 : RuntimeLibcallImpl; def ceilf128 : RuntimeLibcallImpl; def floorf128 : RuntimeLibcallImpl; def truncf128 : RuntimeLibcallImpl; def roundf128 : RuntimeLibcallImpl; def lroundf128 : RuntimeLibcallImpl; def llroundf128 : RuntimeLibcallImpl; def rintf128 : RuntimeLibcallImpl; def lrintf128 : RuntimeLibcallImpl; def llrintf128 : RuntimeLibcallImpl; def nearbyintf128 : RuntimeLibcallImpl; def fmaf128 : RuntimeLibcallImpl; def frexpf128 : RuntimeLibcallImpl; def cbrtf128 : RuntimeLibcallImpl; def fminimumf128 : RuntimeLibcallImpl; def fmaximumf128 : RuntimeLibcallImpl; def fminimum_numf128 : RuntimeLibcallImpl; def fmaximum_numf128 : RuntimeLibcallImpl; def asinf128 : RuntimeLibcallImpl; def acosf128 : RuntimeLibcallImpl; def atanf128 : RuntimeLibcallImpl; def atan2f128 : RuntimeLibcallImpl; def ldexpf128 : RuntimeLibcallImpl; def roundevenf128 : RuntimeLibcallImpl; def modff128 : RuntimeLibcallImpl; def sinhf128 : RuntimeLibcallImpl; def coshf128 : RuntimeLibcallImpl; def copysignf128 : RuntimeLibcallImpl; } defset list LibmF128FiniteLibcalls = { def __logf128_finite : RuntimeLibcallImpl; def __log2f128_finite : RuntimeLibcallImpl; def __log10f128_finite : RuntimeLibcallImpl; def __expf128_finite : RuntimeLibcallImpl; def __exp2f128_finite : RuntimeLibcallImpl; def __exp10f128_finite : RuntimeLibcallImpl; def __powf128_finite : RuntimeLibcallImpl; } //-------------------------------------------------------------------- // Global variable references //-------------------------------------------------------------------- def __stack_chk_guard : RuntimeLibcallImpl; // Name used on OpenBSD def __guard_local : RuntimeLibcallImpl; // Name used with Windows MSVC def __security_cookie : RuntimeLibcallImpl; // Name used on AIX def __ssp_canary_word : RuntimeLibcallImpl; //===----------------------------------------------------------------------===// // Common Libcall Sets //===----------------------------------------------------------------------===// defvar ExceptionModelCalls = (add LibcallImpls<(add __cxa_end_cleanup), ExceptionModelIsNotNone>, LibcallImpls<(add _Unwind_Resume), ExceptionModelHasUnwindResume>, LibcallImpls<(add SjLjExceptionHandlingLibcalls), ExceptionModelIsSjLj> ); // FIXME: Should move to explicit opt-in to different sets of libcalls // instead of trying to remove from a default set. We have // unreasonable defaults like reporting f80 calls on most targets when // they are relevant to only one. defvar AllDefaultRuntimeLibcallImpls = !filter(entry, !instances(), entry.IsDefault); defvar DefaultRuntimeLibcallImpls_f80 = !filter(entry, AllDefaultRuntimeLibcallImpls, !match(!cast(entry.Provides), "F80")); defvar DefaultRuntimeLibcallImpls_ppcf128 = !filter(entry, AllDefaultRuntimeLibcallImpls, !match(!cast(entry.Provides), "PPCF128")); defvar DefaultRuntimeLibcallImpls_f128 = !filter(entry, AllDefaultRuntimeLibcallImpls, !match(!cast(entry.Provides), "_F128")); // FIXME: Ideally we would just use dags everywhere, but for the // arm64ec case we need iterable lists so we can add the # prefix defvar DefaultRuntimeLibcallImplsBaseList = !listremove( !listremove( !listremove(AllDefaultRuntimeLibcallImpls, Int128RTLibcalls), DefaultRuntimeLibcallImpls_f80), DefaultRuntimeLibcallImpls_ppcf128); defvar DefaultRuntimeLibcallImpls = (add DefaultRuntimeLibcallImplsBaseList, ExceptionModelCalls); /// Default set of libcall impls for 32-bit architectures. defvar DefaultLibcallImpls32 = (add DefaultRuntimeLibcallImpls); /// Default set of libcall impls for 64-bit architectures. defvar DefaultLibcallImpls64 = (add DefaultRuntimeLibcallImpls, Int128RTLibcalls); // TODO: Guessing sincospi added at same time as sincos_stret defvar DarwinSinCosStret = LibcallImpls<(add __sincosf_stret, __sincos_stret, __sincospif, __sincospi), darwinHasSinCosStret>; defvar DarwinExp10 = LibcallImpls<(add __exp10f, __exp10), darwinHasExp10>; defvar DarwinMemsetPattern = LibcallImpls<(add memset_pattern4, memset_pattern8, memset_pattern16), darwinHasMemsetPattern>; defvar MacOSUnlockedIO = LibcallImpls<(add getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked), isMacOSX>; defvar SecurityCheckCookieIfWinMSVC = LibcallImpls<(add __security_check_cookie, __security_cookie), isWindowsMSVCOrItaniumEnvironment>; defvar LibmHasSinCosF32 = LibcallImpls<(add sincosf), hasSinCos>; defvar LibmHasSinCosF64 = LibcallImpls<(add sincos), hasSinCos>; defvar LibmHasSinCosF80 = LibcallImpls<(add sincosl_f80), hasSinCos>; defvar LibmHasSinCosF128 = LibcallImpls<(add sincosl_f128), hasSinCos>; defvar LibmHasSinCosPPCF128 = LibcallImpls<(add sincosl_ppcf128), hasSinCos>; defvar LibmHasExp10F32 = LibcallImpls<(add exp10f), hasExp10>; defvar LibmHasExp10F64 = LibcallImpls<(add exp10), hasExp10>; defvar LibmHasExp10F80 = LibcallImpls<(add exp10l_f80), hasExp10>; defvar LibmHasExp10F128 = LibcallImpls<(add exp10l_f128), hasExp10>; defvar LibmHasExp10PPCF128 = LibcallImpls<(add exp10l_ppcf128), hasExp10>; defvar DefaultLibmExp10 = [ LibmHasExp10F32, LibmHasExp10F64, LibmHasExp10F128 ]; defvar WindowsMathRemovals = [ ldexpf, ldexpl_f80, ldexpl_f128, ldexpl_ppcf128, frexpf, frexpl_f80, frexpl_f128, frexpl_ppcf128 ]; defvar MostPowI = !listremove(PowiLibcallImpls, [__powitf2_f128, __powitf2_ppc128]); defvar WindowsExclusions = !listconcat(WindowsMathRemovals, MostPowI); // Targets which support windows should start with these as a base and // add in calls for other OSes defvar WinDefaultLibcallImplsBaseList = !listremove(DefaultRuntimeLibcallImplsBaseList, WindowsExclusions); defvar WinDefaultLibcallImpls = (add WinDefaultLibcallImplsBaseList, ExceptionModelCalls); defvar LibmHasFrexpF32 = LibcallImpls<(add frexpf), isNotOSWindowsOrIsCygwinMinGW>; defvar LibmHasLdexpF32 = LibcallImpls<(add ldexpf), isNotOSWindowsOrIsCygwinMinGW>; defvar LibmHasFrexpF80 = LibcallImpls<(add frexpl_f80), isNotOSWindowsOrIsCygwinMinGW>; defvar LibmHasLdexpF80 = LibcallImpls<(add ldexpl_f80), isNotOSWindowsOrIsCygwinMinGW>; defvar LibmHasFrexpF128 = LibcallImpls<(add frexpl_f128), isNotOSWindowsOrIsCygwinMinGW>; defvar LibmHasLdexpF128 = LibcallImpls<(add ldexpl_f128), isNotOSWindowsOrIsCygwinMinGW>; defvar has__stack_chk_fail = LibcallImpls<(add __stack_chk_fail), hasStackChkFail>; defvar has__stack_chk_guard = LibcallImpls<(add __stack_chk_guard), hasStackChkFail>; defvar has__stack_smash_handler = LibcallImpls<(add __stack_smash_handler), isOSOpenBSD>; defvar has___guard_local = LibcallImpls<(add __guard_local), isOSOpenBSD>; defvar DefaultStackProtector = (add has__stack_chk_fail, has__stack_chk_guard, has__stack_smash_handler, has___guard_local); defvar LibcSafestackPointerAddress = LibcallImpls<(add __safestack_pointer_address), isAndroid>; // compiler-rt sources suggest this is only available if // (TT.isOSLinux() || TT.isOSFreeBSD() || TT.isOSNetBSD() || // TT.isOSSolaris()), but tests exist for other os targets. defvar DefaultSafeStackGlobals = (add __safestack_unsafe_stack_ptr); //===----------------------------------------------------------------------===// // Objective-C Runtime Libcalls //===----------------------------------------------------------------------===// def objc_autorelease : RuntimeLibcallImpl; def objc_autoreleasePoolPop : RuntimeLibcallImpl; def objc_autoreleasePoolPush : RuntimeLibcallImpl; def objc_autoreleaseReturnValue : RuntimeLibcallImpl; def objc_copyWeak : RuntimeLibcallImpl; def objc_destroyWeak : RuntimeLibcallImpl; def objc_initWeak : RuntimeLibcallImpl; def objc_loadWeak : RuntimeLibcallImpl; def objc_loadWeakRetained : RuntimeLibcallImpl; def objc_moveWeak : RuntimeLibcallImpl; def objc_release : RuntimeLibcallImpl; def objc_retain : RuntimeLibcallImpl; def objc_retainAutorelease : RuntimeLibcallImpl; def objc_retainAutoreleaseReturnValue : RuntimeLibcallImpl; def objc_retainAutoreleasedReturnValue : RuntimeLibcallImpl; def objc_claimAutoreleasedReturnValue : RuntimeLibcallImpl; def objc_retainBlock : RuntimeLibcallImpl; def objc_storeStrong : RuntimeLibcallImpl; def objc_storeWeak : RuntimeLibcallImpl; def objc_unsafeClaimAutoreleasedReturnValue : RuntimeLibcallImpl; def objc_retainedObject : RuntimeLibcallImpl; def objc_unretainedObject : RuntimeLibcallImpl; def objc_unretainedPointer : RuntimeLibcallImpl; def objc_retain_autorelease : RuntimeLibcallImpl; def objc_sync_enter : RuntimeLibcallImpl; def objc_sync_exit : RuntimeLibcallImpl; //===----------------------------------------------------------------------===// // AArch64 Runtime Libcalls //===----------------------------------------------------------------------===// defset list AArch64LibcallImpls = { foreach MemSize = [1, 2, 4, 8, 16] in { defm __aarch64_cas#MemSize : AtomicOrderSizeLibcallImpl<"OUTLINE_ATOMIC_CAS"#MemSize>; } foreach MemSize = [1, 2, 4, 8] in { defm __aarch64_swp#MemSize : AtomicOrderSizeLibcallImpl<"OUTLINE_ATOMIC_SWP"#MemSize>; defm __aarch64_ldadd#MemSize : AtomicOrderSizeLibcallImpl<"OUTLINE_ATOMIC_LDADD"#MemSize>; defm __aarch64_ldset#MemSize : AtomicOrderSizeLibcallImpl<"OUTLINE_ATOMIC_LDSET"#MemSize>; defm __aarch64_ldclr#MemSize : AtomicOrderSizeLibcallImpl<"OUTLINE_ATOMIC_LDCLR"#MemSize>; defm __aarch64_ldeor#MemSize : AtomicOrderSizeLibcallImpl<"OUTLINE_ATOMIC_LDEOR"#MemSize>; } def __arm_sc_memcpy : RuntimeLibcallImpl; def __arm_sc_memmove : RuntimeLibcallImpl; def __arm_sc_memset : RuntimeLibcallImpl; def __arm_sc_memchr : RuntimeLibcallImpl; } // End AArch64LibcallImpls def __arm_sme_state : RuntimeLibcallImpl; def __arm_tpidr2_save : RuntimeLibcallImpl; def __arm_za_disable : RuntimeLibcallImpl; def __arm_tpidr2_restore : RuntimeLibcallImpl; def __arm_get_current_vg : RuntimeLibcallImpl; def __arm_sme_state_size : RuntimeLibcallImpl; def __arm_sme_save : RuntimeLibcallImpl; def __arm_sme_restore : RuntimeLibcallImpl; def SMEABI_LibCalls_PreserveMost_From_X0 : LibcallsWithCC<(add __arm_tpidr2_save, __arm_za_disable, __arm_tpidr2_restore), SMEABI_PreserveMost_From_X0>; def SMEABI_LibCalls_PreserveMost_From_X1 : LibcallsWithCC<(add __arm_get_current_vg, __arm_sme_state_size, __arm_sme_save, __arm_sme_restore), SMEABI_PreserveMost_From_X1>; def SMEABI_LibCalls_PreserveMost_From_X2 : LibcallsWithCC<(add __arm_sme_state), SMEABI_PreserveMost_From_X2>; def isAArch64_ExceptArm64EC : RuntimeLibcallPredicate<"(TT.isAArch64() && !TT.isWindowsArm64EC())">; def isWindowsArm64EC : RuntimeLibcallPredicate<"TT.isWindowsArm64EC()">; def isAArch64_ILP64 : RuntimeLibcallPredicate<"TT.isAArch64(64)">; def AArch64SystemLibrary : SystemRuntimeLibrary< isAArch64_ExceptArm64EC, (add WinDefaultLibcallImpls, LibcallImpls<(add __powisf2, __powidf2), isNotOSMSVCRT>, LibmHasFrexpF32, LibmHasLdexpF32, LibmHasFrexpF128, LibmHasLdexpF128, AArch64LibcallImpls, LibcallImpls<(add Int128RTLibcalls), isAArch64_ILP64>, LibcallImpls<(add bzero), isOSDarwin>, DarwinExp10, DarwinSinCosStret, DarwinMemsetPattern, MacOSUnlockedIO, LibmHasSinCosF32, LibmHasSinCosF64, LibmHasSinCosF128, DefaultLibmExp10, DefaultStackProtector, SecurityCheckCookieIfWinMSVC, LibcallImpls<(add __chkstk), isOSWindows>, SMEABI_LibCalls_PreserveMost_From_X0, SMEABI_LibCalls_PreserveMost_From_X1, SMEABI_LibCalls_PreserveMost_From_X2, DefaultSafeStackGlobals, LibcSafestackPointerAddress) >; // Prepend a # to every name defset list WinArm64ECDefaultRuntimeLibcallImpls = { foreach libcall = WinDefaultLibcallImplsBaseList in { def arm64ec_#libcall : DuplicateLibcallImplWithPrefix; } foreach libcall = AArch64LibcallImpls in { def arm64ec_#libcall : DuplicateLibcallImplWithPrefix; } } def arm64ec___stack_chk_fail : DuplicateLibcallImplWithPrefix<__stack_chk_fail, "#">; defset list WinArm64ECDefaultExceptionHandlingLibcalls = { foreach libcall = DefaultExceptionHandlingLibcalls in { def arm64ec_#libcall : DuplicateLibcallImplWithPrefix; } } defset list WinArm64ECSjLjExceptionHandlingLibcalls = { foreach libcall = SjLjExceptionHandlingLibcalls in { def arm64ec_#libcall : DuplicateLibcallImplWithPrefix; } } defvar ExceptionModelCallsArm64EC = (add LibcallImpls<(add arm64ec___cxa_end_cleanup), ExceptionModelIsNotNone>, LibcallImpls<(add arm64ec__Unwind_Resume), ExceptionModelHasUnwindResume>, LibcallImpls<(add WinArm64ECSjLjExceptionHandlingLibcalls), ExceptionModelIsSjLj> ); def WindowsARM64ECSystemLibrary : SystemRuntimeLibrary, AvailableIf<__stack_chk_guard, hasStackChkFail>, LibcallImpls<(add __security_check_cookie_arm64ec, __security_cookie), isWindowsMSVCEnvironment>, __chkstk_arm64ec, ExceptionModelCallsArm64EC)>; //===----------------------------------------------------------------------===// // AMDGPU Runtime Libcalls //===----------------------------------------------------------------------===// def isAMDGPU : RuntimeLibcallPredicate<"TT.isAMDGPU()">; def __llvm_profile_instrument_gpu : RuntimeLibcallImpl; def AMDGPUSystemLibrary : SystemRuntimeLibrary; //===----------------------------------------------------------------------===// // ARM Runtime Libcalls //===----------------------------------------------------------------------===// def isTargetAEABIAndAAPCS_ABI : RuntimeLibcallPredicate< [{TT.isTargetAEABI() && isAAPCS_ABI(TT, ABIName)}]>; // if (isTargetMachO()) { // if (Subtarget->isThumb() && Subtarget->hasVFP2Base() && // Subtarget->hasARMOps() && !Subtarget->useSoftFloat()) { def __addsf3vfp : RuntimeLibcallImpl; def __subsf3vfp : RuntimeLibcallImpl; def __mulsf3vfp : RuntimeLibcallImpl; def __divsf3vfp : RuntimeLibcallImpl; // Double-precision floating-point arithmetic. def __adddf3vfp : RuntimeLibcallImpl; def __subdf3vfp : RuntimeLibcallImpl; def __muldf3vfp : RuntimeLibcallImpl; def __divdf3vfp : RuntimeLibcallImpl; // Single-precision comparisons. // TODO: Track setcc type def __eqsf2vfp : RuntimeLibcallImpl; // CmpInst::ICMP_NE def __nesf2vfp : RuntimeLibcallImpl; // CmpInst::ICMP_NE def __ltsf2vfp : RuntimeLibcallImpl; // CmpInst::ICMP_NE def __lesf2vfp : RuntimeLibcallImpl; // CmpInst::ICMP_NE def __gesf2vfp : RuntimeLibcallImpl; // CmpInst::ICMP_NE def __gtsf2vfp : RuntimeLibcallImpl; // CmpInst::ICMP_NE def __unordsf2vfp : RuntimeLibcallImpl; // CmpInst::ICMP_NE // Double-precision comparisons. def __eqdf2vfp : RuntimeLibcallImpl; // CmpInst::ICMP_NE def __nedf2vfp : RuntimeLibcallImpl; // CmpInst::ICMP_NE def __ltdf2vfp : RuntimeLibcallImpl; // CmpInst::ICMP_NE def __ledf2vfp : RuntimeLibcallImpl; // CmpInst::ICMP_NE def __gedf2vfp : RuntimeLibcallImpl; // CmpInst::ICMP_NE def __gtdf2vfp : RuntimeLibcallImpl; // CmpInst::ICMP_NE def __unorddf2vfp : RuntimeLibcallImpl; // CmpInst::ICMP_NE // Floating-point to integer conversions. // i64 conversions are done via library routines even when generating VFP // instructions, so use the same ones. def __fixdfsivfp : RuntimeLibcallImpl; def __fixunsdfsivfp : RuntimeLibcallImpl; def __fixsfsivfp : RuntimeLibcallImpl; def __fixunssfsivfp : RuntimeLibcallImpl; // Conversions between floating types. def __truncdfsf2vfp : RuntimeLibcallImpl; def __extendsfdf2vfp : RuntimeLibcallImpl; // Integer to floating-point conversions. // i64 conversions are done via library routines even when generating VFP // instructions, so use the same ones. // FIXME: There appears to be some naming inconsistency in ARM libgcc: // e.g., __floatunsidf vs. __floatunssidfvfp. def __floatsidfvfp : RuntimeLibcallImpl; def __floatunssidfvfp : RuntimeLibcallImpl; def __floatsisfvfp : RuntimeLibcallImpl; def __floatunssisfvfp : RuntimeLibcallImpl; // // RTLIB // if (isAAPCS_ABI() && // (isTargetAEABI() || isTargetGNUAEABI() || // isTargetMuslAEABI() || isTargetAndroid())) { // TODO: Set CallingConv = ARM_AAPCS // Double-precision floating-point arithmetic helper functions // RTABI chapter 4.1.2, Table 2 def __aeabi_dadd : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_ddiv : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_dmul : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_dsub : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS // Unaligned memory access helper functions // RTABI chapter 5.3.3 def __aeabi_uread4 : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_uread8 : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_uwrite4 : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_uwrite8 : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS defvar AEABIOverrides = [ __eqsf2, __eqdf2, __nesf2, __nedf2, __ltsf2, __ltdf2, __lesf2, __ledf2, __gesf2, __gedf2, __gtsf2, __gtdf2, __unordsf2, __unorddf2, __addsf3, __adddf3, __divsf3, __divdf3, __mulsf3, __muldf3, __subsf3, __subdf3, __fixdfsi, __fixunsdfsi, __fixdfdi, __fixunsdfdi, __fixsfsi, __fixunssfsi, __fixsfdi, __fixunssfdi, __floatsidf, __floatunsidf, __floatdidf, __floatundidf, __floatsisf, __floatunsisf, __floatdisf, __floatundisf, __muldi3, __ashldi3, __lshrdi3, __ashrdi3, __divsi3, __udivsi3 // Half conversion cases are a mess and handled separately. // __truncdfsf2, __truncdfhf2, // __extendsfdf2, // __truncsfhf2, __extendhfsf2 ]; // Double-precision floating-point comparison helper functions // RTABI chapter 4.1.2, Table 3 def __aeabi_dcmpeq__oeq : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS, CmpInst::ICMP_NE def __aeabi_dcmpeq__une : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS, CmpInst::ICMP_EQ def __aeabi_dcmplt : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS, CmpInst::ICMP_NE def __aeabi_dcmple : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS, CmpInst::ICMP_NE def __aeabi_dcmpge : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS, CmpInst::ICMP_NE def __aeabi_dcmpgt : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS, CmpInst::ICMP_NE def __aeabi_dcmpun : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS // Single-precision floating-point arithmetic helper functions // RTABI chapter 4.1.2, Table 4 def __aeabi_fadd : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_fdiv : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_fmul : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_fsub : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS // Single-precision floating-point comparison helper functions // RTABI chapter 4.1.2, Table 5 def __aeabi_fcmpeq__oeq : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS, CmpInst::ICMP_NE def __aeabi_fcmpeq__une : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS, CmpInst::ICMP_EQ def __aeabi_fcmplt : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS, CmpInst::ICMP_NE def __aeabi_fcmple : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS, CmpInst::ICMP_NE def __aeabi_fcmpge : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS, CmpInst::ICMP_NE def __aeabi_fcmpgt : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS, CmpInst::ICMP_NE def __aeabi_fcmpun : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS // Floating-point to integer conversions. // RTABI chapter 4.1.2, Table 6 def __aeabi_d2iz : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_d2uiz : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_d2lz : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_d2ulz : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_f2iz : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_f2uiz : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_f2lz : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_f2ulz : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS // Conversions between floating types. // RTABI chapter 4.1.2, Table 7 def __aeabi_d2f : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_d2h : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_f2d : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS // Integer to floating-point conversions. // RTABI chapter 4.1.2, Table 8 def __aeabi_i2d : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_ui2d : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_l2d : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_ul2d : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_i2f : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_ui2f : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_l2f : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_ul2f : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS // Long long helper functions // RTABI chapter 4.2, Table 9 def __aeabi_lmul : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_llsl : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_llsr : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_lasr : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS // Integer division functions // RTABI chapter 4.3.1 def __aeabi_idiv : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_ldivmod : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_uidiv : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_uldivmod : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_idivmod : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_uidivmod : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS // EABI dependent RTLIB // Memory operations // RTABI chapter 4.3.4 def __aeabi_memcpy : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_memcpy4 : RuntimeLibcallImpl; def __aeabi_memcpy8 : RuntimeLibcallImpl; def __aeabi_memmove : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_memmove4 : RuntimeLibcallImpl; def __aeabi_memmove8 : RuntimeLibcallImpl; def __aeabi_memset : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_memset4 : RuntimeLibcallImpl; def __aeabi_memset8 : RuntimeLibcallImpl; def __aeabi_memclr : RuntimeLibcallImpl; def __aeabi_memclr4 : RuntimeLibcallImpl; def __aeabi_memclr8 : RuntimeLibcallImpl; // isTargetWindows() defset list WindowsFPIntCastLibcalls = { def __stoi64 : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS_VFP def __dtoi64 : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS_VFP def __stou64 : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS_VFP def __dtou64 : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS_VFP def __i64tos : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS_VFP def __i64tod : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS_VFP def __u64tos : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS_VFP def __u64tod : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS_VFP } def __rt_sdiv : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __rt_sdiv64 : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __rt_udiv : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __rt_udiv64 : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS // Use divmod compiler-rt calls for iOS 5.0 and later. // isTargetMachO() && // !(isTargetIOS() && isOSVersionLT(5, 0)) def __divmodsi4 : RuntimeLibcallImpl; def __udivmodsi4 : RuntimeLibcallImpl; // FIXME: Change calling convention of FPROUND_F32_F16, // RTLIB::FPROUND_F64_F16, FPEXT_F16_F32 for !Subtarget->isTargetWatchABI()) // In EABI, these functions have an __aeabi_ prefix, but in GNUEABI they have // a __gnu_ prefix (which is the default). // isTargetAEABI() def __aeabi_f2h : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS def __aeabi_h2f : RuntimeLibcallImpl; // CallingConv::ARM_AAPCS // !isTargetMachO() def __gnu_f2h_ieee : RuntimeLibcallImpl; def __gnu_h2f_ieee : RuntimeLibcallImpl; // The half <-> float conversion functions are always soft-float on // non-watchos platforms, but are needed for some targets which use a // hard-float calling convention by default. def ARMHalfConvertLibcallCallingConv : LibcallCallingConv< [{TT.isWatchABI() ? static_cast(DefaultCC) : static_cast(isAAPCS_ABI(TT, ABIName) ? CallingConv::ARM_AAPCS : CallingConv::ARM_APCS)}] >; def ARMLibgccHalfConvertCalls : LibcallImpls<(add __truncsfhf2, __extendhfsf2), RuntimeLibcallPredicate<[{!TT.isTargetAEABI() && TT.isOSBinFormatMachO()}]>> { let CallingConv = ARMHalfConvertLibcallCallingConv; } // FIXME: These conditions are probably bugged. We're using the // default libgcc call when the other cases are replaced. def ARMDoubleToHalfCalls : LibcallImpls<(add __truncdfhf2), RuntimeLibcallPredicate<[{!TT.isTargetAEABI()}]>> { let CallingConv = ARMHalfConvertLibcallCallingConv; } // In EABI, these functions have an __aeabi_ prefix, but in GNUEABI // they have a __gnu_ prefix (which is the default). def EABIHalfConvertCalls : LibcallImpls<(add __aeabi_f2h, __aeabi_h2f), isTargetAEABIAndAAPCS_ABI> { let CallingConv = ARM_AAPCS; } def GNUEABIHalfConvertCalls : LibcallImpls<(add __gnu_f2h_ieee, __gnu_h2f_ieee), RuntimeLibcallPredicate<[{!TT.isOSBinFormatMachO() && !TT.isTargetAEABI()}]>> { let CallingConv = ARMHalfConvertLibcallCallingConv; } def WindowARMDivRemCalls : LibcallImpls< (add __rt_sdiv, __rt_sdiv64, __rt_udiv, __rt_udiv64), isOSWindows> { let CallingConv = ARM_AAPCS; } def WindowARMFPIntCasts : LibcallImpls< (add WindowsFPIntCastLibcalls), isOSWindows> { let CallingConv = ARM_AAPCS_VFP; } // Register based DivRem for AEABI (RTABI 4.2) def AEABIDivRemCalls : LibcallImpls< (add __aeabi_idivmod, __aeabi_ldivmod, __aeabi_uidivmod, __aeabi_uldivmod), RuntimeLibcallPredicate<[{hasAEABILibcalls(TT)}]>> { let CallingConv = ARM_AAPCS; } def AEABICalls : LibcallImpls< (add // Double-precision floating-point arithmetic helper functions // RTABI chapter 4.1.2, Table 2 __aeabi_dadd, __aeabi_ddiv, __aeabi_dmul, __aeabi_dsub, // Double-precision floating-point comparison helper functions // RTABI chapter 4.1.2, Table 3 __aeabi_dcmpeq__oeq, __aeabi_dcmpeq__une, __aeabi_dcmplt, __aeabi_dcmple, __aeabi_dcmpge, __aeabi_dcmpgt, __aeabi_dcmpun, // Single-precision floating-point arithmetic helper functions // RTABI chapter 4.1.2, Table 4 __aeabi_fadd, __aeabi_fdiv, __aeabi_fmul, __aeabi_fsub, // Single-precision floating-point comparison helper functions // RTABI chapter 4.1.2, Table 5 __aeabi_fcmpeq__oeq, __aeabi_fcmpeq__une, __aeabi_fcmplt, __aeabi_fcmple, __aeabi_fcmpge, __aeabi_fcmpgt, __aeabi_fcmpun, // Floating-point to integer conversions. // RTABI chapter 4.1.2, Table 6 __aeabi_d2iz, __aeabi_d2uiz, __aeabi_d2lz, __aeabi_d2ulz, __aeabi_f2iz, __aeabi_f2uiz, __aeabi_f2lz, __aeabi_f2ulz, // Conversions between floating types. // RTABI chapter 4.1.2, Table 7 __aeabi_d2f, __aeabi_f2d, //__aeabi_h2f added separately //__aeabi_f2h added separately __aeabi_d2h, // Integer to floating-point conversions. // RTABI chapter 4.1.2, Table 8 __aeabi_i2d, __aeabi_ui2d, __aeabi_l2d, __aeabi_ul2d, __aeabi_i2f, __aeabi_ui2f, __aeabi_l2f, __aeabi_ul2f, // Long long helper functions // RTABI chapter 4.2, Table 9 __aeabi_lmul, __aeabi_llsl, __aeabi_llsr, __aeabi_lasr, // Integer division functions // RTABI chapter 4.3.1 __aeabi_idiv, __aeabi_uidiv), RuntimeLibcallPredicate<[{hasAEABILibcalls(TT) && isAAPCS_ABI(TT, ABIName)}]>> { let CallingConv = ARM_AAPCS; } // EABI dependent RTLIB, Memory operations // RTABI chapter 4.3.4 def AEABI45MemCalls : LibcallImpls< (add __aeabi_memcpy, __aeabi_memcpy4, __aeabi_memcpy8, __aeabi_memmove, __aeabi_memmove4, __aeabi_memmove8, __aeabi_memset, __aeabi_memset4, __aeabi_memset8, __aeabi_memclr, __aeabi_memclr4, __aeabi_memclr8), RuntimeLibcallPredicate<[{(EABIVersion == EABI::EABI4 || EABIVersion == EABI::EABI5) && hasAEABILibcalls(TT) && isAAPCS_ABI(TT, ABIName)}]>> { let CallingConv = ARM_AAPCS; } // Unaligned Memory read/write operations // RTABI chapter 5.3.3 def AEABIUnalignedMemCalls : LibcallImpls< (add __aeabi_uread4, __aeabi_uread8, __aeabi_uwrite4, __aeabi_uwrite8), RuntimeLibcallPredicate<[{hasAEABILibcalls(TT) && isAAPCS_ABI(TT, ABIName)}]>> { let CallingConv = ARM_AAPCS; } def isARMOrThumb : RuntimeLibcallPredicate<"TT.isARM() || TT.isThumb()">; def ARMSystemLibrary : SystemRuntimeLibrary, LibmHasFrexpF32, LibmHasLdexpF32, LibmHasFrexpF128, LibmHasLdexpF128, WindowARMDivRemCalls, WindowARMFPIntCasts, SecurityCheckCookieIfWinMSVC, LibcallImpls<(add __chkstk), isOSWindows>, AEABIDivRemCalls, DarwinSinCosStret, DarwinExp10, DarwinMemsetPattern, LibmHasSinCosF32, LibmHasSinCosF64, LibmHasSinCosF128, DefaultLibmExp10, LibcSafestackPointerAddress, AEABICalls, AEABI45MemCalls, AEABIUnalignedMemCalls, ARMLibgccHalfConvertCalls, EABIHalfConvertCalls, GNUEABIHalfConvertCalls, ARMDoubleToHalfCalls, LibcallImpls<(add AEABIOverrides), RuntimeLibcallPredicate<[{ (!hasAEABILibcalls(TT) || !isAAPCS_ABI(TT, ABIName)) && !TT.isOSWindows() }]>>, // Use divmod compiler-rt calls for iOS 5.0 and later. LibcallImpls<(add __divmodsi4, __udivmodsi4), RuntimeLibcallPredicate<[{TT.isOSBinFormatMachO() && (!TT.isiOS() || !TT.isOSVersionLT(5, 0))}]>>, DefaultStackProtector, DefaultSafeStackGlobals)> { let DefaultLibcallCallingConv = LibcallCallingConv<[{ TT.isOSDarwin() ? CallingConv::C : (FloatABI == FloatABI::Hard ? CallingConv::ARM_AAPCS_VFP : CallingConv::ARM_AAPCS) }]>; } //===----------------------------------------------------------------------===// // AVR Runtime Libcalls //===----------------------------------------------------------------------===// // Several of the runtime library functions use a special calling conv def __divmodqi4 : RuntimeLibcallImpl; def __divmodhi4 : RuntimeLibcallImpl; def __udivmodqi4 : RuntimeLibcallImpl; def __udivmodhi4 : RuntimeLibcallImpl; //def __divmodsi4 : RuntimeLibcallImpl; //def __udivmodsi4 : RuntimeLibcallImpl; // Standard sinf/cosf name replaced with "sin" and "cos". Define a // separate Impl so we can set a different type signature. def avr_sin : RuntimeLibcallImpl; def avr_cos : RuntimeLibcallImpl; def isAVR : RuntimeLibcallPredicate<"TT.getArch() == Triple::avr">; def AVRSystemLibrary : SystemRuntimeLibrary< isAVR, (add (sub DefaultRuntimeLibcallImpls, // Division rtlib functions (not supported), use divmod // functions instead __divqi3, __divhi3, __divsi3, __udivqi3, __udivhi3, __udivsi3, // Modulus rtlib functions (not supported), use divmod functions // instead __modqi3, __modhi3, __modsi3, __umodqi3, __umodhi3, __umodsi3, // Standard f64 names are replaced sin, cos, sinf, cosf), // Several of the runtime library functions use a special calling // conv LibcallsWithCC<(add __divmodqi4, __divmodhi4, __udivmodqi4, __udivmodhi4), AVR_BUILTIN>, __divmodsi4, __udivmodsi4, // Trigonometric rtlib functions avr_sin, avr_cos)>; //===----------------------------------------------------------------------===// // DXIL Runtime Libcalls //===----------------------------------------------------------------------===// def isDXIL : RuntimeLibcallPredicate<"TT.isDXIL()">; // No calls def DXILSystemLibrary : SystemRuntimeLibrary; //===----------------------------------------------------------------------===// // Hexagon Runtime Libcalls //===----------------------------------------------------------------------===// defset list HexagonLibcalls = { def __hexagon_divsi3 : RuntimeLibcallImpl; def __hexagon_divdi3 : RuntimeLibcallImpl; def __hexagon_udivsi3 : RuntimeLibcallImpl; def __hexagon_udivdi3 : RuntimeLibcallImpl; def __hexagon_modsi3 : RuntimeLibcallImpl; def __hexagon_moddi3 : RuntimeLibcallImpl; def __hexagon_umodsi3 : RuntimeLibcallImpl; def __hexagon_umoddi3 : RuntimeLibcallImpl; def __hexagon_adddf3 : RuntimeLibcallImpl; def __hexagon_fast_adddf3 : RuntimeLibcallImpl; def __hexagon_subdf3 : RuntimeLibcallImpl; def __hexagon_fast_subdf3 : RuntimeLibcallImpl; def __hexagon_muldf3 : RuntimeLibcallImpl; def __hexagon_fast_muldf3 : RuntimeLibcallImpl; def __hexagon_divdf3 : RuntimeLibcallImpl; def __hexagon_fast_divdf3 : RuntimeLibcallImpl; def __hexagon_divsf3 : RuntimeLibcallImpl; def __hexagon_fast_divsf3 : RuntimeLibcallImpl; def __hexagon_sqrtf : RuntimeLibcallImpl; def __hexagon_fast2_sqrtf : RuntimeLibcallImpl; // This is the only fast library function for sqrtd. def __hexagon_fast2_sqrtdf2 : RuntimeLibcallImpl; def __hexagon_memcpy_likely_aligned_min32bytes_mult8bytes : RuntimeLibcallImpl; def hexagon_memcpy_forward_vp4cp4n2 : RuntimeLibcallImpl; } def isHexagon : RuntimeLibcallPredicate<"TT.getArch() == Triple::hexagon">; def HexagonSystemLibrary : SystemRuntimeLibrary; //===----------------------------------------------------------------------===// // Lanai Runtime Libcalls //===----------------------------------------------------------------------===// def isLanai : RuntimeLibcallPredicate<"TT.getArch() == Triple::lanai">; // Use fast calling convention for library functions. def LanaiSystemLibrary : SystemRuntimeLibrary { let DefaultLibcallCallingConv = FASTCC; } //===----------------------------------------------------------------------===// // Mips16 Runtime Libcalls //===----------------------------------------------------------------------===// // Hard float libcalls def __mips16_adddf3 : RuntimeLibcallImpl; def __mips16_addsf3 : RuntimeLibcallImpl; def __mips16_divdf3 : RuntimeLibcallImpl; def __mips16_divsf3 : RuntimeLibcallImpl; def __mips16_eqdf2 : RuntimeLibcallImpl; def __mips16_eqsf2 : RuntimeLibcallImpl; def __mips16_extendsfdf2 : RuntimeLibcallImpl; def __mips16_fix_truncdfsi : RuntimeLibcallImpl; def __mips16_fix_truncsfsi : RuntimeLibcallImpl; def __mips16_floatsidf : RuntimeLibcallImpl; def __mips16_floatsisf : RuntimeLibcallImpl; def __mips16_floatunsidf : RuntimeLibcallImpl; def __mips16_floatunsisf : RuntimeLibcallImpl; def __mips16_gedf2 : RuntimeLibcallImpl; def __mips16_gesf2 : RuntimeLibcallImpl; def __mips16_gtdf2 : RuntimeLibcallImpl; def __mips16_gtsf2 : RuntimeLibcallImpl; def __mips16_ledf2 : RuntimeLibcallImpl; def __mips16_lesf2 : RuntimeLibcallImpl; def __mips16_ltdf2 : RuntimeLibcallImpl; def __mips16_ltsf2 : RuntimeLibcallImpl; def __mips16_muldf3 : RuntimeLibcallImpl; def __mips16_mulsf3 : RuntimeLibcallImpl; def __mips16_nedf2 : RuntimeLibcallImpl; def __mips16_nesf2 : RuntimeLibcallImpl; def __mips16_ret_dc : RuntimeLibcallImpl; def __mips16_ret_df : RuntimeLibcallImpl; def __mips16_ret_sc : RuntimeLibcallImpl; def __mips16_ret_sf : RuntimeLibcallImpl; def __mips16_subdf3 : RuntimeLibcallImpl; def __mips16_subsf3 : RuntimeLibcallImpl; def __mips16_truncdfsf2 : RuntimeLibcallImpl; def __mips16_unorddf2 : RuntimeLibcallImpl; def __mips16_unordsf2 : RuntimeLibcallImpl; //===----------------------------------------------------------------------===// // MSP430 Runtime Libcalls //===----------------------------------------------------------------------===// // EABI Libcalls - EABI Section 6.2 // Floating point conversions - EABI Table 6 def __mspabi_cvtdf : RuntimeLibcallImpl; def __mspabi_cvtfd : RuntimeLibcallImpl; // The following is NOT implemented in libgcc //def __mspabi_fixdi : RuntimeLibcallImpl; def __mspabi_fixdli : RuntimeLibcallImpl; def __mspabi_fixdlli : RuntimeLibcallImpl; // The following is NOT implemented in libgcc //def __mspabi_fixdu : RuntimeLibcallImpl; def __mspabi_fixdul : RuntimeLibcallImpl; def __mspabi_fixdull : RuntimeLibcallImpl; // The following is NOT implemented in libgcc //def __mspabi_fixfi : RuntimeLibcallImpl; def __mspabi_fixfli : RuntimeLibcallImpl; def __mspabi_fixflli : RuntimeLibcallImpl; // The following is NOT implemented in libgcc //def __mspabi_fixfu : RuntimeLibcallImpl; def __mspabi_fixful : RuntimeLibcallImpl; def __mspabi_fixfull : RuntimeLibcallImpl; // TODO The following IS implemented in libgcc //def __mspabi_fltid : RuntimeLibcallImpl; def __mspabi_fltlid : RuntimeLibcallImpl; // TODO The following IS implemented in libgcc but is not in the EABI def __mspabi_fltllid : RuntimeLibcallImpl; // TODO The following IS implemented in libgcc //def __mspabi_fltud : RuntimeLibcallImpl; def __mspabi_fltuld : RuntimeLibcallImpl; // The following IS implemented in libgcc but is not in the EABI def __mspabi_fltulld : RuntimeLibcallImpl; // TODO The following IS implemented in libgcc //def __mspabi_fltif : RuntimeLibcallImpl; def __mspabi_fltlif : RuntimeLibcallImpl; // TODO The following IS implemented in libgcc but is not in the EABI def __mspabi_fltllif : RuntimeLibcallImpl; // TODO The following IS implemented in libgcc //def __mspabi_fltuf : RuntimeLibcallImpl; def __mspabi_fltulf : RuntimeLibcallImpl; // The following IS implemented in libgcc but is not in the EABI def __mspabi_fltullf : RuntimeLibcallImpl; // Floating point comparisons - EABI Table 7 def __mspabi_cmpd__oeq : RuntimeLibcallImpl; def __mspabi_cmpd__une : RuntimeLibcallImpl; def __mspabi_cmpd__oge : RuntimeLibcallImpl; def __mspabi_cmpd__olt : RuntimeLibcallImpl; def __mspabi_cmpd__ole : RuntimeLibcallImpl; def __mspabi_cmpd__ogt : RuntimeLibcallImpl; def __mspabi_cmpf__oeq : RuntimeLibcallImpl; def __mspabi_cmpf__une : RuntimeLibcallImpl; def __mspabi_cmpf__oge : RuntimeLibcallImpl; def __mspabi_cmpf__olt : RuntimeLibcallImpl; def __mspabi_cmpf__ole : RuntimeLibcallImpl; def __mspabi_cmpf__ogt : RuntimeLibcallImpl; // Floating point arithmetic - EABI Table 8 def __mspabi_addd : RuntimeLibcallImpl; def __mspabi_addf : RuntimeLibcallImpl; def __mspabi_divd : RuntimeLibcallImpl; def __mspabi_divf : RuntimeLibcallImpl; def __mspabi_mpyd : RuntimeLibcallImpl; def __mspabi_mpyf : RuntimeLibcallImpl; def __mspabi_subd : RuntimeLibcallImpl; def __mspabi_subf : RuntimeLibcallImpl; // The following are NOT implemented in libgcc // def __mspabi_negd : RuntimeLibcallImpl; // def __mspabi_negf : RuntimeLibcallImpl; // Universal Integer Operations - EABI Table 9 def __mspabi_divi : RuntimeLibcallImpl; def __mspabi_divli : RuntimeLibcallImpl; def __mspabi_divlli : RuntimeLibcallImpl; def __mspabi_divu : RuntimeLibcallImpl; def __mspabi_divul : RuntimeLibcallImpl; def __mspabi_divull : RuntimeLibcallImpl; def __mspabi_remi : RuntimeLibcallImpl; def __mspabi_remli : RuntimeLibcallImpl; def __mspabi_remlli : RuntimeLibcallImpl; def __mspabi_remu : RuntimeLibcallImpl; def __mspabi_remul : RuntimeLibcallImpl; def __mspabi_remull : RuntimeLibcallImpl; // Bitwise Operations - EABI Table 10 // TODO: __mspabi_[srli/srai/slli] ARE implemented in libgcc def __mspabi_srll : RuntimeLibcallImpl; def __mspabi_sral : RuntimeLibcallImpl; def __mspabi_slll : RuntimeLibcallImpl; // __mspabi_[srlll/srall/sllll/rlli/rlll] are NOT implemented in libgcc // hasHWMult16() // Integer Multiply - EABI Table 9 //def __mspabi_mpyi_hw : RuntimeLibcallImpl; def __mspabi_mpyl_hw : RuntimeLibcallImpl; def __mspabi_mpyll_hw : RuntimeLibcallImpl; // TODO The __mspabi_mpysl*_hw functions ARE implemented in libgcc // TODO The __mspabi_mpyul*_hw functions ARE implemented in libgcc // hasHWMult32() // Integer Multiply - EABI Table 9 def __mspabi_mpyi_hw : RuntimeLibcallImpl; def __mspabi_mpyl_hw32 : RuntimeLibcallImpl; def __mspabi_mpyll_hw32 : RuntimeLibcallImpl; // TODO The __mspabi_mpysl*_hw32 functions ARE implemented in libgcc // TODO The __mspabi_mpyul*_hw32 functions ARE implemented in libgcc // hasHWMultF5() // Integer Multiply - EABI Table 9 def __mspabi_mpyi_f5hw : RuntimeLibcallImpl; def __mspabi_mpyl_f5hw : RuntimeLibcallImpl; def __mspabi_mpyll_f5hw : RuntimeLibcallImpl; // TODO The __mspabi_mpysl*_f5hw functions ARE implemented in libgcc // TODO The __mspabi_mpyul*_f5hw functions ARE implemented in libgcc // NoHWMult // Integer Multiply - EABI Table 9 def __mspabi_mpyi : RuntimeLibcallImpl; def __mspabi_mpyl : RuntimeLibcallImpl; def __mspabi_mpyll : RuntimeLibcallImpl; // The __mspabi_mpysl* functions are NOT implemented in libgcc // The __mspabi_mpyul* functions are NOT implemented in libgcc // setLibcallCallingConv(MUL_I64, CallingConv::MSP430_BUILTIN); def isMSP430 : RuntimeLibcallPredicate<"TT.getArch() == Triple::msp430">; defvar MSP430DefaultOptOut = [ __addsf3, __divsf3, __extendsfdf2, __truncdfsf2, __fixsfsi, __fixsfdi, __fixunssfsi, __mulsf3, __eqsf2, __gesf2, __gtsf2, __divhi3, __divsi3, __ashlsi3, __floatsidf, __floatsisf, __ashrsi3, __modhi3, __udivsi3, __fixdfsi, __fixunssfdi, __udivhi3, __umodsi3, __nesf2, __lesf2, __floatundisf, __fixdfdi, __fixunsdfsi, __modsi3, __floatunsisf, __fixunsdfdi, __ltsf2, __floatdisf, __floatdidf, __lshrsi3, __subsf3, __umodhi3, __floatunsidf, __floatundidf, __gtdf2, __eqdf2, __gedf2, __ltdf2, __ledf2, __adddf3, __divdf3, __divdi3, __moddi3, __muldf3, __subdf3, __udivdi3, __umoddi3 ]; // EABI Libcalls - EABI Section 6.2 def MSP430SystemLibrary : SystemRuntimeLibrary, __mspabi_cmpf__oeq, __mspabi_cmpf__une, __mspabi_cmpf__oge, __mspabi_cmpf__olt, __mspabi_cmpf__ole, __mspabi_cmpf__ogt, // Floating point arithmetic - EABI Table 8 LibcallsWithCC<(add __mspabi_addd, __mspabi_subd, __mspabi_mpyd, __mspabi_divd), MSP430_BUILTIN>, __mspabi_addf, __mspabi_subf, __mspabi_mpyf, __mspabi_divf, // The following are NOT implemented in libgcc // __mspabi_negd, // __mspabi_negf, // Universal Integer Operations - EABI Table 9 __mspabi_divi, __mspabi_divli, LibcallsWithCC<(add __mspabi_divlli), MSP430_BUILTIN>, __mspabi_divu, __mspabi_divul, LibcallsWithCC<(add __mspabi_divull), MSP430_BUILTIN>, __mspabi_remi, __mspabi_remli, LibcallsWithCC<(add __mspabi_remlli), MSP430_BUILTIN>, __mspabi_remu, __mspabi_remul, LibcallsWithCC<(add __mspabi_remull), MSP430_BUILTIN>, // May not be used depending on subtarget LibcallsWithCC<(add __mspabi_mpyll), MSP430_BUILTIN>, // Bitwise Operations - EABI Table 10 // TODO: __mspabi_[srli/srai/slli] ARE implemented in libgcc __mspabi_srll, __mspabi_sral, __mspabi_slll, // __mspabi_[srlll/srall/sllll/rlli/rlll] are NOT implemented in libgcc __stack_chk_fail, __stack_chk_guard ) >; //===----------------------------------------------------------------------===// // NVPTX Runtime Libcalls //===----------------------------------------------------------------------===// def isNVPTX : RuntimeLibcallPredicate<"TT.isNVPTX()">; // No calls. def NVPTXSystemLibrary : SystemRuntimeLibrary; //===----------------------------------------------------------------------===// // PPC Runtime Libcalls //===----------------------------------------------------------------------===// // For IEEE quad-precision libcall names, PPC uses "kf" instead of "tf". defset list PPCRuntimeLibcalls = { def __addkf3 : RuntimeLibcallImpl; def __subkf3 : RuntimeLibcallImpl; def __mulkf3 : RuntimeLibcallImpl; def __divkf3 : RuntimeLibcallImpl; def __powikf2 : RuntimeLibcallImpl; def __extendsfkf2 : RuntimeLibcallImpl; def __extenddfkf2 : RuntimeLibcallImpl; def __trunckfhf2 : RuntimeLibcallImpl; def __trunckfsf2 : RuntimeLibcallImpl; def __trunckfdf2 : RuntimeLibcallImpl; def __fixkfsi : RuntimeLibcallImpl; def __fixkfdi : RuntimeLibcallImpl; def __fixkfti : RuntimeLibcallImpl; def __fixunskfsi : RuntimeLibcallImpl; def __fixunskfdi : RuntimeLibcallImpl; def __fixunskfti : RuntimeLibcallImpl; def __floatsikf : RuntimeLibcallImpl; def __floatdikf : RuntimeLibcallImpl; def __floattikf : RuntimeLibcallImpl; def __floatunsikf : RuntimeLibcallImpl; def __floatundikf : RuntimeLibcallImpl; def __floatuntikf : RuntimeLibcallImpl; def __eqkf2 : RuntimeLibcallImpl; def __nekf2 : RuntimeLibcallImpl; def __gekf2 : RuntimeLibcallImpl; def __ltkf2 : RuntimeLibcallImpl; def __lekf2 : RuntimeLibcallImpl; def __gtkf2 : RuntimeLibcallImpl; def __unordkf2 : RuntimeLibcallImpl; } defset list PPC64AIXCallList = { def ___memccpy64 : RuntimeLibcallImpl; def ___memcmp64 : RuntimeLibcallImpl; def ___memmove64 : RuntimeLibcallImpl; def ___memset64 : RuntimeLibcallImpl; def ___bzero64 : RuntimeLibcallImpl; def ___strcmp64 : RuntimeLibcallImpl; def ___strcpy64 : RuntimeLibcallImpl; def ___strlen64 : RuntimeLibcallImpl; def ___strstr64 : RuntimeLibcallImpl; } defset list PPC32AIXCallList = { def ___memccpy : RuntimeLibcallImpl; def ___memcmp : RuntimeLibcallImpl; def ___memmove : RuntimeLibcallImpl; def ___memset : RuntimeLibcallImpl; def ___bzero : RuntimeLibcallImpl; def ___strcmp : RuntimeLibcallImpl; def ___strcpy : RuntimeLibcallImpl; def ___strlen : RuntimeLibcallImpl; def ___strstr : RuntimeLibcallImpl; } defvar PPCOverrides = !foreach(entry, PPCRuntimeLibcalls, entry.Provides); def isPPC : RuntimeLibcallPredicate<"TT.isPPC()">; def isPPC32 : RuntimeLibcallPredicate<"TT.isPPC32()">; def isPPC64 : RuntimeLibcallPredicate<"TT.isPPC64()">; def isAIX : RuntimeLibcallPredicate<"TT.isOSAIX()">; def isNotAIX : RuntimeLibcallPredicate<"!TT.isOSAIX()">; def isPPC32_AIX : RuntimeLibcallPredicate<"(TT.isPPC32() && TT.isOSAIX())">; def isPPC64_AIX : RuntimeLibcallPredicate<"(TT.isPPC64() && TT.isOSAIX())">; def AIX32Calls : LibcallImpls<(add PPC32AIXCallList), isPPC32_AIX>; def AIX64Calls : LibcallImpls<(add PPC64AIXCallList), isPPC64_AIX>; // FIXME: Current emission behavior with multiple implementations is // janky. We need to filter out the conflicting cases with different // f128 names, and then add the overrides. We should switch to // explicitly adding subsets of the default calls. def PPCSystemLibrary : SystemRuntimeLibrary, LibcallImpls<(add Int128RTLibcalls), isPPC64>, has__stack_smash_handler, has___guard_local, AvailableIf<__ssp_canary_word, isAIX>, AvailableIf, AvailableIf, AvailableIf, AvailableIf, AvailableIf<__stack_chk_fail, isNotOSOpenBSD>, AvailableIf<__stack_chk_guard, isNotOSAIXAndNotOSOpenBSD>)>; //===----------------------------------------------------------------------===// // RISCV Runtime Libcalls //===----------------------------------------------------------------------===// def isRISCV : RuntimeLibcallPredicate<"TT.isRISCV()">; def isRISCV64 : RuntimeLibcallPredicate<"TT.isRISCV64()">; def RISCVSystemLibrary : SystemRuntimeLibrary, DefaultStackProtector, DefaultSafeStackGlobals)>; //===----------------------------------------------------------------------===// // SPARC Runtime Libcalls //===----------------------------------------------------------------------===// // Subtarget->useSoftMulDiv() def sparc_umul : RuntimeLibcallImpl; def sparc_div : RuntimeLibcallImpl; def sparc_udiv : RuntimeLibcallImpl; def sparc_rem : RuntimeLibcallImpl; def sparc_urem : RuntimeLibcallImpl; // SPARC64 && !Subtarget->useSoftFloat() def _Qp_add : RuntimeLibcallImpl; def _Qp_sub : RuntimeLibcallImpl; def _Qp_mul : RuntimeLibcallImpl; def _Qp_div : RuntimeLibcallImpl; def _Qp_sqrt : RuntimeLibcallImpl; def _Qp_qtoi : RuntimeLibcallImpl; def _Qp_qtoui : RuntimeLibcallImpl; def _Qp_itoq : RuntimeLibcallImpl; def _Qp_uitoq : RuntimeLibcallImpl; def _Qp_qtox : RuntimeLibcallImpl; def _Qp_qtoux : RuntimeLibcallImpl; def _Qp_xtoq : RuntimeLibcallImpl; def _Qp_uxtoq : RuntimeLibcallImpl; def _Qp_stoq : RuntimeLibcallImpl; def _Qp_dtoq : RuntimeLibcallImpl; def _Qp_qtos : RuntimeLibcallImpl; def _Qp_qtod : RuntimeLibcallImpl; // SPARC32 && !Subtarget->useSoftFloat() def _Q_add : RuntimeLibcallImpl; def _Q_sub : RuntimeLibcallImpl; def _Q_mul : RuntimeLibcallImpl; def _Q_div : RuntimeLibcallImpl; def _Q_sqrt : RuntimeLibcallImpl; def _Q_qtoi : RuntimeLibcallImpl; def _Q_qtou : RuntimeLibcallImpl; def _Q_itoq : RuntimeLibcallImpl; def _Q_utoq : RuntimeLibcallImpl; def _Q_stoq : RuntimeLibcallImpl; def _Q_dtoq : RuntimeLibcallImpl; def _Q_qtos : RuntimeLibcallImpl; def _Q_qtod : RuntimeLibcallImpl; // SPARC32 && (Subtarget->hasHardQuad() || !Subtarget->useSoftFloat()) def _Q_qtoll : RuntimeLibcallImpl; def _Q_qtoull : RuntimeLibcallImpl; def _Q_lltoq : RuntimeLibcallImpl; def _Q_ulltoq : RuntimeLibcallImpl; def isSPARC : RuntimeLibcallPredicate<"TT.isSPARC()">; def isSPARC32 : RuntimeLibcallPredicate<"TT.isSPARC32()">; def isSPARC64 : RuntimeLibcallPredicate<"TT.isSPARC64()">; defvar SPARC64_MulDivCalls = [ __mulsi3, __divsi3, __modsi3, __udivsi3, __umodsi3 ]; def SPARCSystemLibrary : SystemRuntimeLibrary, LibcallImpls<(add SPARC64_MulDivCalls, Int128RTLibcalls), isSPARC64>, LibmHasSinCosF32, LibmHasSinCosF64, LibmHasSinCosF128, has__stack_chk_fail, has__stack_smash_handler, has___guard_local, DefaultSafeStackGlobals, AvailableIf<__stack_chk_guard, isNotOSLinuxAndNotOSOpenBSD>) >; //===----------------------------------------------------------------------===// // SPIRV Runtime Libcalls //===----------------------------------------------------------------------===// def isSPIRV : RuntimeLibcallPredicate<"TT.isSPIRV()">; // No calls FIXME: Add memcpy/memset is a hack to skip // PreISelIntrinsicLowering in favor of SPIRVPrepareFunctions; // probably should remove that and just use the default one. def SPIRVSystemLibrary : SystemRuntimeLibrary; //===----------------------------------------------------------------------===// // Windows Runtime Libcalls //===----------------------------------------------------------------------===// defset list WindowsDivRemMulLibcalls = { def _alldiv : RuntimeLibcallImpl; def _aulldiv : RuntimeLibcallImpl; def _allrem : RuntimeLibcallImpl; def _aullrem : RuntimeLibcallImpl; def _allmul : RuntimeLibcallImpl; } // FIXME: Should have utility function to filter by known provider. defvar WindowsDivRemMulLibcallOverrides = [ __divdi3, __udivdi3, __moddi3, __umoddi3, __muldi3 ]; //===----------------------------------------------------------------------===// // X86 Runtime Libcalls //===----------------------------------------------------------------------===// def isX86_32 : RuntimeLibcallPredicate<"TT.getArch() == Triple::x86">; def isX86_64 : RuntimeLibcallPredicate<"TT.getArch() == Triple::x86_64">; def isX86 : RuntimeLibcallPredicate<"TT.isX86()">; def isCygwinMinGW64 : RuntimeLibcallPredicate< [{TT.isOSCygMing() && TT.getArch() == Triple::x86_64}]>; def isCygwinMinGW32 : RuntimeLibcallPredicate< [{TT.isOSCygMing() && TT.getArch() == Triple::x86}]>; def isWin32NotCygMing : RuntimeLibcallPredicate< [{TT.getArch() == Triple::x86 && (TT.isOSWindows() || TT.isUEFI()) && !TT.isOSCygMing()}]>; def isWin64NotCygMing : RuntimeLibcallPredicate< [{TT.getArch() == Triple::x86_64 && (TT.isOSWindows() || TT.isUEFI()) && !TT.isOSCygMing()}]>; // Some darwins have an optimized __bzero/bzero function. def darwinHas__bzero : RuntimeLibcallPredicate<"TT.isMacOSX() && !TT.isMacOSXVersionLT(10, 6)">; // FIXME: This is has ldexpl/frexpl plus use f128 for long double. def hasExpFrexplLdexplF128 : RuntimeLibcallPredicate<[{(!TT.isOSWindows() || TT.isOSCygMing()) && !TT.isGNUEnvironment()}]>; // Use the f128 variants of math functions on x86 defvar X86_F128_Libcalls = LibcallImpls<(add LibmF128Libcalls, LibmF128FiniteLibcalls), isGNUEnvironment>; defvar SinCosF32F64Libcalls = LibcallImpls<(add sincosf, sincos), hasSinCos_f32_f64>; defvar MemChkLibcalls = [__memcpy_chk, __memset_chk, __memmove_chk]; defvar X86CommonLibcalls = (add (sub WinDefaultLibcallImpls, WindowsDivRemMulLibcallOverrides, MemChkLibcalls), DarwinSinCosStret, DarwinExp10, DarwinMemsetPattern, MacOSUnlockedIO, X86_F128_Libcalls, LibmHasSinCosF80, // FIXME: Depends on long double SinCosF32F64Libcalls, LibcallImpls<(add __bzero), darwinHas__bzero>, LibmHasFrexpF32, LibmHasLdexpF32, LibmHasFrexpF80, LibmHasLdexpF80, LibcallImpls<(add frexpl_f128, ldexpl_f128, exp10l_f128), hasExpFrexplLdexplF128>, DefaultRuntimeLibcallImpls_f80, LibmHasExp10F32, LibmHasExp10F64, LibmHasExp10F80, LibcallImpls<(add MostPowI), isNotOSMSVCRT>, SecurityCheckCookieIfWinMSVC, // FIXME: MSVCRT doesn't have powi. The f128 case is added as a // hack for one test relying on it. __powitf2_f128, DefaultStackProtector, DefaultSafeStackGlobals, LibcallImpls<(add MemChkLibcalls), isNotPS>, LibcallImpls<(add ___chkstk_ms), isCygwinMinGW64>, LibcallImpls<(add __chkstk), isWin64NotCygMing>, LibcallImpls<(add _alloca), isCygwinMinGW32>, LibcallImpls<(add _chkstk), isWin32NotCygMing>, LibcSafestackPointerAddress ); defvar Windows32DivRemMulCalls = LibcallsWithCC<(add WindowsDivRemMulLibcalls), X86_STDCALL, RuntimeLibcallPredicate<"TT.isWindowsMSVCEnvironment() || TT.isWindowsItaniumEnvironment()">>; defvar NotWindows32DivRemMulCalls = LibcallImpls<(add WindowsDivRemMulLibcallOverrides), RuntimeLibcallPredicate<"!TT.isWindowsMSVCEnvironment() && !TT.isWindowsItaniumEnvironment()">>; def X86_32SystemLibrary : SystemRuntimeLibrary; def X86_64SystemLibrary : SystemRuntimeLibrary; //===----------------------------------------------------------------------===// // XCore Runtime Libcalls //===----------------------------------------------------------------------===// def __memcpy_4 : RuntimeLibcallImpl; def isXCore : RuntimeLibcallPredicate<"TT.getArch() == Triple::xcore">; def XCoreSystemLibrary : SystemRuntimeLibrary )>; //===----------------------------------------------------------------------===// // ZOS Runtime Libcalls //===----------------------------------------------------------------------===// defset list ZOSRuntimeLibcalls = { def zos___TRNC_B : RuntimeLibcallImpl; def zos___FTRC_B : RuntimeLibcallImpl; def zos___LTRC_B : RuntimeLibcallImpl; def zos___WSQT_B : RuntimeLibcallImpl; def zos___FSQT_B : RuntimeLibcallImpl; def zos___LSQT_B : RuntimeLibcallImpl; def zos___SSIN_B : RuntimeLibcallImpl; def zos___FSIN_B : RuntimeLibcallImpl; def zos___LSIN_B : RuntimeLibcallImpl; def zos___ROUN_B : RuntimeLibcallImpl; def zos___ROUNFB : RuntimeLibcallImpl; def zos___ROUNLB : RuntimeLibcallImpl; def zos___SRNT_B : RuntimeLibcallImpl; def zos___RINTFB : RuntimeLibcallImpl; def zos___RINTLB : RuntimeLibcallImpl; def zos___WFMD_B : RuntimeLibcallImpl; def zos___FFMD_B : RuntimeLibcallImpl; def zos___LFMD_B : RuntimeLibcallImpl; def zos___WPOW_B : RuntimeLibcallImpl; def zos___FPOW_B : RuntimeLibcallImpl; def zos___LPOW_B : RuntimeLibcallImpl; def zos___NBYI_B : RuntimeLibcallImpl; def zos___NBYIFB : RuntimeLibcallImpl; def zos___NBYILB : RuntimeLibcallImpl; def zos___ROND_B : RuntimeLibcallImpl; def zos___FRND_B : RuntimeLibcallImpl; def zos___LRND_B : RuntimeLibcallImpl; def zos___LRNT_B : RuntimeLibcallImpl; def zos___LRNTFB : RuntimeLibcallImpl; def zos___LRNTLB : RuntimeLibcallImpl; def zos___WLOG_B : RuntimeLibcallImpl; def zos___FLOG_B : RuntimeLibcallImpl; def zos___LLOG_B : RuntimeLibcallImpl; def zos___LOG2_B : RuntimeLibcallImpl; def zos___FLG2_B : RuntimeLibcallImpl; def zos___LLG2_B : RuntimeLibcallImpl; def zos___WLG1_B : RuntimeLibcallImpl; def zos___FLG1_B : RuntimeLibcallImpl; def zos___LLG1_B : RuntimeLibcallImpl; def zos___LLRD_B : RuntimeLibcallImpl; def zos___LLRDFB : RuntimeLibcallImpl; def zos___LLRDLB : RuntimeLibcallImpl; def zos___LLRT_B : RuntimeLibcallImpl; def zos___LLRTFB : RuntimeLibcallImpl; def zos___LLRTLB : RuntimeLibcallImpl; def zos___SLXP_B : RuntimeLibcallImpl; def zos___FLXP_B : RuntimeLibcallImpl; def zos___LLXP_B : RuntimeLibcallImpl; def zos___SFXP_B : RuntimeLibcallImpl; def zos___FFXP_B : RuntimeLibcallImpl; def zos___LFXP_B : RuntimeLibcallImpl; def zos___FMIN_B : RuntimeLibcallImpl; def zos___FMINFB : RuntimeLibcallImpl; def zos___FMINLB : RuntimeLibcallImpl; def zos___FMA_B : RuntimeLibcallImpl; def zos___FMAFB : RuntimeLibcallImpl; def zos___FMALB : RuntimeLibcallImpl; def zos___FMAX_B : RuntimeLibcallImpl; def zos___FMAXFB : RuntimeLibcallImpl; def zos___FMAXLB : RuntimeLibcallImpl; def zos___SFLR_B : RuntimeLibcallImpl; def zos___FFLR_B : RuntimeLibcallImpl; def zos___LFLR_B : RuntimeLibcallImpl; def zos___WEXP_B : RuntimeLibcallImpl; def zos___FEXP_B : RuntimeLibcallImpl; def zos___LEXP_B : RuntimeLibcallImpl; def zos___EXP2_B : RuntimeLibcallImpl; def zos___FXP2_B : RuntimeLibcallImpl; def zos___LXP2_B : RuntimeLibcallImpl; def zos___SCOS_B : RuntimeLibcallImpl; def zos___FCOS_B : RuntimeLibcallImpl; def zos___LCOS_B : RuntimeLibcallImpl; def zos___DCPY_B : RuntimeLibcallImpl; def zos___FCPY_B : RuntimeLibcallImpl; def zos___LCPY_B : RuntimeLibcallImpl; def zos___SCEL_B : RuntimeLibcallImpl; def zos___FCEL_B : RuntimeLibcallImpl; def zos___LCEL_B : RuntimeLibcallImpl; def zos___SCRT_B : RuntimeLibcallImpl; def zos___FCBT_B : RuntimeLibcallImpl; def zos___LCBT_B : RuntimeLibcallImpl; } def isSystemZZOS : RuntimeLibcallPredicate<"(TT.isSystemZ() && TT.isOSzOS())">; def isZOS : RuntimeLibcallPredicate<"TT.isOSzOS()">; def SystemZZOSSystemLibrary : SystemRuntimeLibrary< isSystemZZOS, (add DefaultLibcallImpls64, LibcallImpls<(add ZOSRuntimeLibcalls), isZOS>)>; //===----------------------------------------------------------------------===// // WebAssembly Runtime Libcalls //===----------------------------------------------------------------------===// // Define the emscripten name for return address helper. // TODO: when implementing other Wasm backends, make this generic or only do // this on emscripten depending on what they end up doing. def emscripten_return_address : RuntimeLibcallImpl; def isWasm : RuntimeLibcallPredicate<"TT.isWasm()">; def isOSEmscripten : RuntimeLibcallPredicate<[{TT.isOSEmscripten()}]>; // Define the emscripten name for return address helper. // TODO: when implementing other Wasm backends, make this generic or only do // this on emscripten depending on what they end up doing. def WasmSystemLibrary : SystemRuntimeLibrary, __stack_chk_fail, __stack_chk_guard)>; //===----------------------------------------------------------------------===// // Legacy Default Runtime Libcalls //===----------------------------------------------------------------------===// // TODO: Should make every target explicit. def isDefaultLibcallArch : RuntimeLibcallPredicate<[{ TT.isMIPS() || TT.isLoongArch() || TT.isVE() || TT.isBPF() || TT.getArch() == Triple::csky || TT.getArch() == Triple::arc || TT.getArch() == Triple::m68k || TT.getArch() == Triple::xtensa || (TT.isSystemZ() && !TT.isOSzOS()) }]>; def isArch64Bit : RuntimeLibcallPredicate<[{TT.isArch64Bit()}]>; def LegacyDefaultSystemLibrary : SystemRuntimeLibrary, DefaultStackProtector, DefaultSafeStackGlobals )>; //===----------------------------------------------------------------------===// // Vector math libraries //===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===// // Accelerate framework functions //===----------------------------------------------------------------------===// defset list ACCELERATE_VECFUNCS = { def vacosf : RuntimeLibcallImpl; def vacoshf : RuntimeLibcallImpl; def vasinf : RuntimeLibcallImpl; def vasinhf : RuntimeLibcallImpl; def vatan2f : RuntimeLibcallImpl; def vatanf : RuntimeLibcallImpl; def vatanhf : RuntimeLibcallImpl; def vceilf : RuntimeLibcallImpl; def vcosf : RuntimeLibcallImpl; def vcoshf : RuntimeLibcallImpl; def vexpf : RuntimeLibcallImpl; def vexpm1f : RuntimeLibcallImpl; def vfabsf : RuntimeLibcallImpl; def vfloorf : RuntimeLibcallImpl; def vlog10f : RuntimeLibcallImpl; def vlog1pf : RuntimeLibcallImpl; def vlogbf : RuntimeLibcallImpl; def vlogf : RuntimeLibcallImpl; def vsinf : RuntimeLibcallImpl; def vsinhf : RuntimeLibcallImpl; def vsqrtf : RuntimeLibcallImpl; def vtanf : RuntimeLibcallImpl; def vtanhf : RuntimeLibcallImpl; } //===----------------------------------------------------------------------===// // Darwin_libsystem_m vector functions //===----------------------------------------------------------------------===// defset list DARWIN_LIBSYSTEM_M_VECFUNCS = { def _simd_acos_d2 : RuntimeLibcallImpl; def _simd_acos_f4 : RuntimeLibcallImpl; def _simd_acosh_d2 : RuntimeLibcallImpl; def _simd_acosh_f4 : RuntimeLibcallImpl; def _simd_asin_d2 : RuntimeLibcallImpl; def _simd_asin_f4 : RuntimeLibcallImpl; def _simd_asinh_d2 : RuntimeLibcallImpl; def _simd_asinh_f4 : RuntimeLibcallImpl; def _simd_atan2_d2 : RuntimeLibcallImpl; def _simd_atan2_f4 : RuntimeLibcallImpl; def _simd_atan_d2 : RuntimeLibcallImpl; def _simd_atan_f4 : RuntimeLibcallImpl; def _simd_atanh_d2 : RuntimeLibcallImpl; def _simd_atanh_f4 : RuntimeLibcallImpl; def _simd_cbrt_d2 : RuntimeLibcallImpl; def _simd_cbrt_f4 : RuntimeLibcallImpl; def _simd_cos_d2 : RuntimeLibcallImpl; def _simd_cos_f4 : RuntimeLibcallImpl; def _simd_cosh_d2 : RuntimeLibcallImpl; def _simd_cosh_f4 : RuntimeLibcallImpl; def _simd_erf_d2 : RuntimeLibcallImpl; def _simd_erf_f4 : RuntimeLibcallImpl; def _simd_exp_d2 : RuntimeLibcallImpl; def _simd_exp_f4 : RuntimeLibcallImpl; def _simd_pow_d2 : RuntimeLibcallImpl; def _simd_pow_f4 : RuntimeLibcallImpl; def _simd_sin_d2 : RuntimeLibcallImpl; def _simd_sin_f4 : RuntimeLibcallImpl; def _simd_sinh_d2 : RuntimeLibcallImpl; def _simd_sinh_f4 : RuntimeLibcallImpl; def _simd_tan_d2 : RuntimeLibcallImpl; def _simd_tan_f4 : RuntimeLibcallImpl; def _simd_tanh_d2 : RuntimeLibcallImpl; def _simd_tanh_f4 : RuntimeLibcallImpl; } //===----------------------------------------------------------------------===// // GLIBC Vector Math library LIBMVEC functions //===----------------------------------------------------------------------===// defvar LIBMVECPrefix = "LIBMVEC_"; class LibmvecLibcall : RuntimeLibcallImpl; defset list LIBMVEC_X86_VECFUNCS = { def LIBMVEC__ZGVbN2v___exp_finite : LibmvecLibcall; def LIBMVEC__ZGVbN2v___log_finite : LibmvecLibcall; def LIBMVEC__ZGVbN2v_cos : LibmvecLibcall; def LIBMVEC__ZGVbN2v_exp : LibmvecLibcall; def LIBMVEC__ZGVbN2v_log : LibmvecLibcall; def LIBMVEC__ZGVbN2v_sin : LibmvecLibcall; def LIBMVEC__ZGVbN2v_tan : LibmvecLibcall; def LIBMVEC__ZGVbN2vv___pow_finite : LibmvecLibcall; def LIBMVEC__ZGVbN2vv_pow : LibmvecLibcall; def LIBMVEC__ZGVbN4v___expf_finite : LibmvecLibcall; def LIBMVEC__ZGVbN4v___logf_finite : LibmvecLibcall; def LIBMVEC__ZGVbN4v_cosf : LibmvecLibcall; def LIBMVEC__ZGVbN4v_expf : LibmvecLibcall; def LIBMVEC__ZGVbN4v_logf : LibmvecLibcall; def LIBMVEC__ZGVbN4v_sinf : LibmvecLibcall; def LIBMVEC__ZGVbN4v_tanf : LibmvecLibcall; def LIBMVEC__ZGVbN4vv___powf_finite : LibmvecLibcall; def LIBMVEC__ZGVbN4vv_powf : LibmvecLibcall; def LIBMVEC__ZGVdN4v___exp_finite : LibmvecLibcall; def LIBMVEC__ZGVdN4v___log_finite : LibmvecLibcall; def LIBMVEC__ZGVdN4v_cos : LibmvecLibcall; def LIBMVEC__ZGVdN4v_exp : LibmvecLibcall; def LIBMVEC__ZGVdN4v_log : LibmvecLibcall; def LIBMVEC__ZGVdN4v_sin : LibmvecLibcall; def LIBMVEC__ZGVdN4v_tan : LibmvecLibcall; def LIBMVEC__ZGVdN4vv___pow_finite : LibmvecLibcall; def LIBMVEC__ZGVdN4vv_pow : LibmvecLibcall; def LIBMVEC__ZGVdN8v___expf_finite : LibmvecLibcall; def LIBMVEC__ZGVdN8v___logf_finite : LibmvecLibcall; def LIBMVEC__ZGVdN8v_cosf : LibmvecLibcall; def LIBMVEC__ZGVdN8v_expf : LibmvecLibcall; def LIBMVEC__ZGVdN8v_logf : LibmvecLibcall; def LIBMVEC__ZGVdN8v_sinf : LibmvecLibcall; def LIBMVEC__ZGVdN8v_tanf : LibmvecLibcall; def LIBMVEC__ZGVdN8vv___powf_finite : LibmvecLibcall; def LIBMVEC__ZGVdN8vv_powf : LibmvecLibcall; } defset list LIBMVEC_AARCH64_VECFUNCS = { def LIBMVEC__ZGVnN2v_acos : LibmvecLibcall; def LIBMVEC__ZGVnN2v_acosf : LibmvecLibcall; def LIBMVEC__ZGVnN2v_acosh : LibmvecLibcall; def LIBMVEC__ZGVnN2v_acoshf : LibmvecLibcall; def LIBMVEC__ZGVnN2v_asin : LibmvecLibcall; def LIBMVEC__ZGVnN2v_asinf : LibmvecLibcall; def LIBMVEC__ZGVnN2v_asinh : LibmvecLibcall; def LIBMVEC__ZGVnN2v_asinhf : LibmvecLibcall; def LIBMVEC__ZGVnN2v_atan : LibmvecLibcall; def LIBMVEC__ZGVnN2v_atanf : LibmvecLibcall; def LIBMVEC__ZGVnN2v_atanh : LibmvecLibcall; def LIBMVEC__ZGVnN2v_atanhf : LibmvecLibcall; def LIBMVEC__ZGVnN2v_cbrt : LibmvecLibcall; def LIBMVEC__ZGVnN2v_cbrtf : LibmvecLibcall; def LIBMVEC__ZGVnN2v_cos : LibmvecLibcall; def LIBMVEC__ZGVnN2v_cosf : LibmvecLibcall; def LIBMVEC__ZGVnN2v_cosh : LibmvecLibcall; def LIBMVEC__ZGVnN2v_coshf : LibmvecLibcall; def LIBMVEC__ZGVnN2v_erf : LibmvecLibcall; def LIBMVEC__ZGVnN2v_erfc : LibmvecLibcall; def LIBMVEC__ZGVnN2v_erfcf : LibmvecLibcall; def LIBMVEC__ZGVnN2v_erff : LibmvecLibcall; def LIBMVEC__ZGVnN2v_exp : LibmvecLibcall; def LIBMVEC__ZGVnN2v_exp10 : LibmvecLibcall; def LIBMVEC__ZGVnN2v_exp10f : LibmvecLibcall; def LIBMVEC__ZGVnN2v_exp2 : LibmvecLibcall; def LIBMVEC__ZGVnN2v_exp2f : LibmvecLibcall; def LIBMVEC__ZGVnN2v_expf : LibmvecLibcall; def LIBMVEC__ZGVnN2v_expm1 : LibmvecLibcall; def LIBMVEC__ZGVnN2v_expm1f : LibmvecLibcall; def LIBMVEC__ZGVnN2v_log : LibmvecLibcall; def LIBMVEC__ZGVnN2v_log10 : LibmvecLibcall; def LIBMVEC__ZGVnN2v_log10f : LibmvecLibcall; def LIBMVEC__ZGVnN2v_log1p : LibmvecLibcall; def LIBMVEC__ZGVnN2v_log1pf : LibmvecLibcall; def LIBMVEC__ZGVnN2v_log2 : LibmvecLibcall; def LIBMVEC__ZGVnN2v_log2f : LibmvecLibcall; def LIBMVEC__ZGVnN2v_logf : LibmvecLibcall; def LIBMVEC__ZGVnN2v_sin : LibmvecLibcall; def LIBMVEC__ZGVnN2v_sinf : LibmvecLibcall; def LIBMVEC__ZGVnN2v_sinh : LibmvecLibcall; def LIBMVEC__ZGVnN2v_sinhf : LibmvecLibcall; def LIBMVEC__ZGVnN2v_tan : LibmvecLibcall; def LIBMVEC__ZGVnN2v_tanf : LibmvecLibcall; def LIBMVEC__ZGVnN2v_tanh : LibmvecLibcall; def LIBMVEC__ZGVnN2v_tanhf : LibmvecLibcall; def LIBMVEC__ZGVnN2vv_atan2 : LibmvecLibcall; def LIBMVEC__ZGVnN2vv_atan2f : LibmvecLibcall; def LIBMVEC__ZGVnN2vv_hypot : LibmvecLibcall; def LIBMVEC__ZGVnN2vv_hypotf : LibmvecLibcall; def LIBMVEC__ZGVnN2vv_pow : LibmvecLibcall; def LIBMVEC__ZGVnN2vv_powf : LibmvecLibcall; def LIBMVEC__ZGVnN4v_acosf : LibmvecLibcall; def LIBMVEC__ZGVnN4v_acoshf : LibmvecLibcall; def LIBMVEC__ZGVnN4v_asinf : LibmvecLibcall; def LIBMVEC__ZGVnN4v_asinhf : LibmvecLibcall; def LIBMVEC__ZGVnN4v_atanf : LibmvecLibcall; def LIBMVEC__ZGVnN4v_atanhf : LibmvecLibcall; def LIBMVEC__ZGVnN4v_cbrtf : LibmvecLibcall; def LIBMVEC__ZGVnN4v_cosf : LibmvecLibcall; def LIBMVEC__ZGVnN4v_coshf : LibmvecLibcall; def LIBMVEC__ZGVnN4v_erfcf : LibmvecLibcall; def LIBMVEC__ZGVnN4v_erff : LibmvecLibcall; def LIBMVEC__ZGVnN4v_exp10f : LibmvecLibcall; def LIBMVEC__ZGVnN4v_exp2f : LibmvecLibcall; def LIBMVEC__ZGVnN4v_expf : LibmvecLibcall; def LIBMVEC__ZGVnN4v_expm1f : LibmvecLibcall; def LIBMVEC__ZGVnN4v_log10f : LibmvecLibcall; def LIBMVEC__ZGVnN4v_log1pf : LibmvecLibcall; def LIBMVEC__ZGVnN4v_log2f : LibmvecLibcall; def LIBMVEC__ZGVnN4v_logf : LibmvecLibcall; def LIBMVEC__ZGVnN4v_sinf : LibmvecLibcall; def LIBMVEC__ZGVnN4v_sinhf : LibmvecLibcall; def LIBMVEC__ZGVnN4v_tanf : LibmvecLibcall; def LIBMVEC__ZGVnN4v_tanhf : LibmvecLibcall; def LIBMVEC__ZGVnN4vv_atan2f : LibmvecLibcall; def LIBMVEC__ZGVnN4vv_hypotf : LibmvecLibcall; def LIBMVEC__ZGVnN4vv_powf : LibmvecLibcall; def LIBMVEC__ZGVsMxv_acos : LibmvecLibcall; def LIBMVEC__ZGVsMxv_acosf : LibmvecLibcall; def LIBMVEC__ZGVsMxv_acosh : LibmvecLibcall; def LIBMVEC__ZGVsMxv_acoshf : LibmvecLibcall; def LIBMVEC__ZGVsMxv_asin : LibmvecLibcall; def LIBMVEC__ZGVsMxv_asinf : LibmvecLibcall; def LIBMVEC__ZGVsMxv_asinh : LibmvecLibcall; def LIBMVEC__ZGVsMxv_asinhf : LibmvecLibcall; def LIBMVEC__ZGVsMxv_atan : LibmvecLibcall; def LIBMVEC__ZGVsMxv_atanf : LibmvecLibcall; def LIBMVEC__ZGVsMxv_atanh : LibmvecLibcall; def LIBMVEC__ZGVsMxv_atanhf : LibmvecLibcall; def LIBMVEC__ZGVsMxv_cbrt : LibmvecLibcall; def LIBMVEC__ZGVsMxv_cbrtf : LibmvecLibcall; def LIBMVEC__ZGVsMxv_cos : LibmvecLibcall; def LIBMVEC__ZGVsMxv_cosf : LibmvecLibcall; def LIBMVEC__ZGVsMxv_cosh : LibmvecLibcall; def LIBMVEC__ZGVsMxv_coshf : LibmvecLibcall; def LIBMVEC__ZGVsMxv_erf : LibmvecLibcall; def LIBMVEC__ZGVsMxv_erfc : LibmvecLibcall; def LIBMVEC__ZGVsMxv_erfcf : LibmvecLibcall; def LIBMVEC__ZGVsMxv_erff : LibmvecLibcall; def LIBMVEC__ZGVsMxv_exp : LibmvecLibcall; def LIBMVEC__ZGVsMxv_exp10 : LibmvecLibcall; def LIBMVEC__ZGVsMxv_exp10f : LibmvecLibcall; def LIBMVEC__ZGVsMxv_exp2 : LibmvecLibcall; def LIBMVEC__ZGVsMxv_exp2f : LibmvecLibcall; def LIBMVEC__ZGVsMxv_expf : LibmvecLibcall; def LIBMVEC__ZGVsMxv_expm1 : LibmvecLibcall; def LIBMVEC__ZGVsMxv_expm1f : LibmvecLibcall; def LIBMVEC__ZGVsMxv_log : LibmvecLibcall; def LIBMVEC__ZGVsMxv_log10 : LibmvecLibcall; def LIBMVEC__ZGVsMxv_log10f : LibmvecLibcall; def LIBMVEC__ZGVsMxv_log1p : LibmvecLibcall; def LIBMVEC__ZGVsMxv_log1pf : LibmvecLibcall; def LIBMVEC__ZGVsMxv_log2 : LibmvecLibcall; def LIBMVEC__ZGVsMxv_log2f : LibmvecLibcall; def LIBMVEC__ZGVsMxv_logf : LibmvecLibcall; def LIBMVEC__ZGVsMxv_sin : LibmvecLibcall; def LIBMVEC__ZGVsMxv_sinf : LibmvecLibcall; def LIBMVEC__ZGVsMxv_sinh : LibmvecLibcall; def LIBMVEC__ZGVsMxv_sinhf : LibmvecLibcall; def LIBMVEC__ZGVsMxv_tan : LibmvecLibcall; def LIBMVEC__ZGVsMxv_tanf : LibmvecLibcall; def LIBMVEC__ZGVsMxv_tanh : LibmvecLibcall; def LIBMVEC__ZGVsMxv_tanhf : LibmvecLibcall; def LIBMVEC__ZGVsMxvv_atan2 : LibmvecLibcall; def LIBMVEC__ZGVsMxvv_atan2f : LibmvecLibcall; def LIBMVEC__ZGVsMxvv_hypot : LibmvecLibcall; def LIBMVEC__ZGVsMxvv_hypotf : LibmvecLibcall; def LIBMVEC__ZGVsMxvv_pow : LibmvecLibcall; def LIBMVEC__ZGVsMxvv_powf : LibmvecLibcall; } //===----------------------------------------------------------------------===// // IBM MASS vector library (MASSV) functions //===----------------------------------------------------------------------===// defset list MASSV_VECFUNCS = { def __acosd2 : RuntimeLibcallImpl; def __acosf4 : RuntimeLibcallImpl; def __acoshd2 : RuntimeLibcallImpl; def __acoshf4 : RuntimeLibcallImpl; def __asind2 : RuntimeLibcallImpl; def __asinf4 : RuntimeLibcallImpl; def __asinhd2 : RuntimeLibcallImpl; def __asinhf4 : RuntimeLibcallImpl; def __atan2d2 : RuntimeLibcallImpl; def __atan2f4 : RuntimeLibcallImpl; def __atand2 : RuntimeLibcallImpl; def __atanf4 : RuntimeLibcallImpl; def __atanhd2 : RuntimeLibcallImpl; def __atanhf4 : RuntimeLibcallImpl; def __cbrtd2 : RuntimeLibcallImpl; def __cbrtf4 : RuntimeLibcallImpl; def __cosd2 : RuntimeLibcallImpl; def __cosf4 : RuntimeLibcallImpl; def __coshd2 : RuntimeLibcallImpl; def __coshf4 : RuntimeLibcallImpl; def __exp2d2 : RuntimeLibcallImpl; def __exp2f4 : RuntimeLibcallImpl; def __expd2 : RuntimeLibcallImpl; def __expf4 : RuntimeLibcallImpl; def __expm1d2 : RuntimeLibcallImpl; def __expm1f4 : RuntimeLibcallImpl; def __log10d2 : RuntimeLibcallImpl; def __log10f4 : RuntimeLibcallImpl; def __log1pd2 : RuntimeLibcallImpl; def __log1pf4 : RuntimeLibcallImpl; def __log2d2 : RuntimeLibcallImpl; def __log2f4 : RuntimeLibcallImpl; def __logd2 : RuntimeLibcallImpl; def __logf4 : RuntimeLibcallImpl; def __powd2 : RuntimeLibcallImpl; def __powf4 : RuntimeLibcallImpl; def __sind2 : RuntimeLibcallImpl; def __sinf4 : RuntimeLibcallImpl; def __sinhd2 : RuntimeLibcallImpl; def __sinhf4 : RuntimeLibcallImpl; def __tand2 : RuntimeLibcallImpl; def __tanf4 : RuntimeLibcallImpl; def __tanhd2 : RuntimeLibcallImpl; def __tanhf4 : RuntimeLibcallImpl; } //===----------------------------------------------------------------------===// // Intel SVML library functions //===----------------------------------------------------------------------===// defset list SVML_VECFUNCS = { def __svml_cos2 : RuntimeLibcallImpl; def __svml_cos4 : RuntimeLibcallImpl; def __svml_cos8 : RuntimeLibcallImpl; def __svml_cosf16 : RuntimeLibcallImpl; def __svml_cosf4 : RuntimeLibcallImpl; def __svml_cosf8 : RuntimeLibcallImpl; def __svml_exp2 : RuntimeLibcallImpl; def __svml_exp22 : RuntimeLibcallImpl; def __svml_exp24 : RuntimeLibcallImpl; def __svml_exp28 : RuntimeLibcallImpl; def __svml_exp2f16 : RuntimeLibcallImpl; def __svml_exp2f4 : RuntimeLibcallImpl; def __svml_exp2f8 : RuntimeLibcallImpl; def __svml_exp4 : RuntimeLibcallImpl; def __svml_exp8 : RuntimeLibcallImpl; def __svml_expf16 : RuntimeLibcallImpl; def __svml_expf4 : RuntimeLibcallImpl; def __svml_expf8 : RuntimeLibcallImpl; def __svml_log102 : RuntimeLibcallImpl; def __svml_log104 : RuntimeLibcallImpl; def __svml_log108 : RuntimeLibcallImpl; def __svml_log10f16 : RuntimeLibcallImpl; def __svml_log10f4 : RuntimeLibcallImpl; def __svml_log10f8 : RuntimeLibcallImpl; def __svml_log2 : RuntimeLibcallImpl; def __svml_log22 : RuntimeLibcallImpl; def __svml_log24 : RuntimeLibcallImpl; def __svml_log28 : RuntimeLibcallImpl; def __svml_log2f16 : RuntimeLibcallImpl; def __svml_log2f4 : RuntimeLibcallImpl; def __svml_log2f8 : RuntimeLibcallImpl; def __svml_log4 : RuntimeLibcallImpl; def __svml_log8 : RuntimeLibcallImpl; def __svml_logf16 : RuntimeLibcallImpl; def __svml_logf4 : RuntimeLibcallImpl; def __svml_logf8 : RuntimeLibcallImpl; def __svml_pow2 : RuntimeLibcallImpl; def __svml_pow4 : RuntimeLibcallImpl; def __svml_pow8 : RuntimeLibcallImpl; def __svml_powf16 : RuntimeLibcallImpl; def __svml_powf4 : RuntimeLibcallImpl; def __svml_powf8 : RuntimeLibcallImpl; def __svml_sin2 : RuntimeLibcallImpl; def __svml_sin4 : RuntimeLibcallImpl; def __svml_sin8 : RuntimeLibcallImpl; def __svml_sinf16 : RuntimeLibcallImpl; def __svml_sinf4 : RuntimeLibcallImpl; def __svml_sinf8 : RuntimeLibcallImpl; def __svml_sqrt2 : RuntimeLibcallImpl; def __svml_sqrt4 : RuntimeLibcallImpl; def __svml_sqrt8 : RuntimeLibcallImpl; def __svml_sqrtf16 : RuntimeLibcallImpl; def __svml_sqrtf4 : RuntimeLibcallImpl; def __svml_sqrtf8 : RuntimeLibcallImpl; def __svml_tan2 : RuntimeLibcallImpl; def __svml_tan4 : RuntimeLibcallImpl; def __svml_tan8 : RuntimeLibcallImpl; def __svml_tanf16 : RuntimeLibcallImpl; def __svml_tanf4 : RuntimeLibcallImpl; def __svml_tanf8 : RuntimeLibcallImpl; } //===----------------------------------------------------------------------===// // SIMD Library for Evaluating Elementary Functions //===----------------------------------------------------------------------===// defset list SLEEFGNUABI_VF2_VECFUNCS = { def _ZGVnN2v_acos : RuntimeLibcallImpl; def _ZGVnN2v_acosh : RuntimeLibcallImpl; def _ZGVnN2v_asin : RuntimeLibcallImpl; def _ZGVnN2v_asinh : RuntimeLibcallImpl; def _ZGVnN2v_atan : RuntimeLibcallImpl; def _ZGVnN2v_atanh : RuntimeLibcallImpl; def _ZGVnN2v_cbrt : RuntimeLibcallImpl; def _ZGVnN2v_cos : RuntimeLibcallImpl; def _ZGVnN2v_cosh : RuntimeLibcallImpl; def _ZGVnN2v_cospi : RuntimeLibcallImpl; def _ZGVnN2v_erf : RuntimeLibcallImpl; def _ZGVnN2v_erfc : RuntimeLibcallImpl; def _ZGVnN2v_exp : RuntimeLibcallImpl; def _ZGVnN2v_exp10 : RuntimeLibcallImpl; def _ZGVnN2v_exp2 : RuntimeLibcallImpl; def _ZGVnN2v_expm1 : RuntimeLibcallImpl; def _ZGVnN2v_ilogb : RuntimeLibcallImpl; def _ZGVnN2v_lgamma : RuntimeLibcallImpl; def _ZGVnN2v_log : RuntimeLibcallImpl; def _ZGVnN2v_log10 : RuntimeLibcallImpl; def _ZGVnN2v_log1p : RuntimeLibcallImpl; def _ZGVnN2v_log2 : RuntimeLibcallImpl; def _ZGVnN2v_sin : RuntimeLibcallImpl; def _ZGVnN2v_sinh : RuntimeLibcallImpl; def _ZGVnN2v_sinpi : RuntimeLibcallImpl; def _ZGVnN2v_sqrt : RuntimeLibcallImpl; def _ZGVnN2v_tan : RuntimeLibcallImpl; def _ZGVnN2v_tanh : RuntimeLibcallImpl; def _ZGVnN2v_tgamma : RuntimeLibcallImpl; def _ZGVnN2vl8_modf : RuntimeLibcallImpl; def _ZGVnN2vl8l8_sincos : RuntimeLibcallImpl; def _ZGVnN2vl8l8_sincospi : RuntimeLibcallImpl; def _ZGVnN2vv_atan2 : RuntimeLibcallImpl; def _ZGVnN2vv_copysign : RuntimeLibcallImpl; def _ZGVnN2vv_fdim : RuntimeLibcallImpl; def _ZGVnN2vv_fmax : RuntimeLibcallImpl; def _ZGVnN2vv_fmin : RuntimeLibcallImpl; def _ZGVnN2vv_fmod : RuntimeLibcallImpl; def _ZGVnN2vv_hypot : RuntimeLibcallImpl; def _ZGVnN2vv_ldexp : RuntimeLibcallImpl; def _ZGVnN2vv_nextafter : RuntimeLibcallImpl; def _ZGVnN2vv_pow : RuntimeLibcallImpl; def _ZGVnN2vvv_fma : RuntimeLibcallImpl; } defset list SLEEFGNUABI_VF4_VECFUNCS = { def _ZGVnN4v_acosf : RuntimeLibcallImpl; def _ZGVnN4v_acoshf : RuntimeLibcallImpl; def _ZGVnN4v_asinf : RuntimeLibcallImpl; def _ZGVnN4v_asinhf : RuntimeLibcallImpl; def _ZGVnN4v_atanf : RuntimeLibcallImpl; def _ZGVnN4v_atanhf : RuntimeLibcallImpl; def _ZGVnN4v_cbrtf : RuntimeLibcallImpl; def _ZGVnN4v_cosf : RuntimeLibcallImpl; def _ZGVnN4v_coshf : RuntimeLibcallImpl; def _ZGVnN4v_cospif : RuntimeLibcallImpl; def _ZGVnN4v_erfcf : RuntimeLibcallImpl; def _ZGVnN4v_erff : RuntimeLibcallImpl; def _ZGVnN4v_exp10f : RuntimeLibcallImpl; def _ZGVnN4v_exp2f : RuntimeLibcallImpl; def _ZGVnN4v_expf : RuntimeLibcallImpl; def _ZGVnN4v_expm1f : RuntimeLibcallImpl; def _ZGVnN4v_ilogbf : RuntimeLibcallImpl; def _ZGVnN4v_lgammaf : RuntimeLibcallImpl; def _ZGVnN4v_log10f : RuntimeLibcallImpl; def _ZGVnN4v_log1pf : RuntimeLibcallImpl; def _ZGVnN4v_log2f : RuntimeLibcallImpl; def _ZGVnN4v_logf : RuntimeLibcallImpl; def _ZGVnN4v_sinf : RuntimeLibcallImpl; def _ZGVnN4v_sinhf : RuntimeLibcallImpl; def _ZGVnN4v_sinpif : RuntimeLibcallImpl; def _ZGVnN4v_sqrtf : RuntimeLibcallImpl; def _ZGVnN4v_tanf : RuntimeLibcallImpl; def _ZGVnN4v_tanhf : RuntimeLibcallImpl; def _ZGVnN4v_tgammaf : RuntimeLibcallImpl; def _ZGVnN4vl4_modff : RuntimeLibcallImpl; def _ZGVnN4vl4l4_sincosf : RuntimeLibcallImpl; def _ZGVnN4vl4l4_sincospif : RuntimeLibcallImpl; def _ZGVnN4vv_atan2f : RuntimeLibcallImpl; def _ZGVnN4vv_copysignf : RuntimeLibcallImpl; def _ZGVnN4vv_fdimf : RuntimeLibcallImpl; def _ZGVnN4vv_fmaxf : RuntimeLibcallImpl; def _ZGVnN4vv_fminf : RuntimeLibcallImpl; def _ZGVnN4vv_fmodf : RuntimeLibcallImpl; def _ZGVnN4vv_hypotf : RuntimeLibcallImpl; def _ZGVnN4vv_ldexpf : RuntimeLibcallImpl; def _ZGVnN4vv_nextafterf : RuntimeLibcallImpl; def _ZGVnN4vv_powf : RuntimeLibcallImpl; def _ZGVnN4vvv_fmaf : RuntimeLibcallImpl; } defset list SLEEFGNUABI_SCALABLE_VECFUNCS = { def _ZGVsMxv_acos : RuntimeLibcallImpl; def _ZGVsMxv_acosf : RuntimeLibcallImpl; def _ZGVsMxv_acosh : RuntimeLibcallImpl; def _ZGVsMxv_acoshf : RuntimeLibcallImpl; def _ZGVsMxv_asin : RuntimeLibcallImpl; def _ZGVsMxv_asinf : RuntimeLibcallImpl; def _ZGVsMxv_asinh : RuntimeLibcallImpl; def _ZGVsMxv_asinhf : RuntimeLibcallImpl; def _ZGVsMxv_atan : RuntimeLibcallImpl; def _ZGVsMxv_atanf : RuntimeLibcallImpl; def _ZGVsMxv_atanh : RuntimeLibcallImpl; def _ZGVsMxv_atanhf : RuntimeLibcallImpl; def _ZGVsMxv_cbrt : RuntimeLibcallImpl; def _ZGVsMxv_cbrtf : RuntimeLibcallImpl; def _ZGVsMxv_cos : RuntimeLibcallImpl; def _ZGVsMxv_cosf : RuntimeLibcallImpl; def _ZGVsMxv_cosh : RuntimeLibcallImpl; def _ZGVsMxv_coshf : RuntimeLibcallImpl; def _ZGVsMxv_cospi : RuntimeLibcallImpl; def _ZGVsMxv_cospif : RuntimeLibcallImpl; def _ZGVsMxv_erf : RuntimeLibcallImpl; def _ZGVsMxv_erfc : RuntimeLibcallImpl; def _ZGVsMxv_erfcf : RuntimeLibcallImpl; def _ZGVsMxv_erff : RuntimeLibcallImpl; def _ZGVsMxv_exp : RuntimeLibcallImpl; def _ZGVsMxv_exp10 : RuntimeLibcallImpl; def _ZGVsMxv_exp10f : RuntimeLibcallImpl; def _ZGVsMxv_exp2 : RuntimeLibcallImpl; def _ZGVsMxv_exp2f : RuntimeLibcallImpl; def _ZGVsMxv_expf : RuntimeLibcallImpl; def _ZGVsMxv_expm1 : RuntimeLibcallImpl; def _ZGVsMxv_expm1f : RuntimeLibcallImpl; def _ZGVsMxv_ilogb : RuntimeLibcallImpl; def _ZGVsMxv_ilogbf : RuntimeLibcallImpl; def _ZGVsMxv_lgamma : RuntimeLibcallImpl; def _ZGVsMxv_lgammaf : RuntimeLibcallImpl; def _ZGVsMxv_log : RuntimeLibcallImpl; def _ZGVsMxv_log10 : RuntimeLibcallImpl; def _ZGVsMxv_log10f : RuntimeLibcallImpl; def _ZGVsMxv_log1p : RuntimeLibcallImpl; def _ZGVsMxv_log1pf : RuntimeLibcallImpl; def _ZGVsMxv_log2 : RuntimeLibcallImpl; def _ZGVsMxv_log2f : RuntimeLibcallImpl; def _ZGVsMxv_logf : RuntimeLibcallImpl; def _ZGVsMxv_sin : RuntimeLibcallImpl; def _ZGVsMxv_sinf : RuntimeLibcallImpl; def _ZGVsMxv_sinh : RuntimeLibcallImpl; def _ZGVsMxv_sinhf : RuntimeLibcallImpl; def _ZGVsMxv_sinpi : RuntimeLibcallImpl; def _ZGVsMxv_sinpif : RuntimeLibcallImpl; def _ZGVsMxv_sqrt : RuntimeLibcallImpl; def _ZGVsMxv_sqrtf : RuntimeLibcallImpl; def _ZGVsMxv_tan : RuntimeLibcallImpl; def _ZGVsMxv_tanf : RuntimeLibcallImpl; def _ZGVsMxv_tanh : RuntimeLibcallImpl; def _ZGVsMxv_tanhf : RuntimeLibcallImpl; def _ZGVsMxv_tgamma : RuntimeLibcallImpl; def _ZGVsMxv_tgammaf : RuntimeLibcallImpl; def _ZGVsMxvv_atan2 : RuntimeLibcallImpl; def _ZGVsMxvv_atan2f : RuntimeLibcallImpl; def _ZGVsMxvv_copysign : RuntimeLibcallImpl; def _ZGVsMxvv_copysignf : RuntimeLibcallImpl; def _ZGVsMxvv_fdim : RuntimeLibcallImpl; def _ZGVsMxvv_fdimf : RuntimeLibcallImpl; def _ZGVsMxvv_fmax : RuntimeLibcallImpl; def _ZGVsMxvv_fmaxf : RuntimeLibcallImpl; def _ZGVsMxvv_fmin : RuntimeLibcallImpl; def _ZGVsMxvv_fminf : RuntimeLibcallImpl; def _ZGVsMxvv_fmod : RuntimeLibcallImpl; def _ZGVsMxvv_fmodf : RuntimeLibcallImpl; def _ZGVsMxvv_hypot : RuntimeLibcallImpl; def _ZGVsMxvv_hypotf : RuntimeLibcallImpl; def _ZGVsMxvv_ldexp : RuntimeLibcallImpl; def _ZGVsMxvv_ldexpf : RuntimeLibcallImpl; def _ZGVsMxvv_nextafter : RuntimeLibcallImpl; def _ZGVsMxvv_nextafterf : RuntimeLibcallImpl; def _ZGVsMxvv_pow : RuntimeLibcallImpl; def _ZGVsMxvv_powf : RuntimeLibcallImpl; def _ZGVsMxvvv_fma : RuntimeLibcallImpl; def _ZGVsMxvvv_fmaf : RuntimeLibcallImpl; def _ZGVsNxvl8_modf : RuntimeLibcallImpl; def _ZGVsNxvl4_modff : RuntimeLibcallImpl; def _ZGVsNxvl4l4_sincosf : RuntimeLibcallImpl; def _ZGVsNxvl4l4_sincospif : RuntimeLibcallImpl; def _ZGVsNxvl8l8_sincos : RuntimeLibcallImpl; def _ZGVsNxvl8l8_sincospi : RuntimeLibcallImpl; } defset list SLEEFGNUABI_SCALABLE_VECFUNCS_RISCV = { def Sleef_acosdx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_acosfx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_acoshdx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_acoshfx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_asindx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_asinfx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_asinhdx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_asinhfx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_atan2dx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_atan2fx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_atandx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_atanfx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_atanhdx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_atanhfx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_cbrtdx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_cbrtfx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_copysigndx_rvvm2 : RuntimeLibcallImpl; def Sleef_copysignfx_rvvm2 : RuntimeLibcallImpl; def Sleef_cosdx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_cosfx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_coshdx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_coshfx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_cospidx_u05rvvm2 : RuntimeLibcallImpl; def Sleef_cospifx_u05rvvm2 : RuntimeLibcallImpl; def Sleef_erfcdx_u15rvvm2 : RuntimeLibcallImpl; def Sleef_erfcfx_u15rvvm2 : RuntimeLibcallImpl; def Sleef_erfdx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_erffx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_exp10dx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_exp10fx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_exp2dx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_exp2fx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_expdx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_expfx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_expm1dx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_expm1fx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_fdimdx_rvvm2 : RuntimeLibcallImpl; def Sleef_fdimfx_rvvm2 : RuntimeLibcallImpl; def Sleef_fmadx_rvvm2 : RuntimeLibcallImpl; def Sleef_fmafx_rvvm2 : RuntimeLibcallImpl; def Sleef_fmaxdx_rvvm2 : RuntimeLibcallImpl; def Sleef_fmaxfx_rvvm2 : RuntimeLibcallImpl; def Sleef_fmindx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_fminfx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_fmoddx_rvvm2 : RuntimeLibcallImpl; def Sleef_fmodfx_rvvm2 : RuntimeLibcallImpl; def Sleef_hypotdx_u05rvvm2 : RuntimeLibcallImpl; def Sleef_hypotfx_u05rvvm2 : RuntimeLibcallImpl; def Sleef_ilogbdx_rvvm2 : RuntimeLibcallImpl; def Sleef_ilogbfx_rvvm2 : RuntimeLibcallImpl; def Sleef_ldexpdx_rvvm2 : RuntimeLibcallImpl; def Sleef_ldexpfx_rvvm2 : RuntimeLibcallImpl; def Sleef_lgammadx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_lgammafx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_log10dx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_log10fx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_log1pdx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_log1pfx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_log2dx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_log2fx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_logdx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_logfx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_modfdx_rvvm2 : RuntimeLibcallImpl; def Sleef_modffx_rvvm2 : RuntimeLibcallImpl; def Sleef_nextafterdx_rvvm2 : RuntimeLibcallImpl; def Sleef_nextafterfx_rvvm2 : RuntimeLibcallImpl; def Sleef_powdx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_powfx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_sincosdx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_sincosfx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_sincospidx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_sincospifx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_sindx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_sinfx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_sinhdx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_sinhfx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_sinpidx_u05rvvm2 : RuntimeLibcallImpl; def Sleef_sinpifx_u05rvvm2 : RuntimeLibcallImpl; def Sleef_sqrtdx_u05rvvm2 : RuntimeLibcallImpl; def Sleef_sqrtfx_u05rvvm2 : RuntimeLibcallImpl; def Sleef_tandx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_tanfx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_tanhdx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_tanhfx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_tgammadx_u10rvvm2 : RuntimeLibcallImpl; def Sleef_tgammafx_u10rvvm2 : RuntimeLibcallImpl; } //===----------------------------------------------------------------------===// // Arm Performance Libraries (ARMPL) functions //===----------------------------------------------------------------------===// defset list ARMPL_VECFUNCS = { def armpl_svacos_f32_x : RuntimeLibcallImpl; def armpl_svacos_f64_x : RuntimeLibcallImpl; def armpl_svacosh_f32_x : RuntimeLibcallImpl; def armpl_svacosh_f64_x : RuntimeLibcallImpl; def armpl_svasin_f32_x : RuntimeLibcallImpl; def armpl_svasin_f64_x : RuntimeLibcallImpl; def armpl_svasinh_f32_x : RuntimeLibcallImpl; def armpl_svasinh_f64_x : RuntimeLibcallImpl; def armpl_svatan2_f32_x : RuntimeLibcallImpl; def armpl_svatan2_f64_x : RuntimeLibcallImpl; def armpl_svatan_f32_x : RuntimeLibcallImpl; def armpl_svatan_f64_x : RuntimeLibcallImpl; def armpl_svatanh_f32_x : RuntimeLibcallImpl; def armpl_svatanh_f64_x : RuntimeLibcallImpl; def armpl_svcbrt_f32_x : RuntimeLibcallImpl; def armpl_svcbrt_f64_x : RuntimeLibcallImpl; def armpl_svcopysign_f32_x : RuntimeLibcallImpl; def armpl_svcopysign_f64_x : RuntimeLibcallImpl; def armpl_svcos_f32_x : RuntimeLibcallImpl; def armpl_svcos_f64_x : RuntimeLibcallImpl; def armpl_svcosh_f32_x : RuntimeLibcallImpl; def armpl_svcosh_f64_x : RuntimeLibcallImpl; def armpl_svcospi_f32_x : RuntimeLibcallImpl; def armpl_svcospi_f64_x : RuntimeLibcallImpl; def armpl_sverf_f32_x : RuntimeLibcallImpl; def armpl_sverf_f64_x : RuntimeLibcallImpl; def armpl_sverfc_f32_x : RuntimeLibcallImpl; def armpl_sverfc_f64_x : RuntimeLibcallImpl; def armpl_svexp10_f32_x : RuntimeLibcallImpl; def armpl_svexp10_f64_x : RuntimeLibcallImpl; def armpl_svexp2_f32_x : RuntimeLibcallImpl; def armpl_svexp2_f64_x : RuntimeLibcallImpl; def armpl_svexp_f32_x : RuntimeLibcallImpl; def armpl_svexp_f64_x : RuntimeLibcallImpl; def armpl_svexpm1_f32_x : RuntimeLibcallImpl; def armpl_svexpm1_f64_x : RuntimeLibcallImpl; def armpl_svfdim_f32_x : RuntimeLibcallImpl; def armpl_svfdim_f64_x : RuntimeLibcallImpl; def armpl_svfma_f32_x : RuntimeLibcallImpl; def armpl_svfma_f64_x : RuntimeLibcallImpl; def armpl_svfmax_f32_x : RuntimeLibcallImpl; def armpl_svfmax_f64_x : RuntimeLibcallImpl; def armpl_svfmin_f32_x : RuntimeLibcallImpl; def armpl_svfmin_f64_x : RuntimeLibcallImpl; def armpl_svfmod_f32_x : RuntimeLibcallImpl; def armpl_svfmod_f64_x : RuntimeLibcallImpl; def armpl_svhypot_f32_x : RuntimeLibcallImpl; def armpl_svhypot_f64_x : RuntimeLibcallImpl; def armpl_svilogb_f32_x : RuntimeLibcallImpl; def armpl_svilogb_f64_x : RuntimeLibcallImpl; def armpl_svldexp_f32_x : RuntimeLibcallImpl; def armpl_svldexp_f64_x : RuntimeLibcallImpl; def armpl_svlgamma_f32_x : RuntimeLibcallImpl; def armpl_svlgamma_f64_x : RuntimeLibcallImpl; def armpl_svlog10_f32_x : RuntimeLibcallImpl; def armpl_svlog10_f64_x : RuntimeLibcallImpl; def armpl_svlog1p_f32_x : RuntimeLibcallImpl; def armpl_svlog1p_f64_x : RuntimeLibcallImpl; def armpl_svlog2_f32_x : RuntimeLibcallImpl; def armpl_svlog2_f64_x : RuntimeLibcallImpl; def armpl_svlog_f32_x : RuntimeLibcallImpl; def armpl_svlog_f64_x : RuntimeLibcallImpl; def armpl_svmodf_f32_x : RuntimeLibcallImpl; def armpl_svmodf_f64_x : RuntimeLibcallImpl; def armpl_svnextafter_f32_x : RuntimeLibcallImpl; def armpl_svnextafter_f64_x : RuntimeLibcallImpl; def armpl_svpow_f32_x : RuntimeLibcallImpl; def armpl_svpow_f64_x : RuntimeLibcallImpl; def armpl_svsin_f32_x : RuntimeLibcallImpl; def armpl_svsin_f64_x : RuntimeLibcallImpl; def armpl_svsincos_f32_x : RuntimeLibcallImpl; def armpl_svsincos_f64_x : RuntimeLibcallImpl; def armpl_svsincospi_f32_x : RuntimeLibcallImpl; def armpl_svsincospi_f64_x : RuntimeLibcallImpl; def armpl_svsinh_f32_x : RuntimeLibcallImpl; def armpl_svsinh_f64_x : RuntimeLibcallImpl; def armpl_svsinpi_f32_x : RuntimeLibcallImpl; def armpl_svsinpi_f64_x : RuntimeLibcallImpl; def armpl_svsqrt_f32_x : RuntimeLibcallImpl; def armpl_svsqrt_f64_x : RuntimeLibcallImpl; def armpl_svtan_f32_x : RuntimeLibcallImpl; def armpl_svtan_f64_x : RuntimeLibcallImpl; def armpl_svtanh_f32_x : RuntimeLibcallImpl; def armpl_svtanh_f64_x : RuntimeLibcallImpl; def armpl_svtgamma_f32_x : RuntimeLibcallImpl; def armpl_svtgamma_f64_x : RuntimeLibcallImpl; def armpl_vacoshq_f32 : RuntimeLibcallImpl; def armpl_vacoshq_f64 : RuntimeLibcallImpl; def armpl_vacosq_f32 : RuntimeLibcallImpl; def armpl_vacosq_f64 : RuntimeLibcallImpl; def armpl_vasinhq_f32 : RuntimeLibcallImpl; def armpl_vasinhq_f64 : RuntimeLibcallImpl; def armpl_vasinq_f32 : RuntimeLibcallImpl; def armpl_vasinq_f64 : RuntimeLibcallImpl; def armpl_vatan2q_f32 : RuntimeLibcallImpl; def armpl_vatan2q_f64 : RuntimeLibcallImpl; def armpl_vatanhq_f32 : RuntimeLibcallImpl; def armpl_vatanhq_f64 : RuntimeLibcallImpl; def armpl_vatanq_f32 : RuntimeLibcallImpl; def armpl_vatanq_f64 : RuntimeLibcallImpl; def armpl_vcbrtq_f32 : RuntimeLibcallImpl; def armpl_vcbrtq_f64 : RuntimeLibcallImpl; def armpl_vcopysignq_f32 : RuntimeLibcallImpl; def armpl_vcopysignq_f64 : RuntimeLibcallImpl; def armpl_vcoshq_f32 : RuntimeLibcallImpl; def armpl_vcoshq_f64 : RuntimeLibcallImpl; def armpl_vcospiq_f32 : RuntimeLibcallImpl; def armpl_vcospiq_f64 : RuntimeLibcallImpl; def armpl_vcosq_f32 : RuntimeLibcallImpl; def armpl_vcosq_f64 : RuntimeLibcallImpl; def armpl_verfcq_f32 : RuntimeLibcallImpl; def armpl_verfcq_f64 : RuntimeLibcallImpl; def armpl_verfq_f32 : RuntimeLibcallImpl; def armpl_verfq_f64 : RuntimeLibcallImpl; def armpl_vexp10q_f32 : RuntimeLibcallImpl; def armpl_vexp10q_f64 : RuntimeLibcallImpl; def armpl_vexp2q_f32 : RuntimeLibcallImpl; def armpl_vexp2q_f64 : RuntimeLibcallImpl; def armpl_vexpm1q_f32 : RuntimeLibcallImpl; def armpl_vexpm1q_f64 : RuntimeLibcallImpl; def armpl_vexpq_f32 : RuntimeLibcallImpl; def armpl_vexpq_f64 : RuntimeLibcallImpl; def armpl_vfdimq_f32 : RuntimeLibcallImpl; def armpl_vfdimq_f64 : RuntimeLibcallImpl; def armpl_vfmaq_f32 : RuntimeLibcallImpl; def armpl_vfmaq_f64 : RuntimeLibcallImpl; def armpl_vfmaxq_f32 : RuntimeLibcallImpl; def armpl_vfmaxq_f64 : RuntimeLibcallImpl; def armpl_vfminq_f32 : RuntimeLibcallImpl; def armpl_vfminq_f64 : RuntimeLibcallImpl; def armpl_vfmodq_f32 : RuntimeLibcallImpl; def armpl_vfmodq_f64 : RuntimeLibcallImpl; def armpl_vhypotq_f32 : RuntimeLibcallImpl; def armpl_vhypotq_f64 : RuntimeLibcallImpl; def armpl_vilogbq_f32 : RuntimeLibcallImpl; def armpl_vilogbq_f64 : RuntimeLibcallImpl; def armpl_vldexpq_f32 : RuntimeLibcallImpl; def armpl_vldexpq_f64 : RuntimeLibcallImpl; def armpl_vlgammaq_f32 : RuntimeLibcallImpl; def armpl_vlgammaq_f64 : RuntimeLibcallImpl; def armpl_vlog10q_f32 : RuntimeLibcallImpl; def armpl_vlog10q_f64 : RuntimeLibcallImpl; def armpl_vlog1pq_f32 : RuntimeLibcallImpl; def armpl_vlog1pq_f64 : RuntimeLibcallImpl; def armpl_vlog2q_f32 : RuntimeLibcallImpl; def armpl_vlog2q_f64 : RuntimeLibcallImpl; def armpl_vlogq_f32 : RuntimeLibcallImpl; def armpl_vlogq_f64 : RuntimeLibcallImpl; def armpl_vmodfq_f32 : RuntimeLibcallImpl; def armpl_vmodfq_f64 : RuntimeLibcallImpl; def armpl_vnextafterq_f32 : RuntimeLibcallImpl; def armpl_vnextafterq_f64 : RuntimeLibcallImpl; def armpl_vpowq_f32 : RuntimeLibcallImpl; def armpl_vpowq_f64 : RuntimeLibcallImpl; def armpl_vsincospiq_f32 : RuntimeLibcallImpl; def armpl_vsincospiq_f64 : RuntimeLibcallImpl; def armpl_vsincosq_f32 : RuntimeLibcallImpl; def armpl_vsincosq_f64 : RuntimeLibcallImpl; def armpl_vsinhq_f32 : RuntimeLibcallImpl; def armpl_vsinhq_f64 : RuntimeLibcallImpl; def armpl_vsinpiq_f32 : RuntimeLibcallImpl; def armpl_vsinpiq_f64 : RuntimeLibcallImpl; def armpl_vsinq_f32 : RuntimeLibcallImpl; def armpl_vsinq_f64 : RuntimeLibcallImpl; def armpl_vsqrtq_f32 : RuntimeLibcallImpl; def armpl_vsqrtq_f64 : RuntimeLibcallImpl; def armpl_vtanhq_f32 : RuntimeLibcallImpl; def armpl_vtanhq_f64 : RuntimeLibcallImpl; def armpl_vtanq_f32 : RuntimeLibcallImpl; def armpl_vtanq_f64 : RuntimeLibcallImpl; def armpl_vtgammaq_f32 : RuntimeLibcallImpl; def armpl_vtgammaq_f64 : RuntimeLibcallImpl; } //===----------------------------------------------------------------------===// // AMD vector math library (AMDLIBM) functions //===----------------------------------------------------------------------===// defset list AMDLIBM_VECFUNCS = { def amd_vrd2_atan : RuntimeLibcallImpl; def amd_vrd2_cbrt : RuntimeLibcallImpl; def amd_vrd2_cos : RuntimeLibcallImpl; def amd_vrd2_erf : RuntimeLibcallImpl; def amd_vrd2_exp : RuntimeLibcallImpl; def amd_vrd2_exp10 : RuntimeLibcallImpl; def amd_vrd2_exp2 : RuntimeLibcallImpl; def amd_vrd2_log : RuntimeLibcallImpl; def amd_vrd2_log10 : RuntimeLibcallImpl; def amd_vrd2_log1p : RuntimeLibcallImpl; def amd_vrd2_log2 : RuntimeLibcallImpl; def amd_vrd2_pow : RuntimeLibcallImpl; def amd_vrd2_sin : RuntimeLibcallImpl; def amd_vrd2_sincos : RuntimeLibcallImpl; def amd_vrd2_tan : RuntimeLibcallImpl; def amd_vrd4_atan : RuntimeLibcallImpl; def amd_vrd4_cos : RuntimeLibcallImpl; def amd_vrd4_erf : RuntimeLibcallImpl; def amd_vrd4_exp : RuntimeLibcallImpl; def amd_vrd4_exp2 : RuntimeLibcallImpl; def amd_vrd4_log : RuntimeLibcallImpl; def amd_vrd4_log2 : RuntimeLibcallImpl; def amd_vrd4_pow : RuntimeLibcallImpl; def amd_vrd4_sin : RuntimeLibcallImpl; def amd_vrd4_sincos : RuntimeLibcallImpl; def amd_vrd4_tan : RuntimeLibcallImpl; def amd_vrd8_asin : RuntimeLibcallImpl; def amd_vrd8_atan : RuntimeLibcallImpl; def amd_vrd8_cos : RuntimeLibcallImpl; def amd_vrd8_erf : RuntimeLibcallImpl; def amd_vrd8_exp : RuntimeLibcallImpl; def amd_vrd8_exp2 : RuntimeLibcallImpl; def amd_vrd8_log : RuntimeLibcallImpl; def amd_vrd8_log2 : RuntimeLibcallImpl; def amd_vrd8_pow : RuntimeLibcallImpl; def amd_vrd8_sin : RuntimeLibcallImpl; def amd_vrd8_sincos : RuntimeLibcallImpl; def amd_vrd8_tan : RuntimeLibcallImpl; def amd_vrd2_erfinv : RuntimeLibcallImpl; def amd_vrd4_erfinv : RuntimeLibcallImpl; def amd_vrd8_erfinv : RuntimeLibcallImpl; def amd_vrd2_erfcinv : RuntimeLibcallImpl; def amd_vrd4_erfcinv : RuntimeLibcallImpl; def amd_vrd8_erfcinv : RuntimeLibcallImpl; def amd_vrs16_acosf : RuntimeLibcallImpl; def amd_vrs16_asinf : RuntimeLibcallImpl; def amd_vrs16_atanf : RuntimeLibcallImpl; def amd_vrs16_cosf : RuntimeLibcallImpl; def amd_vrs16_erff : RuntimeLibcallImpl; def amd_vrs16_exp2f : RuntimeLibcallImpl; def amd_vrs16_expf : RuntimeLibcallImpl; def amd_vrs16_log10f : RuntimeLibcallImpl; def amd_vrs16_log2f : RuntimeLibcallImpl; def amd_vrs16_logf : RuntimeLibcallImpl; def amd_vrs16_powf : RuntimeLibcallImpl; def amd_vrs16_sincosf : RuntimeLibcallImpl; def amd_vrs16_sinf : RuntimeLibcallImpl; def amd_vrs16_tanf : RuntimeLibcallImpl; def amd_vrs16_tanhf : RuntimeLibcallImpl; def amd_vrs4_acosf : RuntimeLibcallImpl; def amd_vrs4_asinf : RuntimeLibcallImpl; def amd_vrs4_atanf : RuntimeLibcallImpl; def amd_vrs4_cbrtf : RuntimeLibcallImpl; def amd_vrs4_cosf : RuntimeLibcallImpl; def amd_vrs4_coshf : RuntimeLibcallImpl; def amd_vrs4_erff : RuntimeLibcallImpl; def amd_vrs4_exp10f : RuntimeLibcallImpl; def amd_vrs4_exp2f : RuntimeLibcallImpl; def amd_vrs4_expf : RuntimeLibcallImpl; def amd_vrs4_expm1f : RuntimeLibcallImpl; def amd_vrs4_log10f : RuntimeLibcallImpl; def amd_vrs4_log1pf : RuntimeLibcallImpl; def amd_vrs4_log2f : RuntimeLibcallImpl; def amd_vrs4_logf : RuntimeLibcallImpl; def amd_vrs4_powf : RuntimeLibcallImpl; def amd_vrs4_sincosf : RuntimeLibcallImpl; def amd_vrs4_sinf : RuntimeLibcallImpl; def amd_vrs4_tanf : RuntimeLibcallImpl; def amd_vrs4_tanhf : RuntimeLibcallImpl; def amd_vrs8_acosf : RuntimeLibcallImpl; def amd_vrs8_asinf : RuntimeLibcallImpl; def amd_vrs8_atanf : RuntimeLibcallImpl; def amd_vrs8_cosf : RuntimeLibcallImpl; def amd_vrs8_coshf : RuntimeLibcallImpl; def amd_vrs8_erff : RuntimeLibcallImpl; def amd_vrs8_exp2f : RuntimeLibcallImpl; def amd_vrs8_expf : RuntimeLibcallImpl; def amd_vrs8_log10f : RuntimeLibcallImpl; def amd_vrs8_log2f : RuntimeLibcallImpl; def amd_vrs8_logf : RuntimeLibcallImpl; def amd_vrs8_powf : RuntimeLibcallImpl; def amd_vrs8_sincosf : RuntimeLibcallImpl; def amd_vrs8_sinf : RuntimeLibcallImpl; def amd_vrs8_tanf : RuntimeLibcallImpl; def amd_vrs8_tanhf : RuntimeLibcallImpl; def amd_vrd2_cdfnorm : RuntimeLibcallImpl; def amd_vrd4_cdfnorm : RuntimeLibcallImpl; def amd_vrd8_cdfnorm : RuntimeLibcallImpl; def amd_vrd2_cdfnorminv : RuntimeLibcallImpl; def amd_vrd4_cdfnorminv : RuntimeLibcallImpl; def amd_vrd8_cdfnorminv : RuntimeLibcallImpl; def amd_vrs4_roundf : RuntimeLibcallImpl; def amd_vrs8_roundf : RuntimeLibcallImpl; def amd_vrs16_roundf : RuntimeLibcallImpl; def amd_vrd2_round : RuntimeLibcallImpl; def amd_vrd4_round : RuntimeLibcallImpl; def amd_vrd8_round : RuntimeLibcallImpl; }