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
- To: Alan Lehotsky <apl at alum dot mit dot edu>
- Subject: Re: bug ? apply_change_group & insn_invalid_p
- From: Denis Chertykov <denisc at overta dot ru>
- Date: 10 Aug 2001 21:01:07 +0400
- Cc: Denis Chertykov <denisc at overta dot ru>, gcc at gcc dot gnu dot org
- References: <auto-000000439738@overta.ru><p04330105b799be3780d6@[192.168.1.254]>
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.
Denis.