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]

[patch committed SH] Fix PR target/43741


I've missed that I applied a wrong version of the patch
at revision 158208.  It causes PR43741 which is a build
failure on unified sh-elf tree.  Sorry for my confusion.
The patch below fixes it and tested on sh4-unknown-linux-gnu
and unified sh-elf.
Applied to trunk.

Regards,
	kaz
--
2010-04-15  Kaz Kojima  <kkojima@gcc.gnu.org>

	PR target/43471
	* config/sh/sh.c (sh_legitimize_reload_address): Use
	MAYBE_BASE_REGISTER_RTX_P instead of BASE_REGISTER_RTX_P.
	Remove a unneeded check for offset_base.

--- ORIG/trunk/gcc/config/sh/sh.c	2010-04-12 09:52:36.000000000 +0900
+++ trunk/gcc/config/sh/sh.c	2010-04-15 10:33:17.000000000 +0900
@@ -9640,7 +9640,7 @@ sh_legitimize_reload_address (rtx *p, en
   if (GET_CODE (*p) == PLUS
       && (GET_MODE_SIZE (mode) == 4 || GET_MODE_SIZE (mode) == 8)
       && CONST_INT_P (XEXP (*p, 1))
-      && BASE_REGISTER_RTX_P (XEXP (*p, 0))
+      && MAYBE_BASE_REGISTER_RTX_P (XEXP (*p, 0), true)
       && ! TARGET_SHMEDIA
       && ! (TARGET_SH4 && mode == DFmode)
       && ! (mode == PSImode && type == RELOAD_FOR_INPUT_ADDRESS)
@@ -9674,8 +9674,7 @@ sh_legitimize_reload_address (rtx *p, en
       /* Sometimes the normal form does not suit DImode.  We could avoid
 	 that by using smaller ranges, but that would give less optimized
 	 code when SImode is prevalent.  */
-      if (offset_base != 0
-	  && GET_MODE_SIZE (mode) + offset - offset_base <= 64)
+      if (GET_MODE_SIZE (mode) + offset - offset_base <= 64)
 	{
 	  sum = gen_rtx_PLUS (Pmode, XEXP (*p, 0), GEN_INT (offset_base));
 	  *p = gen_rtx_PLUS (Pmode, sum, GEN_INT (offset - offset_base));
@@ -9689,7 +9688,7 @@ sh_legitimize_reload_address (rtx *p, en
 	   && (GET_MODE_SIZE (mode) == 4 || GET_MODE_SIZE (mode) == 8)
 	   && GET_CODE (XEXP (*p, 0)) == PLUS
 	   && CONST_INT_P (XEXP (XEXP (*p, 0), 1))
-	   && BASE_REGISTER_RTX_P (XEXP (XEXP (*p, 0), 0))
+	   && MAYBE_BASE_REGISTER_RTX_P (XEXP (XEXP (*p, 0), 0), true)
 	   && CONST_INT_P (XEXP (*p, 1))
 	   && ! TARGET_SHMEDIA
 	   && ! (TARGET_SH2E && mode == SFmode))


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