Commit Graph

79 Commits

Author SHA1 Message Date
Warner Losh
0fd19f4a95 The routines defined in comparedf2 and comparesf2 are defined in libc
for softfloat mips. No need to include them here.
2018-02-02 05:04:43 +00:00
Warner Losh
0b972ac92e Support armv7 builds for userland
Make armv7 as a new MACHINE_ARCH.

Copy all the places we do armv6 and add armv7 as basically an
alias. clang appears to generate code for armv7 by default. armv7 hard
float isn't supported by the the in-tree gcc, so it hasn't been
updated to have a new default.

Support armv7 as a new valid MACHINE_ARCH (and by extension
TARGET_ARCH).

Add armv7 to the universe build.

Differential Revision: https://reviews.freebsd.org/D12010
2017-10-05 23:01:33 +00:00
Dimitry Andric
2b12718be6 Follow-up to r323001: if the actually selected CPUTYPE is capable of
SSE2 instructions, we can use them.

Suggested by:	jkim
PR:		221733
MFC after:	1 week
X-MFC-With:	r323001
2017-08-30 07:05:29 +00:00
Dimitry Andric
e1ca2b88e2 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.

Reported by:	bsdpr@phoe.frmug.org
PR:		221733
MFC after:	1 week
2017-08-29 21:45:00 +00:00
John Baldwin
04a91333db Include {u,}{div,mod}si3() on mips in libcompiler_rt.
These builtins were listed in the mips-specific Symbol.map for libc but
were not implemented.  Compiling mips with recent clang requires these
symbols.

