This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: gcc-2.95pre: Internal compiler error in `gen_add2_insn'
- To: law at cygnus dot com
- Subject: Re: gcc-2.95pre: Internal compiler error in `gen_add2_insn'
- From: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Date: Wed, 26 May 1999 11:38:58 +0200
- Cc: David Edelsohn <dje at watson dot ibm dot com>,egcs-bugs at egcs dot cygnus dot com,egcs-patches at egcs dot cygnus dot com
- References: <Your message of Tue, 25 May 1999 02:01:25 +0200. <99052502052800.01200@ns1102.munich.netsurf.de>
At 11:12 26.05.99 , Jeffrey A Law wrote:
> In message <99052502052800.01200@ns1102.munich.netsurf.de>you write:
> >
> > --Boundary-=_nWlrBbmQBhCDarzOwKkYHIDdqSCD
> > Content-Type: text/plain
> > Content-Transfer-Encoding: 8bit
> >
> > Am Tue, 25 May 1999 schrieb Franz Sirl:
> > >If not, a simple fix would be to replace the test (REGNO (op1) >=
> > >FIRST_PSEUDO_REGISTER) with (REGNO_REG_CLASS (REGNO (op1)) !=
> GENERAL_REGS
> > ).
> > >But probably the solution is different, as the code already tries to
> swap
> > op0
> > >and op1 lateron. Maybe a gen_rtx_PLUS() should be used for
> constraints che
> > cking
> > >instead of the gen_add2_insn(), which can abort?
> >
> >
> > How about this patch? It fixes the testcase, but I haven't run a full
> > bootstrap yet.
> >
> > Franz.
> >
> > * reload1.c (gen_reload): use gen_rtx_SET/PLUS, not gen_add2_insn
>This doesn't seem right.
>
>Why did gen_add2_insn abort? It should never abort, if it does, then
>something
>is wrong elsewhere. That's what you need to debug. Just changing the code
>to set gen_rtx_SET is papering over the real problem.
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?
rtx
gen_add2_insn (x, y)
rtx x, y;
{
int icode = (int) add_optab->handlers[(int) GET_MODE (x)].insn_code;
if (! (*insn_operand_predicate[icode][0]) (x, insn_operand_mode[icode][0])
|| ! (*insn_operand_predicate[icode][1]) (x,
insn_operand_mode[icode][1])
|| ! (*insn_operand_predicate[icode][2]) (y,
insn_operand_mode[icode][2]))
abort ();
return (GEN_FCN (icode) (x, x, y));
}
I thought it was doing some constraints checking and as rx = ry + ctr is
not a valid instruction on PPC it would abort.
Thanks for looking into it,
Franz.