This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[new-regalloc-branch] Fix for sparc and alpha.
- From: Michael Matz <matz at kde dot org>
- To: <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 16 Jan 2002 05:42:35 +0100 (MET)
- Subject: [new-regalloc-branch] Fix for sparc and alpha.
Hi,
adding offsets and sizes does no good. Also instead of aborting on those
sizeless modes, simply ignore them for regs. Alpha also says
HARD_REGNO_MODE_OK for e.g. VOIDmode/BLKmode and all regs. Bah. Against
documentation (for all OK modes movMODE patterns shall be defined), but
who cares.
Sparc now build a little more. But I didn't test any bootstrapping.
Ciao,
Michael.
--
2002-01-16 Michael Matz <matzmich@cs.tu-berlin.de>
* ra.c (undef_to_size_word): Don't add the begin offset to the
size.
(init_ra): Instead aborting just ingore sizeless modes.
Index: ra.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/ra.c,v
retrieving revision 1.1.2.43
diff -u -p -c -p -r1.1.2.43 ra.c
*** ra.c 2002/01/11 16:08:19 1.1.2.43
--- ra.c 2002/01/16 04:29:21
*************** undef_to_size_word (undefined)
*** 1440,1446 ****
| (u << word);
*undefined = u;
/* Size remains the same, only the begin is moved up move bytes. */
! return tab.size_word + word;
}
break;
}
--- 1440,1446 ----
| (u << word);
*undefined = u;
/* Size remains the same, only the begin is moved up move bytes. */
! return tab.size_word + BL_TO_WORD (word, 0);
}
break;
}
*************** init_ra (void)
*** 8603,8618 ****
for (i = 0; i < NUM_MACHINE_MODES; i++)
{
! int reg;
CLEAR_HARD_REG_SET (rs);
for (reg = 0; reg < FIRST_PSEUDO_REGISTER;)
! if (HARD_REGNO_MODE_OK (reg, i))
{
- int size = HARD_REGNO_NREGS (reg, i);
- /* If it's OK for a register, it also should fill at
- least one. */
- if (!size)
- abort ();
while (size-- && reg < FIRST_PSEUDO_REGISTER)
{
SET_HARD_REG_BIT (rs, reg);
--- 8603,8615 ----
for (i = 0; i < NUM_MACHINE_MODES; i++)
{
! int reg, size;
CLEAR_HARD_REG_SET (rs);
for (reg = 0; reg < FIRST_PSEUDO_REGISTER;)
! if (HARD_REGNO_MODE_OK (reg, i)
! /* Ignore VOIDmode and similar things. */
! && (size = HARD_REGNO_NREGS (reg, i)) != 0)
{
while (size-- && reg < FIRST_PSEUDO_REGISTER)
{
SET_HARD_REG_BIT (rs, reg);