This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
mn10300: secondary reload class patch
- To: Alexandre Oliva <aoliva at cygnus dot com>
- Subject: mn10300: secondary reload class patch
- From: Aldy Hernandez <aldyh at redhat dot com>
- Date: Tue, 24 Oct 2000 23:08:25 -0400
- Cc: gcc-patches at gcc dot gnu dot org
hi alex.
This is the patch that fixes the mn10300's secondary reload so it
handles pseudos just like memory.
Since you've approved it, I'm committing it.
Aldy
2000-10-24 Aldy Hernandez <aldyh@redhat.com>
* config/mn10300/mn10300.c (secondary_reload_class): Treat pseudos
like memory.
Index: config/mn10300/mn10300.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mn10300/mn10300.c,v
retrieving revision 1.29
diff -c -r1.29 mn10300.c
*** mn10300.c 2000/05/20 23:05:58 1.29
--- mn10300.c 2000/10/25 03:04:05
***************
*** 555,563 ****
/* Memory loads less than a full word wide can't have an
address or stack pointer destination. They must use
a data register as an intermediate register. */
! if (GET_CODE (in) == MEM
&& (mode == QImode || mode == HImode)
! && (class == ADDRESS_REGS || class == SP_REGS))
{
if (TARGET_AM33)
return DATA_OR_EXTENDED_REGS;
--- 555,569 ----
/* Memory loads less than a full word wide can't have an
address or stack pointer destination. They must use
a data register as an intermediate register. */
! if ((GET_CODE (in) == MEM
! || (GET_CODE (in) == REG
! && REGNO (in) >= FIRST_PSEUDO_REGISTER)
! || (GET_CODE (in) == SUBREG
! && GET_CODE (SUBREG_REG (in)) == REG
! && REGNO (SUBREG_REG (in)) >= FIRST_PSEUDO_REGISTER))
&& (mode == QImode || mode == HImode)
! && (class == ADDRESS_REGS || class == SP_REGS
! || class == DATA_OR_ADDRESS_REGS))
{
if (TARGET_AM33)
return DATA_OR_EXTENDED_REGS;