From: Jeffrey A Law <law@cygnus.com>
To: Dave Love <d.love@dl.ac.uk>
Cc: egcs@cygnus.com
Subject: Re: egcs-1.1 release schedule
Date: Sun, 21 Jun 1998 23:07:00 -0000 [thread overview]
Message-ID: <4986.898489891@hurl.cygnus.com> (raw)
In-Reply-To: <rzqaf79nru7.fsf@djlvig.dl.ac.uk>
In message < rzqaf79nru7.fsf@djlvig.dl.ac.uk >you write:
> _Please_ include some means of allowing Fortran (at least) to get
> stack-allocated doubles double-aligned on x86 (modulo libc). (I hope
> I haven't missed this going in at some stage!) The one-line patch for
> STACK_BOUNDARY used by g77 0.5.22 is good enough.
I'm still waiting on some kind of solution that doesn't totally break
the ABI.
To do this "right" you have to:
* Make sure gcc always allocates stack in multiples of 8 bytes,
adding dummy outgoing args as necessary to keep the stack
properly aligned at call points.
You can't do this with STACK_BOUNDARY since that says we
will 100% always have a properly aligned stack, which can
never be true since we might be linking in code from
another compiler which didn't keep the stack suitably
aligned.
If the stack gets mis-aligned relative to STACK_BOUNDARY
combine could end up removing a seemingly useless
stack operation/address calculation.
The idea is to make sure the stack is 8 byte aligned in the
common cases, but not absolutely rely on it for correct code
generation.
* Second, assuming that gcc always keeps the pointer aligned
for itself, then arrange for doubles to end up 8 byte
aligned relative to the stack pointer.
If the stack gets mis-aligned due to an old module, then
our doubles won't be aligned correctly, but the vast majority
of the time they will be suitably aligned.
I don't think there's any mechanism to do this when the
desired alignment is less than STACK_BOUNDARY. I fact
I know that to be the case since I worked on a similar
problem recently.
* The ABI is still going to mandate that some doubles in
argument lists are going to be mis-aligned. We'd have
to arrange to copy them from the arglist into a suitable
stack slot. This may be more trouble than its worth.
Note that some non-ABI breaking changes to align doubles and other
values have gone into the x86 compiler. In particular we should be
properly aligning all data in the static store.
jeff
next prev parent reply other threads:[~1998-06-21 23:07 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-06-18 1:32 Jeffrey A Law
1998-06-19 9:02 ` Gerald Pfeifer
1998-06-19 23:47 ` Jeffrey A Law
1998-06-19 11:57 ` Dave Love
1998-06-21 21:43 ` Craig Burley
1998-06-21 23:07 ` Jeffrey A Law [this message]
1998-06-22 5:19 ` David S. Miller
1998-06-22 12:04 ` Dave Love
1998-06-22 13:45 ` Toon Moene
1998-06-22 22:29 ` Jeffrey A Law
1998-06-22 18:20 ` 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-23 3:32 ` David S. Miller
1998-06-23 6:30 ` Craig Burley
1998-06-22 12:04 ` egcs-1.1 release schedule Dave Love
1998-06-23 3:32 ` Jeffrey A Law
1998-06-23 9:29 ` H.J. Lu
1998-06-24 17:12 ` x86 double alignment (was egcs-1.1 release schedule) Marc Lehmann
1998-06-25 0:25 ` Jeffrey A Law
1998-06-28 18:02 ` Marc Lehmann
1998-06-25 12:33 ` PÃ¥l-Kristian Engstad
1998-06-28 18:02 ` Marc Lehmann
1998-06-25 21:48 ` Craig Burley
1998-06-25 18:53 ` Jeffrey A Law
1998-06-28 22:41 ` Marc Lehmann
1998-06-29 5:20 ` Martin Kahlert
1998-06-29 11:08 ` Jeffrey A Law
1998-06-29 19:43 ` Craig Burley
1998-06-29 20:41 ` Craig Burley
1998-06-30 0:42 ` Jeffrey A Law
1998-06-30 8:19 ` gcc2 merge H.J. Lu
1998-06-30 19:49 ` Jeffrey A Law
1998-06-30 4:50 ` x86 double alignment (was egcs-1.1 release schedule) Jeffrey A Law
1998-06-23 3:32 ` egcs-1.1 release schedule Craig Burley
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
1998-06-20 6:41 ` egcs-1.1 release schedule Gabriel Dos Reis
1998-06-20 9:22 ` Joe Buck
1998-06-20 15:36 ` Mark Mitchell
1998-06-21 0:07 ` Jeffrey A Law
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=4986.898489891@hurl.cygnus.com \
--to=law@cygnus.com \
--cc=d.love@dl.ac.uk \
--cc=egcs@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).