public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Eric Botcazou <ebotcazou@adacore.com>
To: Richard Henderson <rth@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [patch] Fix PR middle-end/46894
Date: Thu, 13 Jan 2011 17:24:00 -0000	[thread overview]
Message-ID: <201101131814.20674.ebotcazou@adacore.com> (raw)
In-Reply-To: <4D2F2B88.7060507@redhat.com>

> I think that you shouldn't change the behaviour of alignment wrt
> STACK_POINTER_OFFSET.  So far, all targets do have (sp+S_P_O) with
> the required alignment.
>
> What about
>
>   must_align = (crtl->preferred_stack_boundary < required_align);
>   if (STACK_POINTER_OFFSET * BITS_PER_UNIT % required_align)
>     must_align = true;
>
>   if (must_align)
>     {
>       if (required_align > P_S_B)
> 	...
>     }
>
> #ifdef STACK_DYNAMIC_OFFSET
>   /* ??? S_D_O will not be finalized until we've finished expanding the
>      function.  It would be nice to know what minimum alignment we might
>      assume.  E.g. PUSH_ROUNDING or something.  */
>   must_align = true;
>   extra_align = BITS_PER_UNIT;
> #endif
>
>   if (must_align)
>     {
>       unsigned extra = ...

Fine with me, but an explicit ack from a RM would probably be in order because 
you're changing the behavior for all targets where STACK_DYNAMIC_OFFSET isn't 
defined, i.e. all of them except for PPC, PA and s390; the default definition 
of STACK_DYNAMIC_OFFSET in function.c doesn't seem to guarantee that it will 
always maintain PREFERRED_STACK_BOUNDARY alignment.

-- 
Eric Botcazou

  reply	other threads:[~2011-01-13 17:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-13 16:36 Eric Botcazou
2011-01-13 17:07 ` Richard Henderson
2011-01-13 17:24   ` Eric Botcazou [this message]
2011-01-13 18:25     ` Richard Henderson
2011-01-13 18:57       ` Eric Botcazou
2011-01-14 17:27         ` IainS
2011-01-15 16:03           ` Eric Botcazou
2011-01-18 21:45             ` Eric Botcazou

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=201101131814.20674.ebotcazou@adacore.com \
    --to=ebotcazou@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rth@redhat.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).