This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Committed: fix typo in ns32k.md (was: Re: instruction not recognized (genrecog bug?))
Hans-Peter Nilsson writes:
> > From: Ian Dall <ian@beware.dropbear.id.au>
> > Date: Mon, 10 Jan 2000 23:02:58 +1030 (CST)
>
> (Follow-ups should perhaps drop gcc-patches or gcc-bugs)
>
> > Hans-Peter Nilsson writes:
> > > > (define_insn ""
> > > > [(set (match_operand:SI 0 "general_operand" "=g<")
> > > > (match_operand:QI 1 "address_operand" "p"))]
> > >
> > > No, there's a typo in that pattern; operands 0 and 1 must have
> > > the same mode. Since the typo is IMHO obvious, I installed this
> > > patch [changed QI to SI]
> >
> > I thought that for an address_operand the mode referred to the object
> > pointed to, not the pointer, which is why I didn't just change it
> > myself [...]
>
> *Oh no*!
> You're perfectly right. The address_operand predicate gets an
> ugly exception for the match-operands-modes-unless-VOIDmode rule
> in patterns.
I've tried removing the mode altogther from operand 1 and genreload
seems to do the right thing. Whether there remains a bug in genreload
or not I don't know, but VOIDmode seems to give the right answer.
Ian