Commit graph

114 commits

Author SHA1 Message Date
Andrew Turner 79ef2c6406 Add the __aeabi_*divmod functions to the compiler-rt build 2013-01-19 02:28:44 +00:00
Andrew Turner e376173cab Get libcompiler-rt and libgcc building on ARM with clang.
* 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.
2012-12-18 07:26:55 +00:00
Marcel Moolenaar 7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Marius Strobl 45e2c46b37 Switch sparc64 to using libcompiler_rt; since r230021 we have a workaround
in place allowing it to be used there and since r235388 (see also r235486)
we also have usable div/mod optimizations like libgcc has.
2012-05-15 22:47:34 +00:00
Ed Schouten 7686ff743c Upgrade libcompiler_rt to upstream revision 147390.
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.
2011-12-31 19:01:48 +00:00
Ed Schouten 6d57c75097 Add locally implemented atomic intrinsics to libcompiler_rt.
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.
2011-12-27 22:13:51 +00:00
Ed Schouten ef8821e5db Upgrade libcompiler_rt from revision 117047 to 132478.
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
2011-06-03 17:49:16 +00:00
Konstantin Belousov c42c9d5646 Mark libcompiler_rt as not needed executable stack on powerpc.
Reviewed and tested by:	nwhitehorn
2011-01-14 11:23:39 +00:00
Konstantin Belousov 127060d2b0 Fix braino in r217101. -Wa is used to supply assembler flag to cc driver.
Noted by:	Anonymous <swell.k gmail com>
2011-01-07 15:59:23 +00:00
Konstantin Belousov 153344e7d3 On amd64 and i386, force assembler to mark objects compiled from the
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
2011-01-07 14:35:45 +00:00
Alexander Kabaev d933fa1a10 Switch mips architectures back to libgcc.
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.
2010-12-29 17:12:05 +00:00
Ed Schouten 585d4a8062 Revert to libgcc for sparc64.
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
2010-11-12 15:52:27 +00:00
Ed Schouten a189633748 Set symbol visibility to hidden.
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
2010-11-11 16:53:25 +00:00
Ed Schouten a3cf0ef5a2 Import libcompiler_rt into HEAD and add Makefiles.
Obtained from:	user/ed/compiler-rt
2010-11-11 15:13:11 +00:00