summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/builtins
Commit message (Collapse)AuthorAgeFilesLines
* 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
* [CMake] [Darwin] [Builtins] Sorting and uniquing blacklists. NFC.Chris Bieneman2015-11-122-92/+10
| | | | llvm-svn: 252964
* [CMake] [builtins] Removing a few non-source files from the arm list.Chris Bieneman2015-11-121-2/+0
| | | | | | I was a little too aggressive about adding sources from the arm subdirectory. llvm-svn: 252929
* [CMake] Actually adding the TODO comment I mentioned in r252927.Chris Bieneman2015-11-121-0/+3
| | | | | | Turns out you need to save before committing. llvm-svn: 252928
* [CMake] [builtins] Adding missing architecture-specific builtins.Chris Bieneman2015-11-121-0/+8
| | | | | | Also added a TODO comment to make the build system throw an error if the CMakeLists gets out of sync again. llvm-svn: 252927
* [compiler-rt][aarch64] New tests for 128-bit floating-point builtins, fixes ↵Sergey Dmitrouk2015-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | of tests and __fixuint Summary: The following tests for 128-bit floating-point type behaved in a strange way, thought it were bugs, but seem to be mistakes in tests: * `fixtfsi` test checked for `0x80000001` as a value returned for number less than can be represented, while `LONG_MIN` should be returned on saturation; * `fixunstfdi` wasn't enabled for AArch64, only for PPC, but there is nothing PPC specific in that test; * `multf3` tried to underflow multiplication by producing result with 16383 exponent, while there are still 112 bits of fraction plus implicit bit, so resultant exponent should be 16497. Tests for some other builtins didn't exist: * `fixtfdi` * `fixtfti` * `fixunstfti` They were made by copying similar files and adjusting for wider types and adding/removing some reasonable/extra checks. Also `__fixuint` seems to have off by one error, updated tests to catch this case. Reviewers: rengolin, zatrazz, howard.hinnant, t.p.northover, jmolloy, enefaim Subscribers: aemerson, llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D14187 llvm-svn: 252180
* Fix r251928 build errorMartell Malone2015-11-031-2/+2
| | | | llvm-svn: 251931
* Support for 32-bit mingw-w64 in compiler-rt.Martell Malone2015-11-035-4/+88
| | | | | | | | | | | | Add chkstk/alloca for gcc objects. Replace or instructions with test, the latter should be marginally more efficent, as it does not write to memory. Differential Revision: http://reviews.llvm.org/D14044 Patch by vadimcn llvm-svn: 251928
* builtins: Expand out floating point exponents for MSVCSaleem Abdulrasool2015-10-152-5/+5
| | | | | | | | | MSVC 2013 doesnt support C99 fully, including the hexidecimal floating point representation. Use the expanded value to permit building with it. Patch by Tee Hao Wei! llvm-svn: 250365
* builtins: use C implementation on MSVCSaleem Abdulrasool2015-10-151-36/+49
| | | | | | | | | The assembly implementations use GNU syntax which MSVC doesn't handle. Rather than duplicate the code in a second syntax, use the C implementations. Patch by Tee Hao Wei! llvm-svn: 250360
* builtins: __builtin_clzll for x86 on MSVCSaleem Abdulrasool2015-10-151-2/+12
| | | | | | | | | Add an implementation for __builtin_clzll on MSVC even when _BitScanForward4 is unavailable. Patch by Tee Hao Wei! llvm-svn: 250359
* Revert "builtins: enable builtins build for MSVC"Saleem Abdulrasool2015-10-111-1/+1
| | | | | | | | Revert once more. This seems to fail to build on the buildbots which build with ninja rather than MSBuild/Visual Studio. This requires further build infrastructure changes to deal with the assembly routines. llvm-svn: 250001
* Revert "Revert "builtins: enable builtins build for MSVC""Saleem Abdulrasool2015-10-111-1/+1
| | | | | | | Previous changes should now permit building on MSVC 2013 in addition to MSVC 2015. llvm-svn: 250000
* builtins: define and use ALWAYS_INLINESaleem Abdulrasool2015-10-112-4/+5
| | | | | | Abstract out the always inline spelling similar to ASAN. NFC. llvm-svn: 249986
* builtins: use NORETURN macroSaleem Abdulrasool2015-10-111-3/+3
| | | | | | | Now that we have the NORETURN macro, use that to mark the function as noreturn, rather than the GNU __attribute__. llvm-svn: 249985
* builtins: spell inline as __inlineSaleem Abdulrasool2015-10-1013-57/+53
| | | | | | | | | __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
* Revert "builtins: enable builtins build for MSVC"Saleem Abdulrasool2015-10-101-1/+1
| | | | | | | Seems to break on the sanitizer buildbot. Revert until it can be fixed properly. llvm-svn: 249950
* builtins: silence a MSVC warningSaleem Abdulrasool2015-10-101-0/+2
| | | | | | _BitReverse64 is only available on ARM and x64. Guard it accordingly. llvm-svn: 249949
* builtins: enable builtins build for MSVCSaleem Abdulrasool2015-10-101-1/+1
| | | | | | Patch by Tee Hao Wei! llvm-svn: 249948
* [CMake] [macho_embedded] [builtins] Need to also drop the bswap builtins.Chris Bieneman2015-10-091-2/+0
| | | | llvm-svn: 249914
* [CMake] hand tuning the macho_embedded export lists to match the current ↵Chris Bieneman2015-10-092-2/+1
| | | | | | Xcode distribution. llvm-svn: 249912
* [CMake] Hand tuning the exclude lists for libclang_rt.10.4.aChris Bieneman2015-10-092-0/+131
| | | | llvm-svn: 249888
* Add ARM RTABI aliases for half-precision conversionsOliver Stannard2015-10-073-0/+6
| | | | | | | The ARM RTABI defines these functions as __aeabi_h2f, __aeabi_f2h and __aeabi_d2h, so we need aliases for them. llvm-svn: 249559
* builtins: fix buildSaleem Abdulrasool2015-10-071-1/+1
| | | | | | | __GNUC__ indicates the GNU compiler, not __GNU__. This got through due to building with clang rather than gcc. llvm-svn: 249516
* builtins: implement instrinics for clSaleem Abdulrasool2015-10-071-0/+28
| | | | | | | | | cl does not support the same intrinsics as clang. Provide implementations for the intrinsics using MSVC builtins. Patch by Tee Hao Wei! llvm-svn: 249515
* builtins: emulate _Complex for clSaleem Abdulrasool2015-10-077-54/+71
| | | | | | | | | cl does not support C99 completely as of VS2015. Emulate _Complex to allow building with MSVC. Patch by Tee Hao Wei! llvm-svn: 249514
* builtins: use MSVC intrinsics with clSaleem Abdulrasool2015-10-071-5/+52
| | | | | | | | Use MSVCRT functions for floating-point builtins unavailable on MSVC. Patch by Tee Hao Wei! llvm-svn: 249513
* [builtins] Enable building of the builtins library for MIPS targets.Vasileios Kalintiris2015-10-061-0/+5
| | | | | | | | | | Reviewers: howard.hinnant, samsonov Subscribers: samsonov, dsanders, llvm-commits Differential Revision: http://reviews.llvm.org/D13098 llvm-svn: 249382
OpenPOWER on IntegriCloud