Commit Graph

27 Commits

Author SHA1 Message Date
Ed Maste
6853d12d4f compiler-rt: add floatditf and floatunditf
These are long integer (di_int/du_int) to quad precision floating point
conversions. They may be reworked based on upstream discussion. These
versions are here to support arm64 world builds.

Reviewed by:	ed
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D2174
2015-04-07 19:31:29 +00:00
Ed Maste
13553dc6bd compiler-rt: Implement multc3 - quad-precision complex multiplication
This may be reworked based on upstream discussion. This version is here
to support arm64 world builds.

Reviewed by:	ed
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D2173
2015-04-07 19:28:53 +00:00
Dimitry Andric
7d0fba4fd9 Pull in r231972 from upstream compiler-rt trunk (by Jörg Sonnenberger):
Always include stddef.h to make sure size_t exists.

  From Alexander Esilevich.

Requested by:	andrew
2015-03-21 21:49:25 +00:00
Ed Maste
d470ab05ff Import compiler-rt r232125 by Joerg Sonnenberger
We want single precision here.
2015-03-17 15:48:19 +00:00
Dimitry Andric
fa77b333f3 For now, disable the __clear_cache implementation for mips in
compiler-rt, since we do not yet have the required syscall.
2015-03-14 18:38:07 +00:00
Dimitry Andric
e0125cfdd1 Merge ^/head r279893 through r279984. 2015-03-14 13:08:00 +00:00
Dimitry Andric
25e141edd2 Pull in r231965 from upstream compiler-rt trunk (by Jörg Sonnenberger):
Refactor float to integer conversion to share the same code.
  80bit Intel/PPC long double is excluded due to lacking support
  for the abstraction. Consistently provide saturation logic.
  Extend to long double on 128bit IEEE extended platforms.

  Initial patch with test cases from GuanHong Liu.
  Reviewed by Steve Canon.

  Differential Revision: http://reviews.llvm.org/D2804

Pull in r232107 from upstream compiler-rt trunk (by Ed Maste):

  Use signed int implementation for __fixint

Requested by:	emaste
2015-03-14 12:40:19 +00:00
Dimitry Andric
abb48e0e14 Update compiler-rt to trunk r230183. This has some of our patches
imported, so we have just a few small diffs against upstream left.
2015-02-22 22:53:51 +00:00
Dimitry Andric
7ff616029d Update compiler-rt to trunk r228651. This enables using Address
Sanitizer and Undefined Behavior Sanitizer with clang 3.6.0.
2015-02-22 22:31:36 +00:00
Dimitry Andric
3a5ae4edcf Remove the <netinet/ip_compat.h> include from one of the newly added
sanitizer sources.  It is apparently unnecessary, and causes trouble for
people using WITHOUT_IPFILTER.

Reported by:	Pawel Biernacki <pawel.biernacki@gmail.com>, Kurt Lidl <lidl@pix.net>
2015-01-14 22:37:11 +00:00
Dimitry Andric
39107d9a91 Pull in r225610 from upstream compiler-rt trunk (by Roman Divacky):
Add FreeBSD support for __clear_cache.
2015-01-12 21:28:10 +00:00
Dimitry Andric
f4341a5a66 Update compiler-rt to trunk r224034. This brings a number of new
builtins, and also the various sanitizers.  Support for these will be
added in a later commit.
2015-01-08 19:47:10 +00:00
Andrew Turner
34c7b21956 Mark __fixdfdi/__aeabi_d2lz with COMPILER_RT_ABI so it uses the correct
calling convention for __aeabi_* functions.
2014-04-06 09:14:11 +00:00
Dimitry Andric
b663c98c57 Pull in r201909 from upstream compiler-rt trunk (by Joerg Sonnenberger):
Introduce CRT_HAS_128BIT, currently for all __LP64__ platforms.
  Use it to enable the various functions for TI mode.

This makes sure the correct primitives are also built for sparc64.
2014-02-22 00:09:43 +00:00
Andrew Turner
e2a7ad82f2 Don't use the pcs attribute on compilers that don't support it. We can
revert this when we stop supporting old versions of gcc.
2013-01-19 02:24:14 +00:00
Andrew Turner
3eace1b98b Add a newline at the end of the file to stop gcc from complaining 2013-01-19 02:22:01 +00:00
Andrew Turner
33b61a0b06 Import compiler-rt r172839.
This brings in __aeabi_lcmp and __aeabi_ulcmp. It also fixes the spelling
of __aeabi_f2lz. Both changes originated on the arm_eabi project branch.
2013-01-18 22:52:59 +00:00
Andrew Turner
fdc8ba5e71 Import compiler-rt r160957.
This is mostly a no-op other than for ARM where it adds missing
__aeabi_mem* and __aeabi_*divmod functions. Even on ARM these will remain
unused until the rest of the ARM EABI code is merged.
2012-08-08 09:42:44 +00:00
Marius Strobl
0837ca3329 Regenerate after r235388. 2012-05-13 05:09:36 +00:00
Marius Strobl
2040613422 - Get rid of debugging support in order to get rid of the V8-specific C
compiler frame size used there so this whole thing is V8/V9-agnostic.
- Use 32-bit function alignment as GCC does when using UltraSPARC I or
  higher optimizations.
- Don't waste delay slots when possible.

Unfortunately, this still doesn't make libcompiler_rt a viable replacement
for libgcc on sparc64 though as once installed instead, buildworld times
increase by nearly 60% (which isn't related to these assembler functions).
2012-05-13 05:08:13 +00:00
Ed Schouten
848933e870 Add SPARC64 version of div/mod written in assembly.
This version is similar to the code shipped with libgcc. It is based on
the code from the SPARC64 architecture manual, provided without any
restrictions.

Tested by:	flo@
2012-01-12 17:55:22 +00:00
Ed Schouten
a8c104fbb0 Add a workaround to prevent endless recursion in compiler-rt.
SPARC and MIPS CPUs don't have special instructions to count
leading/trailing zeroes. The compiler-rt library provides fallback
rountines for these. The 64-bit routines, __clzdi2 and __ctzdi2, are
implemented as simple wrappers around the compiler built-in
__builtin_clz(), assuming these will expand to either 32-bit
CPU instructions or calls to __clzsi2 and __ctzsi2.

Unfortunately, our GCC 4.2 probably thinks that because the operand is
stored in a 64-bit register, it might just be a better idea to invoke
its 64-bit equivalent, simply resulting into endless recursion. Fix this
by defining __builtin_clz and __builtin_ctz to __clzsi2 and __ctzsi2
explicitly.
2012-01-12 16:51:56 +00:00
Ed Schouten
30293fda4b Import compiler-rt r147467.
The compiler-rt shipped with FreeBSD is now based on unmodified upstream
sources.
2012-01-03 19:41:36 +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
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
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