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: Bootstrap failure with thunks change + patch to fix it.


> Date: Mon, 21 Oct 2002 21:00:43 -0700
> From: Mark Mitchell <mark@codesourcery.com>

> >  >   /* 64-bit constants.  If "int" is 32 bits, we'll never hit this
> > abort.  */  >   else if (TARGET_64BIT && (delta < -2147483647 - 1 ||
> > delta > 2147483647))  >     abort ();
> >  >  /* Large constants that can be done by one addis instruction.  */
> >  >   else if ((delta & 0xffff) == 0)
> >  >     asm_fprintf (file, "\t{cau|addis} %s,%s,%d\n", this_reg, this_reg,
> >  >                  (int) (delta >> 16));
> >
> > What this looks like to me is that on a 64-bit machine, if delta is
> > outside the range of a 32-bit int then abort.
> 
> Ah.  Well, that problem was just as there before -- it was just that
> we silently generated bad code when the HOST_WIDE_INT was smushed into
> an int.  So, the new behavior is actually better.
> 
> We'll have to ask the RS6000 maintainers to figure out what they want
> to do to fix this.  4-gigabyte objects -- especially with virtual
> functions in subobjects beyond the 4-gigabyte boundary -- are probably
> pretty rare, but still...

IMO, that code is OK, except that it should use sorry() rather than
abort() since it's theoretically possible for the user to trip it.

I am not too worried about 4G objects with inheritance.  If anyone
does want to implement support, I would ask that they supply a
testcase, since I expect there are problems before this code is reached.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


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