gcc-2.95pre: Internal compiler error in `gen_add2_insn'

Jeffrey A Law law@upchuck.cygnus.com
Thu May 27 02:48:00 GMT 1999


  In message < 4.2.0.54.19990526112855.036568b0@mail.lauterbach.com >you write:
  > Ok, I will debug it. Could you just explain to me in some words what the
  > if code in gen_add2_insn is checking for?
It is a sanity check to verify that the operands are accepted by the add
instruction's predicates.  Note this is completely and totally different
from constraints.

  > I thought it was doing some constraints checking and as rx = ry + ctr is 
  > not a valid instruction on PPC it would abort.
So, if you have to generate this kind of instruction what do you do?  I
would guess that you have to load ctr into a scratch register?

If so, you probably need to add support for this to SECONDARY_RELOAD_CLASS.
You should find out if if ry + ctr is ever passed to SECONDARY_RELOAD_CLASS
then see what (if anything) it returns for a scratch register.

Also note you may need to add support for handling this case to reload_insi.


jeff


More information about the Gcc-bugs mailing list