This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR target/21299 (reload accepting invalid asm)
- From: Ian Lance Taylor <iant at google dot com>
- To: Rask Ingemann Lambertsen <rask at sygehus dot dk>
- Cc: Jan Hubicka <jh at suse dot cz>, gcc-patches at gcc dot gnu dot org
- Date: 09 Aug 2006 07:59:22 -0700
- Subject: Re: PR target/21299 (reload accepting invalid asm)
- References: <20060808131508.GE3150@kam.mff.cuni.cz> <20060808143203.GA12543@sygehus.dk>
Rask Ingemann Lambertsen <rask@sygehus.dk> writes:
> On Tue, Aug 08, 2006 at 03:15:08PM +0200, Jan Hubicka wrote:
> > + class = REG_CLASS_FROM_CONSTRAINT (c, p);
> > + /* When class is too tiny to hold the operand, ignore it.
> > + See PR21299. First quickly test if things looks slopy
> > + and if they does try to look if register is really
> > + available. */
> > + if (CLASS_MAX_NREGS (class, GET_MODE (recog_data.operand[i]))
> > + > (int)reg_class_size [class])
> > + {
>
> IMHO, this is a bug in the i386 definition of CLASS_MAX_NREGS(). It returns
> 2 for CLASS_MAX_NREGS (AREG, DImode) when class AREG has only one register.
> But the documentation is not clear on this matter. I would appreciate some
> clarification.
What value other than 2 could CLASS_MAX_NREGS return? Certainly 1
would be incorrect and would lead to other problems. And asserting
would be irritating.
There may be a bug in the way it is being called, but I don't see how
there could be a bug in CLASS_MAX_NREGS.
Ian