summaryrefslogtreecommitdiff
path: root/lib/builtins/int_lib.h
AgeCommit message (Collapse)Author
2017-10-03[compiler-rt] Add back ARM EABI aliases where legal.Eli Friedman
r303188 removed all the uses of aliases for EABI functions from compiler-rt, because some of them had mismatched calling conventions. Obviously, we can't use aliases for functions which don't have the same calling convention, but that's only an issue for floating-point functions with the hardfloat ABI. In other cases, the stubs increase size and reduce performance for no benefit. This patch adds back the aliases, with appropriate checks to make sure they're only used in cases where the calling convention matches. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@314851 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-16builtins: expand out the AEABI function stubsSaleem Abdulrasool
These actually may change calling conventions. We cannot simply provide function aliases as the aliased function may have a different calling convention. Provide a forwarding function instead to permit the compiler to synthesize the calling convention adjustment thunk. Remove the `ARM_EABI_FNALIAS` macro as that is not safe to use. Resolves PR33030! git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@303188 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-16builtins: use reserved spelling (NFC)Saleem Abdulrasool
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@303138 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29[Builtin] Unxfail tests for armhfWeiming Zhao
Summary: Originally, a few tests fail for armhf target due to: 1) COMPILER_RT_ARMHF_TARGET was not set when building the lib 2) COMPILER_RT_ABI should not be defined as `__attribute__((pcs("aapcs")))` for armhf when building for both lib and tests This address https://bugs.llvm.org//show_bug.cgi?id=32261 mulsc3_test.c is a newly exposed issue, which will be addressed separately. Reviewers: rengolin, compnerd Reviewed By: compnerd Subscribers: aemerson, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D31448 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@298974 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01Use 'unsigned long' to match the APIs of the MS bitscan intrinsicsReid Kleckner
We were getting warnings about how 'uint32_t*' is different from 'unsigned long*' even though they are effectively the same on Windows. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@277363 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-20builtins: remove use of __attribute__((pcs("aapcs"))) on WindowsSaleem Abdulrasool
Windows does not honour the __attribute__((pcs)) on ARM. Although this will result in ABI mismatches, compiler-rt should largely be unneeded for resolving dependencies as we generate MS ABI compliant library calls now for the most part. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@266891 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-22fix a gcc warningNico Weber
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@256256 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-15builtins: __builtin_clzll for x86 on MSVCSaleem Abdulrasool
Add an implementation for __builtin_clzll on MSVC even when _BitScanForward4 is unavailable. Patch by Tee Hao Wei! git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@250359 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-11builtins: define and use ALWAYS_INLINESaleem Abdulrasool
Abstract out the always inline spelling similar to ASAN. NFC. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@249986 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-10builtins: silence a MSVC warningSaleem Abdulrasool
_BitReverse64 is only available on ARM and x64. Guard it accordingly. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@249949 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-07builtins: implement instrinics for clSaleem Abdulrasool
cl does not support the same intrinsics as clang. Provide implementations for the intrinsics using MSVC builtins. Patch by Tee Hao Wei! git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@249515 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-06builtins: Use MSVC-equivalents of attributesSaleem Abdulrasool
This allows us to build the builtins using MSVC. NFC. Patch by Tee Hao Wei! git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@249375 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-21builtins: restrict aliasesSaleem Abdulrasool
MachO and COFF do not support aliases. Restrict the alias to ELF targets. This should also fix the Darwin build. Make the FNALIAS usage an error on non-ELF targets. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@245669 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-21[compiler-rt] Add libgcc compatibility aliases for __cmp{s,d,f}f2.Josh Gao
Reviewers: compnerd Subscribers: asl, llvm-commits Differential Revision: http://reviews.llvm.org/D12091 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@245663 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-22builtins: mark functions as aapcs on WindowsSaleem Abdulrasool
Windows does not use AAPCS, but rather AAPCS-VFP, and thus the functions which are assumed to be AAPCS will cause invalid argument setup. Ensure that the functions are marked as AAPCS. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238056 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-06builtins: remove unnecessary COMPILER_RT_EXPORTSaleem Abdulrasool
This macro did not do anything at this point, and is not particularly needed for Windows unless building the builtins as a shared library. NFC. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217321 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-12builtins: add missing fileSaleem Abdulrasool
Add (missing) definition of COMPILER_RT_EXPORT which is meant to be used for decorating functions that are meant to be exported. This is useful for platforms where exports and imports must be decorated explicitly (i.e. Windows). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208593 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-01Move __clzti2 into 128bit fragment.Joerg Sonnenberger
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202593 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-01Consistently use COMPILER_RT_ABI for all public symbols.Joerg Sonnenberger
Move prototypes into headers and fix a few inconsistencies. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202591 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14Move original compiler-rt functions (libgcc replacement) to lib/builtins ↵Alexey Samsonov
directory git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201393 91177308-0d34-0410-b5e6-96231b3b80d8