summaryrefslogtreecommitdiff
path: root/lib/libcompiler_rt
Commit message (Collapse)AuthorAgeFilesLines
* MFC r323001:Dimitry Andric2017-09-051-6/+17
| | | | | | | | | | | | | | | | | | | | | | | In compiler-rt, a few assembler implementations for i386 floating point conversion functions use SSE2 instructions, but these are not guarded by #ifdef __SSE2__, and there is no implementation using general purpose registers. For these functions, use the generic C variants instead, otherwise they will cause SIGILL on older processors. Approved by: re (kib) Reported by: bsdpr@phoe.frmug.org PR: 221733 MFC r323014: Follow-up to r323001: if the actually selected CPUTYPE is capable of SSE2 instructions, we can use them. Suggested by: jkim PR: 221733 Notes: svn path=/stable/10/; revision=323189
* Unconditionally compile the __sync_* atomics support functions into compiler-rtDavid Chisnall2013-08-311-1/+2
| | | | | | | | | | | | for ARM. This is quite ugly, because it has to work around a clang bug that does not allow built-in functions to be defined, even when they're ones that are expected to be built as part of a library. Reviewed by: ed Notes: svn path=/head/; revision=255092
* Build __clear_cache on ARM with clang now it supports it.Andrew Turner2013-06-151-5/+1
| | | | Notes: svn path=/head/; revision=251791
* Let ARM use the custom tailored atomic intrinsics.Ed Schouten2013-06-1511-211/+3
| | | | Notes: svn path=/head/; revision=251784
* Use improved __sync_*() intrinsics for MIPS in userspace as well.Ed Schouten2013-06-088-56/+5
| | | | | | | | r251524 introduced custom tailored versions for MIPS of these functions for kernel-space code. We can just reuse them in userspace as well. Notes: svn path=/head/; revision=251525
* Add __sync_synchronize().Ed Schouten2013-05-302-0/+48
| | | | | | | | This function can easily be implemented on top of the mb() macro provided by <machine/atomic.h>. Notes: svn path=/head/; revision=251124
* Use #ifdef instead of #if defined.Ed Schouten2013-05-302-2/+2
| | | | | | | | This makes these tests a bit more consistent with the tests done at the bottom of the file. Notes: svn path=/head/; revision=251123
* Unbreak <stdatomic.h> on ARM + Clang.Ed Schouten2013-04-2717-17/+34
| | | | | | | | | | | | | | Clang only supports atomic operations for ARMv6. For non-ARMv6, we still need to emit these functions. Clang's prototype for these functions slightly differs, as it is truly based on GCC's documentation. It requires the use of signed types, but also requires varargs. Still, we are not allowed to simply implement this function directly. Cleverly work around this by implementing it under a different name and using __strong_reference(). Notes: svn path=/head/; revision=249968
* Enable libcompiler-rt on MIPS.Ed Schouten2013-04-201-5/+3
| | | | | | | | | | | | Originally we disabled libcompiler-rt on MIPS and SPARC64, because of an issue where __clzdi2 and __ctzdi2 would cause endless recursion. This bug has been fixed in r230021 already, but for some reason we only switched to libcompiler-rt on SPARC64 -- not MIPS. This means we can finally use <stdatomic.h> on all our architectures. Notes: svn path=/head/; revision=249702
* Add the __aeabi_mem* functions to compiler-rt as clang uses them.Andrew Turner2013-02-061-0/+4
| | | | Notes: svn path=/head/; revision=246372
* Use the compiler-rt version __{u,}divsi3 and __{u,}modsi3 on ARM EABIAndrew Turner2013-01-191-3/+7
| | | | Notes: svn path=/head/; revision=245651
* There should have been a tab after SRCS+=Andrew Turner2013-01-191-1/+1
| | | | Notes: svn path=/head/; revision=245649
* Add the __aeabi_*divmod functions to the compiler-rt buildAndrew Turner2013-01-191-0/+7
| | | | Notes: svn path=/head/; revision=245643
* Get libcompiler-rt and libgcc building on ARM with clang.Andrew Turner2012-12-181-3/+8
| | | | | | | | | | * Don't provide clear_cache or the __sync_* functions on ARM with clang as they are provided by clang as builtin functions. * Tell clang it is aloud to compile some libgcc code using heinous GCC extensions. Notes: svn path=/head/; revision=244382
* Switch sparc64 to using libcompiler_rt; since r230021 we have a workaroundMarius Strobl2012-05-151-1/+1
| | | | | | | | in place allowing it to be used there and since r235388 (see also r235486) we also have usable div/mod optimizations like libgcc has. Notes: svn path=/head/; revision=235487
* Upgrade libcompiler_rt to upstream revision 147390.Ed Schouten2011-12-311-0/+4
| | | | | | | | | | | | This version of libcompiler_rt adds support for __mulo[sdt]i4(), which computes a multiply and its overflow flag. There are also a lot of cleanup fixes to headers that don't really affect us. Updating to this revision should make it a bit easier to contribute changes back to the LLVM developers. Notes: svn path=/head/; revision=229135
* Add locally implemented atomic intrinsics to libcompiler_rt.Ed Schouten2011-12-2717-0/+204
| | | | | | | | | | | | | | | | | | | The built-in atomic operations are not implemented in our version of GCC 4.2 for the ARM and MIPS architectures. Instead of emitting locked instructions, they generate calls to functions that can be implemented in the C runtime. Only implement the atomic operations that are used by <stdatomic.h> for datatype sizes that are supported by atomic(9). This means that on these architectures, we can only use atomic operations on 32-bits and 64-bits variables, which is typically sufficient. This makes <stdatomic.h> work on all architectures except MIPS, since MIPS and SPARC64 still use libgcc. Converting these architectures to libcompiler_rt is on my todo list. Notes: svn path=/head/; revision=228919
* Upgrade libcompiler_rt from revision 117047 to 132478.Ed Schouten2011-06-031-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | It seems there have only been a small amount to the compiler-rt source code in the mean time. I'd rather have the code in sync as much as possible by the time we release 9.0. Changes: - The libcompiler_rt library is now dual licensed under both the University of Illinois "BSD-Like" license and the MIT license. - Our local modifications for using .hidden instead of .private_extern have been upstreamed, meaning our changes to lib/assembly.h can now be reverted. - A possible endless recursion in __modsi3() has been fixed. - Support for ARM EABI has been added, but it has no effect on FreeBSD (yet). - The functions __udivmodsi4 and __divmodsi4 have been added. Requested by: many, including bf@ and Pedro Giffuni Notes: svn path=/head/; revision=222656
* Mark libcompiler_rt as not needed executable stack on powerpc.Konstantin Belousov2011-01-141-1/+2
| | | | | | | Reviewed and tested by: nwhitehorn Notes: svn path=/head/; revision=217393
* Fix braino in r217101. -Wa is used to supply assembler flag to cc driver.Konstantin Belousov2011-01-071-1/+1
| | | | | | | Noted by: Anonymous <swell.k gmail com> Notes: svn path=/head/; revision=217102
* On amd64 and i386, force assembler to mark objects compiled from theKonstantin Belousov2011-01-071-0/+6
| | | | | | | | | | | assembler source for libcompiler_rt as not needed executable stack. This is done with a hammer instead of properly marking each assembly file with section .note.GNU-stack to avoid modifying contributed source. Discussed with: ed Notes: svn path=/head/; revision=217101
* Switch mips architectures back to libgcc.Alexander Kabaev2010-12-291-1/+1
| | | | | | | | | MIPS64 n64 binaries are broken with libcompiler_rt at this time. Switch mips back to libgcc until the cause of breakage is analyzed and fixed. Notes: svn path=/head/; revision=216804
* Revert to libgcc for sparc64.Ed Schouten2010-11-121-3/+5
| | | | | | | | | | | | I've had a report of a sparc64 system where cc1 generates illegal instructions. We still have to diagnose this properly, but instead of hosing all sparc64 boxes out there, fall back to libgcc to prevent more damage. Reported by: Florian Smeets Notes: svn path=/head/; revision=215185
* Set symbol visibility to hidden.Ed Schouten2010-11-111-1/+1
| | | | | | | | | | Not doing so may cause all sorts of random libraries to expose libcompiler_rt's functions, which should of course not be done. Discussed with: kan, kib Notes: svn path=/head/; revision=215129
* Import libcompiler_rt into HEAD and add Makefiles.Ed Schouten2010-11-111-0/+157
Obtained from: user/ed/compiler-rt Notes: svn path=/head/; revision=215125