This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/50751] SH Target: Displacement addressing does not work for QImode and HImode
- From: "oleg dot endo at t-online dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 27 Oct 2011 21:10:47 +0000
- Subject: [Bug target/50751] SH Target: Displacement addressing does not work for QImode and HImode
- Auto-submitted: auto-generated
- References: <bug-50751-4@http.gcc.gnu.org/bugzilla/>
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.