Sponsored by:	DARPA / AFRL
2017-08-21 17:49:01 +00:00
Warner Losh
b53a8df3aa There is no MACHINE_CPUARCH == armv6, remove redunant check. 2017-08-14 22:38:54 +00:00
Dimitry Andric
d2043ca373 Merge ^/head r320573 through r320970. 2017-07-13 22:01:38 +00:00
Ed Maste
d9ad2b357b compiler_rt: provide bswap buildins on sparc64
Attempting to build sparc64 world with GCC 6.3 previously failed with
zstd_compress.c:(.text+0x8fc): undefined reference to `__bswapsi2'
2017-07-06 13:27:01 +00:00
Dimitry Andric
27c240688c Merge ^/head r318560 through r318657. 2017-05-22 19:28:24 +00:00
Adrian Chadd
66ed774149 [libcompiler-rt] add bswapdi2/bswapsi2
This is required for mips gcc 6.3 userland to build/run.

Reviewed by:	emaste, dim
Approved by:	emaste
Differential Revision:	https://reviews.freebsd.org/D10838
2017-05-21 23:15:32 +00:00
Dimitry Andric
289fa303d6 Merge compiler-rt trunk r300890, and update build glue. 2017-04-22 18:43:15 +00:00
John Baldwin
813b8a9e89 Add an implementation of __ffssi2() derived from __ffsdi2().
Newer versions of GCC include an __ffssi2() symbol in libgcc and the
compiler can emit calls to it in generated code.  This is true for at
least GCC 6.2 when compiling world for mips and mips64.

Reviewed by:	jmallett, dim
Sponsored by:	DARPA / AFRL
Differential Revision:	https://reviews.freebsd.org/D10086
2017-04-05 02:40:53 +00:00
Dimitry Andric
d006dde2fd Gcc has incompatible internal declarations for __divtc3 and __multc3 as
defined in compiler-rt, but it has no option to silence its warning, so
make gcc warnings for libcompiler_rt non-fatal.

Noticed by:	lwhsu
MFC after:	3 days
2017-03-21 21:07:37 +00:00
Jung-uk Kim
d751009457 Remove an assembler flag, which is redundant since r309124. The upstream
took care of it by introducing a macro NO_EXEC_STACK_DIRECTIVE.

http://llvm.org/viewvc/llvm-project?rev=273500&view=rev

Reviewed by:	dim
2017-02-23 17:46:38 +00:00
Dimitry Andric
29a85f30b7 Update compiler-rt to release_39 branch r288513. Since this contains a
rather unfortunate upstream workaround for an unwind header problem that
does not exist on FreeBSD, but which causes an unnecessary warning for
us, add some flags to the compiler-rt Makefile to suppress the warning.
2016-12-02 20:17:41 +00:00
Dimitry Andric
67bc8c8b9e Merge ^/head r308491 through r308841. 2016-11-19 16:05:55 +00:00
Ruslan Bukin
7804dd5212 Add full softfloat and hardfloat support for RISC-V.
Hardfloat is now default (use riscv64sf as TARGET_ARCH
for softfloat).

Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D8529
2016-11-16 15:21:32 +00:00
Dimitry Andric
2828dafcf3 Merge ^/head r308227 through r308490. 2016-11-10 22:12:19 +00:00
Ruslan Bukin
2ad1d09f16 o Add support for long double.
o Add support for latest RISC-V GNU toolchain.

Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
2016-11-03 13:06:17 +00:00
Ed Maste
335bcabec9 Merge ^/head r306303 through 306411. 2016-09-28 19:29:01 +00:00
Ed Maste
040b30497c libcompiler_rt: move file list to Makefile.inc for reuse elsewhere
Also switch to the style used in the clang390-import branch to reduce
future conflicts.

Reviewed by:	dim
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D8039
2016-09-27 18:55:45 +00:00
Ed Maste
d7e002ff96 libcompiler_rt: use ${SRCTOP} for the top of the FreeBSD tree 2016-09-23 13:23:52 +00:00
Dimitry Andric
2a0eade7f4 Fix building some arm-specific primitives for libcompiler_rt. This was
an unfortunate search and replace error.
2016-09-05 17:20:12 +00:00
Dimitry Andric
53b715b5ba Update compiler-rt to 3.9.0 release, and update the build glue for
libcompiler_rt and libclang_rt.
2016-09-03 21:41:29 +00:00
Warner Losh
2c0e9e2a09 Make armv6 hard float abi by default. Kill armv6hf.
Allow CPUTYPE=soft to build the current soft-float abi libraries.
Add UPDATING entry to announce this.

Approved by: re@ (gjb)
2016-05-18 06:01:18 +00:00
Glen Barber
b655ec9752 MFH
Sponsored by:	The FreeBSD Foundation
2016-03-06 04:13:17 +00:00
Dimitry Andric
f8ca070d3a Merge compiler-rt release_38 branch r258968.
Note that there is still a problem on amd64, causing SIGBUS in the early
startup of Address Sanitizer.  This is being investigated.
2016-02-06 13:39:20 +00:00
Glen Barber
a70cba9582 First pass through library packaging.
Sponsored by:	The FreeBSD Foundation
2016-02-04 21:16:35 +00:00
Dimitry Andric
65dcb5bcb1 Merge ^/head r288197 through r288456. 2015-10-01 19:02:45 +00:00
Konstantin Belousov
96cdb0ab9d Annotate arm userspace assembler sources stating their tolerance to
the non-executable stack.

Reviewed by:	andrew
Sponsored by:	The FreeBSD Foundation
2015-09-29 16:09:58 +00:00
Dimitry Andric
8527908747 Update compiler-rt to 3.7.0 release. This also includes the sanitizer
and profile libraries.
2015-09-10 20:35:47 +00:00
Simon J. Gerraty
ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Ed Maste
95f23d6e36 compiler_rt: add floatunsitf for arm64
It provides unsigned integer to quad-precision conversion.

Sponsored by:	The FreeBSD Foundation
2015-04-16 12:54:28 +00:00
Ed Maste
eade5b3856 compiler-rt: include 128-bit quad precision fp support only on arm64
Other architectures do not use quad precision long double and don't need
these runtime support routines.

Differential Revision:	https://reviews.freebsd.org/D2252
Reviewed by:	dim
Sponsored by:	The FreeBSD Foundation
2015-04-08 19:07:06 +00:00
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
Ed Maste
b4a5ecf64c compiler-rt: Build additional quad precision floating point builtins
These are needed for arm64

Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D2160
2015-03-30 14:28:31 +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
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
Andrew Turner
d6a052e0e6 With the update of compiler-rt we try to build a number of files that
don't build on some ARM platforms, provide symbols we already provide in
libc, or don't exist. Remove these from the build. Some of these may
return later on specific targets.

Differential Revision:	https://reviews.freebsd.org/D1468
Reviewed by:	dim, imp
2015-01-09 20:00:37 +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
Simon J. Gerraty
9268022b74 Merge from head@274682 2014-11-19 01:07:58 +00:00
Andrew Turner
eabf853d8d Clean up detection of hard-float ABIs. As with big-endian in r272368 we
can check against arm*hf*.
2014-10-01 16:08:19 +00:00
Andrew Turner
6d4766c1b8 Remove MK_ARM_EABI, the armeb issues have been fixed. The code to support
the oabi is still in the tree, but it is expected this will be removed
as developers work on surrounding code.

With this commit the ARM EABI is the only supported supported ABI by
FreeBSD on ARMa 32-bit processors.

X-MFC after:	never
Relnotes:	yes
Differential Revision: https://reviews.freebsd.org/D876
2014-10-01 08:26:51 +00:00
Simon J. Gerraty
cc3f4b9965 Merge from head 2014-05-08 23:54:15 +00:00
Warner Losh
c6063d0da8 Use src.opts.mk in preference to bsd.own.mk except where we need stuff
from the latter.
2014-05-06 04:22:01 +00:00
Simon J. Gerraty
3b8f084595 Merge head 2014-04-28 07:50:45 +00:00