This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR target/21299 (reload accepting invalid asm)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]