public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Craig Burley <burley@gnu.org>
To: john@feith.com
Cc: law@cygnus.com, d.love@dl.ac.uk, egcs@cygnus.com,
	davem@dm.cobaltmicro.com
Subject: Re: ix86 double alignment (was Re: egcs-1.1 release schedule)
Date: Tue, 23 Jun 1998 15:06:00 -0000	[thread overview]
Message-ID: <199806232206.SAA00584@melange.gnu.org> (raw)
In-Reply-To: <199806230448.AAA10658@jwlab.FEITH.COM>

>Though it's not as fine-grain as what's mentioned above it may be
>worth while to consider using the DATA_ALIGNMENT macro when laying
>out variables for the stack.  On the i386 it currently returns the
>Intel recommended alignment for doubles, long doubles, arrays, etc.
>(the recommended alignment for long doubles is different from doubles).

I realized later that we can't really do alignment of stack variables
on more than 8-byte boundaries unless we're willing to align the
stack frames themselves to those larger boundaries.  In a program
that doesn't itself use long double or arrays, would this be a
win or lose anyway, in terms of performance?  On the one hand, almost
always subtracting 4-28 bytes from %sp before pushing arguments onto
the stack before a call seems a waste.  On the other hand, maybe the
new stack frame itself meets Intel's definition of an object
greater than 32 bytes long (at least in most cases, I'd guess).

My current assumption is we are shooting for only 8-byte alignment
of the stack frame to obtain 8-byte alignment of doubles within
the frame.  I think crt0 (or whatever) already assures this, but
don't know for sure about that or whether it further assures
16-byte or 32-byte alignment.  But without more than 8-byte
alignment of frames, we won't get Intel's recommended alignment
for long double or large objects when they're on the stack.

(I'm guessing DATA_ALIGNMENT is already used for static and automatic
stuff, but somebody should verify this.)

        tq vm, (burley)

  reply	other threads:[~1998-06-23 15:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-06-23  3:32 John Wehle
1998-06-23 15:06 ` Craig Burley [this message]
1998-06-23 22:55   ` Jeffrey A Law
1998-06-24 10:08   ` Dave Love
1998-06-24 21:23     ` Jeffrey A Law
  -- strict thread matches above, loose matches on Subject: below --
1998-06-24 17:12 John Wehle
1998-06-24 21:23 ` Jeffrey A Law
1998-06-23 10:23 ix86 `double' " John Wehle
1998-06-23 14:56 ` Craig Burley
1998-06-23 22:55 ` Jeffrey A Law
1998-06-22  5:19 egcs-1.1 release schedule David S. Miller
1998-06-22 18:20 ` ix86 double alignment (was Re: egcs-1.1 release schedule) Craig Burley
1998-06-23  3:32   ` David S. Miller
1998-06-23  6:30     ` Craig Burley
1998-06-23  3:32   ` Jeffrey A Law
1998-06-23  5:13     ` Craig Burley
1998-06-21 23:07 egcs-1.1 release schedule Jeffrey A Law
1998-06-22 12:04 ` ix86 `double' alignment (was Re: egcs-1.1 release schedule) Craig Burley
1998-06-23  3:32   ` Jeffrey A Law
1998-06-23  5:13     ` Craig Burley
1998-06-24  2:28       ` Jeffrey A Law
1998-06-24 14:50         ` Craig Burley
1998-06-25  0:25           ` Jeffrey A Law
1998-06-25  9:59             ` Tim Hollebeek
1998-06-28 18:01             ` Marc Lehmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199806232206.SAA00584@melange.gnu.org \
    --to=burley@gnu.org \
    --cc=d.love@dl.ac.uk \
    --cc=davem@dm.cobaltmicro.com \
    --cc=egcs@cygnus.com \
    --cc=john@feith.com \
    --cc=law@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).