mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-11 07:19:31 +08:00
unknown-elf.h (STARTFILE_SPEC): Add conditional linking of crtfastmath.o.
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. Co-Authored-By: Chris Jones <chrisj@nvidia.com> Co-Authored-By: Joshua Conner <jconner@nvidia.com> From-SVN: r222857
This commit is contained in:
parent
29e597d0e6
commit
5a0ff57c48
@ -1,3 +1,11 @@
|
||||
2015-05-06 Sandra Loosemore <sandra@codesourcery.com>
|
||||
Chris Jones <chrisj@nvidia.com>
|
||||
Joshua Conner <jconner@nvidia.com>
|
||||
|
||||
* config/arm/unknown-elf.h (STARTFILE_SPEC): Add conditional
|
||||
linking of crtfastmath.o.
|
||||
* config/arm/linux-eabi.h (STARTFILE_SPEC): Likewise.
|
||||
|
||||
2015-05-06 Segher Boessenkool <segher@kernel.crashing.org>
|
||||
|
||||
* config/rs6000/rs6000.md (cstore<mode>4_signed_imm): New expander.
|
||||
|
@ -107,6 +107,7 @@
|
||||
|
||||
#undef ENDFILE_SPEC
|
||||
#define ENDFILE_SPEC \
|
||||
"%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} " \
|
||||
LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC)
|
||||
|
||||
/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we
|
||||
|
@ -32,7 +32,9 @@
|
||||
#define UNKNOWN_ELF_STARTFILE_SPEC " crti%O%s crtbegin%O%s crt0%O%s"
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC UNKNOWN_ELF_STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC \
|
||||
"%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} " \
|
||||
UNKNOWN_ELF_STARTFILE_SPEC
|
||||
|
||||
#define UNKNOWN_ELF_ENDFILE_SPEC "crtend%O%s crtn%O%s"
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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*)
|
||||
|
40
libgcc/config/arm/crtfastmath.c
Normal file
40
libgcc/config/arm/crtfastmath.c
Normal file
@ -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__ */
|
Loading…
Reference in New Issue
Block a user