Re: ping**n re [patch, ARM] Add support for crtfastmath.o

2015-05-06 Thread Ramana Radhakrishnan
On Tue, May 5, 2015 at 6:53 PM, Sandra Loosemore
san...@codesourcery.com wrote:
 This patch I posted last fall:

 https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00711.html

 still has not been reviewed, in spite of me pinging it several times before
 GCC 5 went into stage 4.  Now that we're back in stage 1 again, can somebody
 please take a look at it?  I've just re-tested it on mainline head.

 FAOD, NVIDIA assigned the copyright on their original version of the patch
 to Mentor Graphics so there should not be any legal issue with it.

OK now that we are in stage1.

Sorry about the delay.

Ramana



 -Sandra



ping**n re [patch, ARM] Add support for crtfastmath.o

2015-05-05 Thread Sandra Loosemore

This patch I posted last fall:

https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00711.html

still has not been reviewed, in spite of me pinging it several times 
before GCC 5 went into stage 4.  Now that we're back in stage 1 again, 
can somebody please take a look at it?  I've just re-tested it on 
mainline head.


FAOD, NVIDIA assigned the copyright on their original version of the 
patch to Mentor Graphics so there should not be any legal issue with it.


-Sandra



Re: [ping**3] Re: [patch, ARM] Add support for crtfastmath.o

2015-01-08 Thread Sandra Loosemore

On 12/17/2014 03:21 PM, Sandra Loosemore wrote:

On 12/07/2014 01:52 PM, Sandra Loosemore wrote:

On 11/08/2014 08:57 AM, Sandra Loosemore wrote:


2014-11-08  Sandra Loosemore  san...@codesourcery.com
 Chris Jones  chr...@nvidia.com
 Joshua Conner  jcon...@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.


Ping?

https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00711.html


Ping again?


And ping again  Can somebody please review this before stage 4 
starts and it is too late to get it into GCC 5?  This is really a very 
straightforward change and is pretty much identical to what other 
targets (including aarch64) already do.


-Sandra



[ping**2] Re: [patch, ARM] Add support for crtfastmath.o

2014-12-17 Thread Sandra Loosemore

On 12/07/2014 01:52 PM, Sandra Loosemore wrote:

On 11/08/2014 08:57 AM, Sandra Loosemore wrote:


2014-11-08  Sandra Loosemore  san...@codesourcery.com
 Chris Jones  chr...@nvidia.com
 Joshua Conner  jcon...@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.


Ping?

https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00711.html


Ping again?

-Sandra



Re: [patch, ARM] Add support for crtfastmath.o

2014-12-07 Thread Sandra Loosemore

On 11/08/2014 08:57 AM, Sandra Loosemore wrote:


2014-11-08  Sandra Loosemore  san...@codesourcery.com
 Chris Jones  chr...@nvidia.com
 Joshua Conner  jcon...@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.


Ping?

https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00711.html

-Sandra



[patch, ARM] Add support for crtfastmath.o

2014-11-08 Thread Sandra Loosemore
This patch adds support to the ARM backend to avoid denormals by setting 
the VFP flush-to-zero bit when linking with -ffast-math and similar 
options.  The mechanism used to accomplish this is a constructor in 
libgcc that is conditionally linked in via STARTFILE_SPEC; it's 
basically identical to what a number of other backends are already doing 
here (Aarch64, i386, MIPS, etc).


I tested this by verifying that linking with -ffast-math on the GCC 
command line causes crtfastmath.o to be passed on the ld command line. 
I built libgcc with a variety of configuration options to verify that 
the constructor is suppressed for soft-float targets, that it builds 
successfully for Thumb-2 with VFP, etc.  I also regression-tested the 
gcc testsuite on an arm-none-linux-gnueabi build configured for 
-march=armv8-a with VFP floating point enabled.


OK to commit?

-Sandra

2014-11-08  Sandra Loosemore  san...@codesourcery.com
Chris Jones  chr...@nvidia.com
Joshua Conner  jcon...@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.


Index: gcc/config/arm/unknown-elf.h
===
--- gcc/config/arm/unknown-elf.h	(revision 216500)
+++ gcc/config/arm/unknown-elf.h	(working copy)
@@ -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
 
Index: gcc/config/arm/linux-eabi.h
===
--- gcc/config/arm/linux-eabi.h	(revision 216500)
+++ gcc/config/arm/linux-eabi.h	(working copy)
@@ -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
Index: libgcc/config.host
===
--- libgcc/config.host	(revision 216500)
+++ libgcc/config.host	(working copy)
@@ -370,14 +370,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
@@ -389,7 +390,7 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*
 	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*)
Index: libgcc/config/arm/crtfastmath.c
===
--- libgcc/config/arm/crtfastmath.c	(revision 0)
+++ libgcc/config/arm/crtfastmath.c	(revision 0)
@@ -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