summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/builtins/emutls.c
Commit message (Collapse)AuthorAgeFilesLines
* [builtins] MSVC warning disable for clean buildMatthew G McGovern2019-08-121-0/+11
| | | | | | | - https://reviews.llvm.org/D66023 - amended for ifdef/if gcc errors in previous verison llvm-svn: 368598
* Revert "[sanitizers] MSVC warning disable for clean build" and follow-up ↵Eric Christopher2019-08-091-11/+0
| | | | | | | | that tried to fix the build as it's still broken. This reverts commit 368476 and 368480. llvm-svn: 368481
* [sanitizers] MSVC warning disable for clean buildMatthew G McGovern2019-08-091-0/+11
| | | | | | - https://reviews.llvm.org/D66023 llvm-svn: 368476
* [builtins] Use single line C++/C99 comment stylePetr Hosek2019-04-281-69/+60
| | | | | | | | | | | Use the uniform single line C++/99 style for code comments. This is part of the cleanup proposed in "[RFC] compiler-rt builtins cleanup and refactoring". Differential Revision: https://reviews.llvm.org/D60352 llvm-svn: 359411
* [builtins] Reformat builtins with clang-formatPetr Hosek2019-04-281-213/+201
| | | | | | | | | | | Update formatting to use the LLVM style. This is part of the cleanup proposed in "[RFC] compiler-rt builtins cleanup and refactoring". Differential Revision: https://reviews.llvm.org/D60351 llvm-svn: 359410
* Update more file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | | to reflect the new license. These used slightly different spellings that defeated my regular expressions. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351648
* [builtins] Add __emutls_unregister_key functionYi Kong2018-09-201-0/+13
| | | | | | | | | | | | This is called by Bionic on dlclose to delete the emutls pthread key. The return value of pthread_key_delete is unchecked and behaviour of multiple calls to the method is dependent on the implementation of pthread_key_delete. Differential Revision: https://reviews.llvm.org/D52251 llvm-svn: 342608
* [builtins] Delay emutls deallocation for one roundRyan Prichard2018-06-121-11/+41
| | | | | | | | | | | | | | | | | | | | Summary: With Android/Bionic, delay deallocation to round 2 of 4. It must run after C++ thread_local destructors have been called, but before the final 2 rounds, because emutls calls free, and jemalloc then needs another 2 rounds to free its thread-specific data. Fixes https://github.com/android-ndk/ndk/issues/687 Reviewers: cmtice, srhines, jyknight, chh, echristo Reviewed By: srhines, chh, echristo Subscribers: echristo, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D46978 llvm-svn: 334463
* [builtins] emutls cleanup: determine header size using sizeofRyan Prichard2018-06-121-6/+7
| | | | | | | | | | | | | | Summary: Also add a few post-#else/#endif comments Reviewers: echristo, srhines Reviewed By: echristo Subscribers: chh, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D47861 llvm-svn: 334462
* [builtins] Use Interlocked* intrinsics for atomics on MSVCMartin Storsjo2017-08-031-8/+6
| | | | | | | | | | | | 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 llvm-svn: 309974
* [builtins] Fixup emulated TLS for mingw.Martell Malone2017-05-061-1/+1
| | | | | | | | | | | | | 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 llvm-svn: 302340
* [builtins] Implement emulated TLS on Windows.Frederich Munch2017-04-251-60/+234
| | | | | | | | | | | | | | | 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 llvm-svn: 301350
* Revert r301089 "[builtins] Implement emulated TLS on Windows."Hans Wennborg2017-04-241-220/+60
| | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 301274
* [builtins] Implement emulated TLS on Windows.Frederich Munch2017-04-221-60/+220
| | | | | | | | | | | | | | | 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 llvm-svn: 301089
* Fix StaticAnalyzer complaints. NFC.George Burgess IV2016-04-141-2/+4
| | | | | | | | | | | | | | | 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 llvm-svn: 266388
* builtins: Fix struct __emutls_control to match GCCChih-Hung Hsieh2016-02-041-5/+9
| | | | | | | | | | | | | | 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 llvm-svn: 259824
* builtins: spell inline as __inlineSaleem Abdulrasool2015-10-101-8/+9
| | | | | | | | | __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. llvm-svn: 249953
* builtins: fix buildSaleem Abdulrasool2015-10-061-0/+1
| | | | | | | | 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. llvm-svn: 249376
* builtins: implement __emutls_get_addressChih-Hung Hsieh2015-08-311-0/+181
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 llvm-svn: 246454
OpenPOWER on IntegriCloud