This is the mail archive of the gcc-bugs@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]

[Bug target/50751] SH Target: Displacement addressing does not work for QImode and HImode


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50751

--- Comment #10 from Oleg Endo <oleg.endo@t-online.de> 2011-10-27 21:10:47 UTC ---
@@ -12430,6 +12453,10 @@ sh_secondary_reload (bool in_p, rtx x, r
   if (rclass != GENERAL_REGS && REG_P (x)
       && TARGET_REGISTER_P (REGNO (x)))
     return GENERAL_REGS;
+  if (rclass == GENERAL_REGS && mode == QImode
+      && MEM_P (x) && GET_CODE (XEXP (x, 0)) == PLUS
+      && CONST_INT_P (XEXP (XEXP (x, 0), 1))
+      && INTVAL (XEXP (XEXP (x, 0), 1)) < 16)
+    return R0_REGS;
   return NO_REGS;
 }


Makes the stripped down bszip2 test pass, but the same problem pops up
in other CSiBE sources.


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