This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[4.3 patch committed] Fix PR target/36736


I've applied the patch below to 4.3-branch to fix PR target/36736
which is a 4.3 regression.  The patch is a backport of the revision
132764 on mainline.  It's tested with bootstrap and the top level
"make -k check" on 4.3-branch with no new failures for sh4-unknown-
linux-gnu.

Regards,
	kaz
--
2008-07-07  Kaz Kojima  <kkojima@gcc.gnu.org>
	
	Backport from mainline:
	PR target/36736
	2008-02-29  Kaz Kojima  <kkojima@gcc.gnu.org>

	* config/sh/sh.c (sh_secondary_reload): Handle loading a float
	constant to fpul.

--- ORIG/gcc-4_3-branch/gcc/config/sh/sh.c	2008-07-04 17:37:10.000000000 +0900
+++ LOCAL/gcc-4_3-branch/gcc/config/sh/sh.c	2008-07-06 07:54:10.000000000 +0900
@@ -1,6 +1,6 @@
 /* Output routines for GCC for Renesas / SuperH SH.
    Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-   2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+   2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
    Contributed by Steve Chamberlain (sac@cygnus.com).
    Improved by Jim Wilson (wilson@cygnus.com).
 
@@ -10875,8 +10875,10 @@ sh_secondary_reload (bool in_p, rtx x, e
         return GENERAL_REGS;
       if (class == FPUL_REGS && immediate_operand (x, mode))
 	{
-	  if (satisfies_constraint_I08 (x))
+	  if (satisfies_constraint_I08 (x) || fp_zero_operand (x))
 	    return GENERAL_REGS;
+	  else if (mode == SFmode)
+	    return FP_REGS;
 	  sri->icode = CODE_FOR_reload_insi__i_fpul;
 	  return NO_REGS;
 	}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]