summaryrefslogtreecommitdiff
path: root/lib/builtins/emutls.c
AgeCommit message (Collapse)Author
2017-08-03[builtins] Use Interlocked* intrinsics for atomics on MSVCMartin Storsjo
Tested on MSVC 2013, 2015 and 2017 targeting X86, X64 and ARM. This fixes building emutls.c for Windows for ARM (both with clang which don't need these atomics fallbacks at all, but just failed due to the immintrin.h include before, and with MSVC). Differential Revision: https://reviews.llvm.org/D36071 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309974 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-06[builtins] Fixup emulated TLS for mingw.Martell Malone
Enabled emulated TLS on WOA for mingw Fix <windows.h> include for mingw Reviewed By: chapuni, mstorsjo Subscribers: compnerd, llvm-commits Differential Revision: https://reviews.llvm.org/D32681 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@302340 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-25[builtins] Implement emulated TLS on Windows.Frederich Munch
Summary: LLVM JIT needs to be able to use emulated TLS on all platforms, and this provides a reference one can compile to enable emutls for Linux/Mac/Windows. Reviewers: chh, howard.hinnant Reviewed By: chh Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D30787 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301350 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24Revert r301089 "[builtins] Implement emulated TLS on Windows."Hans Wennborg
This broke the self-host build on Windows (PR32777). Original commit message: > [builtins] Implement emulated TLS on Windows. > > Summary: > LLVM JIT needs to be able to use emulated TLS on all platforms, and this provides a reference one can compile to enable emutls for Linux/Mac/Windows. > > Reviewers: chh, howard.hinnant > > Reviewed By: chh > > Subscribers: mgorny, llvm-commits > > Differential Revision: https://reviews.llvm.org/D30787 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301274 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-22[builtins] Implement emulated TLS on Windows.Frederich Munch
Summary: LLVM JIT needs to be able to use emulated TLS on all platforms, and this provides a reference one can compile to enable emutls for Linux/Mac/Windows. Reviewers: chh, howard.hinnant Reviewed By: chh Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D30787 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301089 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-14Fix StaticAnalyzer complaints. NFC.George Burgess IV
Clang's StaticAnalyzer seems to (correctly) complain about code like: T *p = calloc(sizeof(U), N); ...Where T and U are different types. This patch removes some instances of this pattern from compiler-rt. Patch by Apelete Seketeli. Differential Revision: http://reviews.llvm.org/D19085 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@266388 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-04builtins: Fix struct __emutls_control to match GCCChih-Hung Hsieh
The type of size and align in struct __emutls_control must be typedef unsigned int gcc_word __attribute__((mode(word))); to match GCC. When gcc_word is larger than size_t, which is the case for x32, the upper extra bits are all zeros. We can use variables of size_t to operate on size and align. Fix one trivial C99 warning about mixed declaration and code. Differential Revision: http://reviews.llvm.org/D16886 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@259824 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-10builtins: spell inline as __inlineSaleem Abdulrasool
__inline is a vendor specific spelling for inline. clang and gcc treat it the same as inline, and is available in MSVC 2013 which does not implement C99 (VS2015 supports the inline keyword though). This will allow us to build the builtins using MSVC. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@249953 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-06builtins: fix buildSaleem Abdulrasool
Unfortunately, int_utils.h needs to depend on int_lib for the common macro definitions. However, currently, int_utils.h is included by int_lib.h. Reorder the inclusion to work around this. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@249376 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-31builtins: implement __emutls_get_addressChih-Hung Hsieh
For targets like Android that depends on libgcc's emulated thread local storage. clang/llvm can generate calls to __emutls_get_address since http://reviews.llvm.org/D10522 and http://reviews.llvm.org/D10524 Differential Revision: http://reviews.llvm.org/D12001 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@246454 91177308-0d34-0410-b5e6-96231b3b80d8