Fix MIPS ICE on HImode subregs of frame pointer
Richard Sandiford
rdsandiford@googlemail.com
Thu Sep 4 19:18:00 GMT 2008
"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
More information about the Gcc-patches
mailing list