summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/builtins
Commit message (Collapse)AuthorAgeFilesLines
...
* [builtins] Don't always use -ffreestanding when compiling builtinsFrancis Ricci2016-08-231-1/+0
| | | | | | This can break on some sysroots. Let the user define it if necessary. llvm-svn: 279496
* [compiler-rt] Use flags found when configuring builtins during compilationFrancis Ricci2016-08-221-2/+15
| | | | | | | | | | | | Summary: This fixes the omission of -fPIC when building the builtins. Reviewers: compnerd, beanz Subscribers: dberris, llvm-commits Differential Revision: https://reviews.llvm.org/D23729 llvm-svn: 279469
* [CMake] Renaming test variable to be consistentChris Bieneman2016-08-151-1/+1
| | | | | | Based on post-commit review by compnerd. llvm-svn: 278728
* [CMake] If the compiler supports _Atomic include atomic.c in builtins librariesChris Bieneman2016-08-121-2/+6
| | | | | | This fixes a long-standing TODO by implementing a compiler check for supporting the _Atomic keyword. If the _Atomic keyword is supported by the compiler we should include it in the builtin library sources. llvm-svn: 278454
* builtins: better categorisation of Thumb1 builtinsSaleem Abdulrasool2016-08-051-11/+18
| | | | | | | Adjust the builtins to better annotate the Thumb1 routines and their purpose. Exclude the remaining thumb1 sources on Windows ARM. llvm-svn: 277828
* builtins: split out the EABI and VFP ARM sourcesSaleem Abdulrasool2016-08-041-43/+55
| | | | | | | | These are meant to only be included on certain targets. This only disables it for Windows ARM for now. Ideally these would be conditionally included as appropriate. llvm-svn: 277777
* [CMake] Load LLVMConfig for standalone build of builtinsJonas Hahnfeld2016-08-021-0/+4
| | | | | | | | Therefore move some code into reusable macros. Differential Revision: https://reviews.llvm.org/D22866 llvm-svn: 277418
* Use 'unsigned long' to match the APIs of the MS bitscan intrinsicsReid Kleckner2016-08-011-3/+3
| | | | | | | We were getting warnings about how 'uint32_t*' is different from 'unsigned long*' even though they are effectively the same on Windows. llvm-svn: 277363
* Revert "Enable cross-compilation across architectures on android"Chris Bieneman2016-07-251-1/+1
| | | | | | | | | | | | | | This reverts commit r276333. As I commented in the review (https://reviews.llvm.org/D22415), this change isn't needed because CMAKE_C_FLAGS is implicitly added by CMake to the command line for all C source files. With this patch enabled CMAKE_C_FLAGS is duplicated on all C sources, and applied to ASM sources, which is not ideal. I sent an email about this to llvm-commits on the commit thread. I suspect the problem the patch author was actually seeing is that CMAKE_C_FLAGS isn't applied to ASM files, and the builtins library has quite a few of those. The correct solution there is to specify CMAKE_ASM_FLAGS with whatever flags need to be passed to the compiler when compiling ASM files. If there are other problems with flag propagation, please let me know. llvm-svn: 276683
* Enable cross-compilation across architectures on androidFrancis Ricci2016-07-211-1/+1
| | | | | | | | | | | | | | | Summary: This patch fixes cross-architecture compilation, by allowing flags like -target and --sysroot to be set for architecture testing and compilation. Reviewers: tberghammer, srhines, danalbert, beanz, compnerd Subscribers: tberghammer, llvm-commits, danalbert Differential Revision: https://reviews.llvm.org/D22415 llvm-svn: 276333
* [compiler-rt] Change all asm directives to __asm__ in cpu_model.Alina Sbirlea2016-07-171-36/+36
| | | | | | | | | | | | | | Summary: Aiming to resolve failure in sanitizer bot by changning all asm directives to __asm__. Also, consistency. Reviewers: llvm-commits, echristo, vitalybuka Subscribers: mehdi_amini Differential Revision: https://reviews.llvm.org/D22446 llvm-svn: 275740
* Add runtime support for __cpu_model (__builtin_cpu_supports)Alina Sbirlea2016-07-142-1/+799
| | | | | | | | | | | | | | | | | | | | | Summary: This aims to add support for __cpu_model and address Bug 25510. It uses the code from lib/Support/Host.cpp for cpu detection, and creates __cpu_model with that info. Tested on OSX and built on Linux as well (though libgcc is the default). The use of "asm" required -std=gnu99, hence the cmake change. Corrections on better addressing this are welcome. Previously reverted, up for review again to iron out outstanding issues. Reviewers: llvm-commits, joerg, echristo, mehdi_amini Subscribers: mehdi_amini Differential Revision: http://reviews.llvm.org/D22181 llvm-svn: 275484
* [RT-ARM] Syntax unified for aeabi_mem* functionsRenato Golin2016-07-133-0/+3
| | | | | | | | | | | | | Use unified syntax for builtins/arm/aeabi_mem*.S. This makes these files consistent with the others. This fixes a problem on the linker, which can fail with the message "relocation truncated to fit: R_ARM_THM_JUMP11 against symbol" Patch by Kor Nielsen. llvm-svn: 275264
* [compiler-rt] Fix VisualStudio virtual folders layoutEtienne Bergeron2016-07-111-0/+1
| | | | | | | | | | | | | | | | | | | | Summary: This patch is a refactoring of the way cmake 'targets' are grouped. It won't affect non-UI cmake-generators. Clang/LLVM are using a structured way to group targets which ease navigation through Visual Studio UI. The Compiler-RT projects differ from the way Clang/LLVM are grouping targets. This patch doesn't contain behavior changes. Reviewers: kubabrecka, rnk Subscribers: wang0109, llvm-commits, kubabrecka, chrisha Differential Revision: http://reviews.llvm.org/D21952 llvm-svn: 275111
* Revert "Add runtime support for __cpu_model (__builtin_cpu_supports)"Alina Sbirlea2016-07-082-801/+1
| | | | | | This reverts commit r274873 until additional fixes are resolved. llvm-svn: 274944
* Add runtime support for __cpu_model (__builtin_cpu_supports)Alina Sbirlea2016-07-082-1/+801
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This aims to add support for __cpu_model and address Bug 25510. It uses the code from lib/Support/Host.cpp for cpu detection, and creates __cpu_model with that info. Tested on OSX, it builts successfully, but the current version does *not* resolve Bug 25510. The __cpu_model symbol is present in the library but it only gets loaded with -all_load. This patch will not land until this issue is clarified. Built on Linux as well (though libgcc is the default). The use of "asm" required -std=gnu99, hence the cmake change. Corrections on better addressing this are welcome. Note: See additional comments on D20988 (committed as r271921). Reviewers: llvm-commits, joerg, echristo, mehdi_amini Subscribers: mehdi_amini Differential revision: http://reviews.llvm.org/D21033 llvm-svn: 274873
* Revert r274865-r274870Alina Sbirlea2016-07-082-801/+1
| | | | llvm-svn: 274872
* Added comments identifing code sourceAlina Sbirlea2016-07-081-0/+4
| | | | llvm-svn: 274870
* Check cpuid supported for i386.Alina Sbirlea2016-07-081-1/+29
| | | | | | | | | | Summary: Reviewers: Subscribers: llvm-svn: 274868
* Add default initialization. Add unit test.Alina Sbirlea2016-07-081-1/+1
| | | | llvm-svn: 274867
* clang-format itAlina Sbirlea2016-07-081-40/+38
| | | | llvm-svn: 274866
* Add runtime support for __cpu_model (__builtin_cpu_supports)Alina Sbirlea2016-07-082-1/+771
| | | | | | | | | | | | | | | | | | | Summary: This aims to add support for __cpu_model and address Bug 25510. It uses the code from lib/Support/Host.cpp for cpu detection, and creates __cpu_model with that info. Tested on OSX, it builts successfully, but the current version does *not* resolve Bug 25510. The __cpu_model symbol is present in the library but it only gets loaded with -all_load. This patch will not land until this issue is clarified. Built on Linux as well (though libgcc is the default). The use of "asm" required -std=gnu99, hence the cmake change. Corrections on better addressing this are welcome. Note: See additional comments on D20988 (committed as r271921). Reviewers: llvm-commits, joerg, echristo, mehdi_amini Subscribers: mehdi_amini Differential Revision: http://reviews.llvm.org/D21033 llvm-svn: 274865
* builtins: tag with noexecstackSaleem Abdulrasool2016-06-22104-0/+296
| | | | | | | | | | | | These routines do not require executable stacks. However, by default ELFish linkers may assume an executable stack on GNUish environments (and some non-GNU ones too!). The GNU extension to add a note to indicate a non-executable stack is honoured by these environments to mark the stack as non-executable (the compiler normally emits this directive on appropriate targets whenever possible). This allows normal builds from getting executable stacks due to linking to the compiler rt builtins. llvm-svn: 273500
* [builtins] Make SOFT_FP versions of floatdidf and floatundidf compileJeroen Ketema2016-06-132-7/+7
| | | | llvm-svn: 272551
* [builtins] replace tabs by spaces and remove whitespace at end of line NFCJeroen Ketema2016-06-134-29/+29
| | | | llvm-svn: 272550
* [CMake] Update to requiring CMake 3.4.3Chris Bieneman2016-05-311-1/+1
| | | | | | | | | | | | | | Summary: This is as per the discussions on developer lists: http://lists.llvm.org/pipermail/llvm-dev/2016-April/098780.html http://lists.llvm.org/pipermail/llvm-dev/2016-May/100058.html Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D20824 llvm-svn: 271327
* [CMake] Support platform building builtins without a full toolchainChris Bieneman2016-05-091-1/+19
| | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds support for building lib/builtins without a fully functioning toolchain. It allows you to bootstrap a cross-compiler, which previously couldn't be done with CMake. This patch contains the following specific changes: * Split builtin-specific code out of config-ix.cmake into builtin-config-ix.cmake * Split some common CMake functionality needed by both builtins and sanitizers into base-config-ix.cmake * Made lib/builtins/CMakeLists.txt able to be a top-level CMake configuration I have tested this on Darwin targeting embedded Darwin, and on FreeBSD x86_64 targeting FreeBSD AArch64. This patch depends on http://reviews.llvm.org/D19692, and is the last part of http://reviews.llvm.org/D16653. Reviewers: samsonov, iains, jroelofs Subscribers: compnerd, aemerson, tberghammer, danalbert, srhines, emaste, llvm-commits Differential Revision: http://reviews.llvm.org/D19742 llvm-svn: 268977
* builtins: fix -Werror,-Wunused-variable warningSaleem Abdulrasool2016-04-201-1/+0
| | | | | | This removes the unused variable `flags`. NFC llvm-svn: 266892
* builtins: remove use of __attribute__((pcs("aapcs"))) on WindowsSaleem Abdulrasool2016-04-201-5/+1
| | | | | | | | | 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. llvm-svn: 266891
* 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
* [Darwin] [Builtins] Cleaning up OS X exclude lists. NFC.Chris Bieneman2016-03-293-58/+6
| | | | | | This just gets rid of a bunch of empty object file warnings. It doesn't impact the generated archives. llvm-svn: 264751
* [Darwin] [Builtins] Remove multi3 from the exclude list.Chris Bieneman2016-03-291-1/+0
| | | | | | This addresses PR27077. For some historical reason Darwin wasn't shipping multi3 in the compiler builtin library or in the OS builtin library. This caused building ffmpeg to fail because Polly was generating calls to multi3. It is easy enough to just add the builtin. llvm-svn: 264750
* [Darwin] [Builtins] Cleaning up 10.4 exclude lists NFCChris Bieneman2016-03-292-44/+50
| | | | | | This just gets rid of a bunch of empty object file warnings. It doesn't impact the generated archives. llvm-svn: 264749
* builtins: make __clear_cache work on Linux-ARMSaleem Abdulrasool2016-03-181-2/+2
| | | | | | | __clear_cache on Android is identical to the version on Linux. Use __linux__ instead of __ANDROID__ as __linux__ is defined for Linux and Android. llvm-svn: 263833
* builtins: port __clear_cache to Windows ARMSaleem Abdulrasool2016-03-181-0/+11
| | | | | | | Support __clear_cache on Windows on ARM using the `FlushInstructionCache` library call. llvm-svn: 263832
* Add ARM EHABI support to gcc_personality_v0.Logan Chien2016-03-091-5/+36
| | | | | | | | | | | | | | | | Until now the only exception APIs supported by gcc_personality_v0 are DWARF EH and SJLJ. This adds support for ARM EHABI as well. This is achieved by a) changing the function signature on ARM EHABI, b) unwinding the stack before returning _URC_CONTINUE_UNWIND. See "Exception Handling ABI for the ARM Architecture" for details (http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038b/IHI0038B_ehabi.pdf). Patch by Timon Van Overveldt. llvm-svn: 263010
* builtins: adjust the clobbers list for android __clear_cacheSaleem Abdulrasool2016-02-251-2/+3
| | | | | | | | | Adjust the clobbers list. This use to work with older versions of gcc, but now will error on newer versions (tested against 5.3) (as well as clang). Patch by Tee Hao Wei! llvm-svn: 261821
* [CMake] Add partial support for MSVC in compiler-rt builtins, by Roman Shirokiy.Andrey Turetskiy2016-02-201-4/+14
| | | | | | | | This enables MSVC build of complex number arithmetic compiler-rt builtins. Differential Revision: http://reviews.llvm.org/D17452 llvm-svn: 261432
* 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
* [asan] Add iOS support.Anna Zaks2016-02-021-0/+1
| | | | llvm-svn: 259451
* [WebAssembly] Enable the builtins library for WebAssembly.Dan Gohman2016-01-131-0/+3
| | | | llvm-svn: 257619
* [WebAssembly] clang supports int128_t on wasm32 in addition to wasm64.Dan Gohman2016-01-131-1/+2
| | | | llvm-svn: 257618
* fix a gcc warningNico Weber2015-12-222-2/+3
| | | | llvm-svn: 256256
* builtins: Fix the sysroot's reference to si_int in int_types.hSumanth Gundapaneni2015-12-011-0/+4
| | | | | | | | | | | | si_int is already defined in sysroot's siginfo.h emutls.c includes pthread.h which includes asm/siginfo.h which in turn includes asm-generic/siginfo.h and that defines si_int. si_int is also defined in builtin's int_types.h and this leads to errors. This patch fixes the issue by undefining the si_int in int_types.h Differential Revision: http://reviews.llvm.org/D15086 llvm-svn: 254472
* builtins: Build emutls.c on MINGW buildsSumanth Gundapaneni2015-12-011-1/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D15083 llvm-svn: 254470
* Add a generic version of __divtc3.c for long double complex division.Joerg Sonnenberger2015-11-222-0/+61
| | | | | | Mark the unit test as applying to all platforms. llvm-svn: 253831
* Move prototypes for the double-double helpers into the common header.Joerg Sonnenberger2015-11-223-9/+5
| | | | llvm-svn: 253828
* Don't use implementation namespace for include guard. Fix spacing.Joerg Sonnenberger2015-11-221-4/+4
| | | | llvm-svn: 253827
* Silence "unrecognised -std=c99" warning on MSVC.George Burgess IV2015-11-201-1/+3
| | | | | | | | Thanks to angelsl for the patch! Differential Revision: http://reviews.llvm.org/D13692 llvm-svn: 253646
* [CMake] [Darwin] [Builitins] Removing muloti4 from the blacklists for arm.Chris Bieneman2015-11-122-2/+0
| | | | llvm-svn: 252965
OpenPOWER on IntegriCloud