diff options
author | sandra <sandra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-06 16:01:05 +0000 |
---|---|---|
committer | sandra <sandra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-06 16:01:05 +0000 |
commit | 1ddaa252d0d1cbf4999cf0f8798fd9261447b693 (patch) | |
tree | a9fc9cd0a5bcc2c76ff3803079fb8a0b0254fb94 /libgcc | |
parent | b176768d9df248307470ac0db8b8c98ccd93aa71 (diff) | |
download | gcc-1ddaa252d0d1cbf4999cf0f8798fd9261447b693.tar.gz |
2015-05-06 Sandra Loosemore <sandra@codesourcery.com>
Chris Jones <chrisj@nvidia.com>
Joshua Conner <jconner@nvidia.com>
gcc/
* config/arm/unknown-elf.h (STARTFILE_SPEC): Add conditional
linking of crtfastmath.o.
* config/arm/linux-eabi.h (STARTFILE_SPEC): Likewise.
libgcc/
* config.host (arm*-*-linux*): Add support for crtfastmath.o.
(arm*-*-uclinux*): Likewise.
(arm*-*-eabi* | arm*-*-rtems*): Likewise.
* config/arm/crtfastmath.c: New file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222857 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/ChangeLog | 9 | ||||
-rw-r--r-- | libgcc/config.host | 7 | ||||
-rw-r--r-- | libgcc/config/arm/crtfastmath.c | 40 |
3 files changed, 53 insertions, 3 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 39c9433d644..a3f3962a8d3 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,12 @@ +2015-05-06 Sandra Loosemore <sandra@codesourcery.com> + Chris Jones <chrisj@nvidia.com> + Joshua Conner <jconner@nvidia.com> + + * config.host (arm*-*-linux*): Add support for crtfastmath.o. + (arm*-*-uclinux*): Likewise. + (arm*-*-eabi* | arm*-*-rtems*): Likewise. + * config/arm/crtfastmath.c: New file. + 2014-04-29 Bernd Schmidt <bernds@codesourcery.com> * Makefile.in (real_host_noncanonical): New variable. diff --git a/libgcc/config.host b/libgcc/config.host index ac39f422059..d558c383631 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -377,14 +377,15 @@ arm*-*-netbsdelf*) tmake_file="$tmake_file arm/t-arm arm/t-netbsd t-slibgcc-gld-nover" ;; arm*-*-linux*) # ARM GNU/Linux with ELF - tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix" + tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix t-crtfm" tmake_file="${tmake_file} arm/t-elf arm/t-bpabi arm/t-linux-eabi t-slibgcc-libgcc" tm_file="$tm_file arm/bpabi-lib.h" unwind_header=config/arm/unwind-arm.h tmake_file="$tmake_file t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" + extra_parts="$extra_parts crtfastmath.o" ;; arm*-*-uclinux*) # ARM ucLinux - tmake_file="${tmake_file} t-fixedpoint-gnu-prefix" + tmake_file="${tmake_file} t-fixedpoint-gnu-prefix t-crtfm" tmake_file="$tmake_file arm/t-arm arm/t-elf t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" tmake_file="${tmake_file} arm/t-bpabi" tm_file="$tm_file arm/bpabi-lib.h" @@ -396,7 +397,7 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*) tm_file="$tm_file arm/bpabi-lib.h" case ${host} in arm*-*-eabi* | arm*-*-rtems*) - tmake_file="${tmake_file} arm/t-bpabi" + tmake_file="${tmake_file} arm/t-bpabi t-crtfm" extra_parts="crtbegin.o crtend.o crti.o crtn.o" ;; arm*-*-symbianelf*) diff --git a/libgcc/config/arm/crtfastmath.c b/libgcc/config/arm/crtfastmath.c new file mode 100644 index 00000000000..9573514961e --- /dev/null +++ b/libgcc/config/arm/crtfastmath.c @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2014 Free Software Foundation, Inc. + * + * This file is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 3, or (at your option) any + * later version. + * + * This file is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * Under Section 7 of GPL version 3, you are granted additional + * permissions described in the GCC Runtime Library Exception, version + * 3.1, as published by the Free Software Foundation. + * + * You should have received a copy of the GNU General Public License and + * a copy of the GCC Runtime Library Exception along with this program; + * see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + * <http://www.gnu.org/licenses/>. + */ + +/* Enable flush-to-zero support for -ffast-math on VFP targets. */ +#ifndef __SOFTFP__ + +#define FPSCR_FZ (1 << 24) + +static void __attribute__((constructor)) +__arm_set_fast_math (void) +{ + unsigned int fpscr_save; + + /* Set the FZ (flush-to-zero) bit in FPSCR. */ + __asm__("vmrs %0, fpscr" : "=r" (fpscr_save)); + fpscr_save |= FPSCR_FZ; + __asm__("vmsr fpscr, %0" : : "r" (fpscr_save)); +} + +#endif /* __SOFTFP__ */ |