MIPS PATCH: Fix reload pattern

law@redhat.com law@redhat.com
Thu Apr 19 10:05:00 GMT 2001


  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




More information about the Gcc-patches mailing list