This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: MIPS PATCH: Fix reload pattern
- To: Mark Mitchell <mark at codesourcery dot com>
- Subject: Re: MIPS PATCH: Fix reload pattern
- From: law at redhat dot com
- Date: Thu, 19 Apr 2001 10:08:05 -0700
- cc: gcc-patches at gcc dot gnu dot org
- Reply-To: law at redhat dot com
In message <20010418142451N.mitchell@codesourcery.com>you write:
>
> Attached is a proposed patch for PR275. However, I am a little unsure
> as to whether the patch is correct or not, and I would welcome outside
> opinion.
>
> The problem occurs during reload. We were getting into the
> reload_outdi pattern with:
>
> - Operand 0 a MEM with an invalid address, i.e., one such that
> memory_address_p didn't hold.
>
> - Operand 1 a REG.
>
> When we tried to do this (towards the bottom of the output template)
>
> emit_move_insn (operands[0], scratch);
>
> we aborted because the address was invalid.
>
> I made the reload_outdi pattern match the SImode pattern by making
> sure that operand 0 was a general_operand; that allowed the
> compilation to complete.
>
> I don't have access to a MIPS box at the moment, and there are some
> problems bootstrapping on IRIX at the moment, so it will take me a
> little while to test the patch. I'll do that ASAP, though, and
> check-in at that point -- unless someone tells me that my change is
> incorrect.
>
> Here's the test-case, for reference. Compile for mips-sgi-irix6.5,
> with "-mabi=64 -O1" to see the abort.
It looks correct to me -- in fact, it's amazingly similar to the PA64
bug I recently fixed.
By accepting anything for operand0 reload_outdi informs reload that reload
need not worry about operand0 at all and that reload_outdi will somehow
magically DTRT.
jeff