This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Plans for Linux ELF "i686+" ABI ? Like SPARC V8+ ?
- From: "Michael Meissner" <michael dot meissner at amd dot com>
- To: "Andi Kleen" <andi at firstfloor dot org>
- Cc: "Richard Guenther" <richard dot guenther at gmail dot com>, gcc at gcc dot gnu dot org
- Date: Mon, 15 Oct 2007 15:04:47 -0400
- Subject: Re: Plans for Linux ELF "i686+" ABI ? Like SPARC V8+ ?
- References: <4712CE64.7050804@netbauds.net.suse.lists.egcs> <18195.11443.885432.966676@zebedee.pink.suse.lists.egcs> <47135A83.5040705@netbauds.net.suse.lists.egcs> <18195.24423.287047.842193@zebedee.pink.suse.lists.egcs> <47136430.5080907@netbauds.net.suse.lists.egcs> <84fc9c000710150639w1c234d45m44ecbfb3e41f8293@mail.gmail.com.suse.lists.egcs> <p73wsto1cmi.fsf@bingen.suse.de>
On Mon, Oct 15, 2007 at 08:00:53PM +0200, Andi Kleen wrote:
> "Richard Guenther" <richard.guenther@gmail.com> writes:
> >
> > The idea is not exactly new, the main complication is that it would need
> > hacking both the gcc (and glibc) side and the kernel syscall interface. The
> > 32bit compatibility entries cannot be used if you want to align long long and
> > double naturally (which you certainly want, for performance reasons).
>
> double is already naturally aligned on i386, just long long isn't.
Actually no. In 32-bit mode, double is aligned on a 4 byte boundary, not an 8
byte boundary, unless you use -malign-double, which breaks the ABI. This has
been a 'feature' of the original AT&T 386 System V ABI that Linux uses for
32-bit x86 processors. With the SCO mess, it may be hard to ever change that
ABI....
--
Michael Meissner, AMD
90 Central Street, MS 83-29, Boxborough, MA, 01719, USA
michael.meissner@amd.com