This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix MIPS ICE on HImode subregs of frame pointer
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 04 Sep 2008 20:12:09 +0100
- Subject: Re: Fix MIPS ICE on HImode subregs of frame pointer
- References: <Pine.LNX.4.64.0809041627190.20591@digraph.polyomino.org.uk>
"Joseph S. Myers" <joseph@codesourcery.com> writes:
> 2008-09-04 Joseph Myers <joseph@codesourcery.com>
>
> * config/mips/mips.h (enum reg_class): Add FRAME_REGS.
> (REG_CLASS_NAMES): Update.
> (REG_CLASS_CONTENTS): Update.
> * config/mips/mips.c (mips_regno_to_class): Use FRAME_REGS instead
> of ALL_REGS for regs 77 and 78.
> * function.c (instantiate_virtual_regs_in_insn): Assert that
> return value of simplify_gen_subreg is not NULL.
>
> testsuite:
> 2008-09-04 Joseph Myers <joseph@codesourcery.com>
>
> * gcc.c-torture/compile/20080903-1.c: New test.
You're right that the existing code mapped 77 and 78 to ALL_REGS, but
there was another bug; the existing code didn't include 77 and 78 in...
> + { 0x00000000, 0x00000000, 0x00006000, 0x00000000, 0x00000000, 0x00000000 }, /* frame registers */ \
> { 0xffffffff, 0xffffffff, 0xffff07ff, 0xffffffff, 0xffffffff, 0x0fffffff } /* all registers */ \
...this definition of ALL_REGS. ALL_REGS really does have to be union
of other classes though, so please add 77 and 78 to ALL_REGS as part
of the same patch.
The MIPS parts are OK with that change, thanks. I can't approve the
assert, but I think it counts as obvious.
(I'm not very keen on the idea of creating subregs of frame_pointer_rtx
and arg_pointer_rtx, but it's clear from this code that we do that on
other ports.)
Richard