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: PATCH: Align DImode to 4 byte for i386


> Apparently, it breaks Ada. But Ada may be broken/different in long
> long alignment. I still believe
> my patch doesn't break the psABI.

I also agree that the patch can hardly break psABI when alignment of 4
is specified.  The question is why it breaks Ada.

We used to have BIGGEST_ALIGNMENT set to 32. This was later revised to
support SSE modes and we now have BIGGEST_ALIGNMENT set to 128 and
ADJUST_FIELD_ALIGNMENT and friends responsible for reducing the
alignment of stuff to 32bit per psABI specification.

It seems to me that some of ABI stuff is not being adjusted as it ought.
Do you have any idea what breaks?

Honza
> 
> H.J.
> On Feb 4, 2008 6:22 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
> > > Here is a patch. OK for 4.4 when it is opened?
> >
> > Seems OK.  I hope there is no ABI breakage we missed.
> >
> > Honza
> >
> > >
> > > Thanks.
> > >
> > > H.J.
> > > --
> > > 2008-02-03  H.J. Lu  <hongjiu.lu@intel.com>
> > >
> > >       * config/i386/i386-modes.def: Use 4 byte alignment on DI in
> > >       32bit bit.
> > >
> > > Index: config/i386/i386-modes.def
> > > ===================================================================
> > > --- config/i386/i386-modes.def        (revision 1470)
> > > +++ config/i386/i386-modes.def        (working copy)
> > > @@ -17,6 +17,10 @@ You should have received a copy of the G
> > >  along with GCC; see the file COPYING3.  If not see
> > >  <http://www.gnu.org/licenses/>.  */
> > >
> > > +/* In 32bit, DI mode uses 32bit registers.  Only 4 byte alignment
> > > +   is needed.  */
> > > +ADJUST_ALIGNMENT (DI, TARGET_64BIT ? 8 : 4);
> > > +
> > >  /* The x86_64 ABI specifies both XF and TF modes.
> > >     XFmode is __float80 is IEEE extended; TFmode is __float128
> > >     is IEEE quad.  */
> >


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