public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: hjl@lucon.org (H.J. Lu)
To: egcs@cygnus.com
Cc: d.love@dl.ac.uk, pcg@goof.com
Subject: Re: x86 stack alignment redux
Date: Thu, 11 Dec 1997 23:40:00 -0000	[thread overview]
Message-ID: <m0xgPgQ-0004ecC@ocean.lucon.org> (raw)
In-Reply-To: <16883.881910032@hurl.cygnus.com>

>   > 1997-11-13  Dave Love  <d.love@dl.ac.uk>
>   > 
>   > 	* config/i386/linux.h (STACK_BOUNDARY): Define as 64 for glibc2.
>   > 	* config/i386/gnu.h (STACK_BOUNDARY): Define as 64.
> I installed this.

I don't think it is a good idea. Please check out Marc's patch.

> 
> However, I'm a little worried about things breaking if we happen to mix
> code compiled with an old compiler (say egcs-1.0 or gcc-2.7) with code
> which assumes a 64bit stack boundary.  Isn't this change going to break
> that case, or does the prologue/epilogue code for older compilers always
> allocate 64bit hunks?
> 

pcg@goof.com (Marc Lehmann) and I have discussed it a few months ago.
There are several alignments. We should enable those which won't
break old binaries by default. We only enable those which are not
compatible with old binaries when asked for. Please check the egcs
mail archive. I have forwarded Marc's patch to egcs at the beginning.

I am enclosing the ChangeLog here:

Thu Aug  7 22:30:59 1997  Marc Lehmann  <pcg@goof.com>

        * i386.c (ix86_sp_offset, ix86_frame_size): New function.
        (function_prologue, ix86_expand_prologue, ix86_expand_epilogue):
        use ix86_frame_size () instead of get_frame_size ().
        * i386.h (MASK_STACK_ALIGN_DOUBLE, MASK_ARG_ALIGN_DOUBLE,
        TARGET_STACK_ALIGN_DOUBLE, TARGET_ARG_ALIGN_DOUBLE):
        new defines.
        (TARGET_SWITCHES): new switches -m[no-]stack-align-double,
        -m[no]-arg-align-double, -mall-align-double.  -mstack-align-double
        enabled by default.
        (FUNCTION_ARG_BOUNDARY): align DFmode and XFmode arguments
        to 64 bit when -marg-align-double.
        (STACK_BOUNDARY, BIGGEST_ALIGNMENT): set to 64 if double-alignment
        requested.
        (INITIAL_ELIMINATION_OFFSET): use ix86_sp_offset () instead
        of get_frame_size ().
 


-- 
H.J. Lu (hjl@gnu.org)

  reply	other threads:[~1997-12-11 23:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-11-13  9:28 Dave Love
1997-12-11 23:10 ` Jeffrey A Law
1997-12-11 23:40   ` H.J. Lu [this message]
1997-12-12  0:18     ` Jeffrey A Law
1997-12-12  7:28       ` H.J. Lu
1997-12-12 10:18       ` Marc Lehmann
1997-12-12 13:04       ` Dave Love
1997-12-14 22:36         ` Jeffrey A Law
1997-12-12 13:04     ` Marc Lehmann
1997-12-14 22:41       ` Jeffrey A Law
1997-12-12 13:04 Mike Stump

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=m0xgPgQ-0004ecC@ocean.lucon.org \
    --to=hjl@lucon.org \
    --cc=d.love@dl.ac.uk \
    --cc=egcs@cygnus.com \
    --cc=pcg@goof.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).