This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: bug ? apply_change_group & insn_invalid_p
Denis Chertykov <denisc@overta.ru> writes:
> Alan Lehotsky <apl@alum.mit.edu> writes:
>
> > At 8:00 PM +0400 8/10/01, Denis Chertykov wrote:
> >
> > >
> > >
> > >But, the `insn_invalid_p' even not test a result of `recog'.
> > >Is this right ?
> >
> >
> > Huh?
> >
> > >Denis.
> > >
> > >......
> > >int
> > >insn_invalid_p (insn)
> > > rtx insn;
> > >{
> > >......
> > > int icode = recog (pat, insn,
> > > (GET_CODE (pat) == SET
> > > && ! reload_completed && ! reload_in_progress)
> > > ? &num_clobbers : 0);
> > > int is_asm = icode < 0 && asm_noperands (PATTERN (insn)) >= 0;
> > > /* If this is an asm and the operand aren't legal, then fail. Likewise if
> > > this is not an asm and the insn wasn't recognized. */
> > > if ((is_asm && ! check_asm_operands (PATTERN (insn)))
> > > || (!is_asm && icode < 0))
> > > return 1;
> >
> > See right there, if it's NOT an asm() statement and it wasn't recognized
> > then it's invalid.....
>
> So, if an insn is not an asm it's *valid*. (before reload)
> IMHO:It's strange and wrong.
Just ignore my previous mail.
I was wrong.
Denis.