mn10300: secondary reload class patch

Aldy Hernandez aldyh@redhat.com
Tue Oct 24 20:07:00 GMT 2000


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;


More information about the Gcc-patches mailing list