From: DJ Delorie Date: Thu, 28 Jul 2011 22:07:39 +0000 (-0400) Subject: m32c.c (m32c_secondary_reload_class): Allow PSI registers to be reloaded in HI classe... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=13a234421d1a68af668600893b31034c36b0a6e4;p=gcc.git m32c.c (m32c_secondary_reload_class): Allow PSI registers to be reloaded in HI classes when the target is HI. * config/m32c/m32c.c (m32c_secondary_reload_class): Allow PSI registers to be reloaded in HI classes when the target is HI. From-SVN: r176903 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1874a3b2675..371128808b3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-07-28 DJ Delorie + + * config/m32c/m32c.c (m32c_secondary_reload_class): Allow PSI + registers to be reloaded in HI classes when the target is HI. + 2011-07-28 Sebastian Pop * graphite-clast-to-gimple.c: Replace v1, v2, lb, ub with diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c index 7c359c9ac03..4ae7228f772 100644 --- a/gcc/config/m32c/m32c.c +++ b/gcc/config/m32c/m32c.c @@ -845,7 +845,7 @@ m32c_secondary_reload_class (int rclass, enum machine_mode mode, rtx x) if (reg_classes_intersect_p (rclass, CR_REGS) && GET_CODE (x) == REG && REGNO (x) >= SB_REGNO && REGNO (x) <= SP_REGNO) - return TARGET_A16 ? HI_REGS : A_REGS; + return (TARGET_A16 || mode == HImode) ? HI_REGS : A_REGS; return NO_REGS; }