public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* STACK_BOUNDARY on alpha ports ?
@ 2004-01-21 14:35 Olivier Hainque
  2004-01-21 18:20 ` Richard Henderson
  0 siblings, 1 reply; 5+ messages in thread
From: Olivier Hainque @ 2004-01-21 14:35 UTC (permalink / raw)
  To: gcc; +Cc: hainque


Hello,

STACK_BOUNDARY is currently 64 on every alpha port. This is not in accordance
with what the ABIs for at least tru64 and I think OpenVMS require. Typically,
for tru64, the calling standard reads:

    The stack pointer (SP) must at all times denote an address that has
    octaword alignment.

Two questions, then:

 o Would it be OK to change STACK_BOUNDARY to 128 on the impacted ports ?
   (I presume the current value has been set for some reason)

 o Would other ports than OpenVMS and tru64 need to be adjusted ?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: STACK_BOUNDARY on alpha ports ?
  2004-01-21 14:35 STACK_BOUNDARY on alpha ports ? Olivier Hainque
@ 2004-01-21 18:20 ` Richard Henderson
  2004-01-22 10:00   ` Olivier Hainque
  2004-01-22 11:39   ` Olivier Hainque
  0 siblings, 2 replies; 5+ messages in thread
From: Richard Henderson @ 2004-01-21 18:20 UTC (permalink / raw)
  To: Olivier Hainque; +Cc: gcc

On Wed, Jan 21, 2004 at 03:26:51PM +0100, Olivier Hainque wrote:
> STACK_BOUNDARY is currently 64 on every alpha port.

Really?  Wow, this is a surprise...

>  o Would it be OK to change STACK_BOUNDARY to 128 on the impacted ports ?
>    (I presume the current value has been set for some reason)

Certainly it would be ok for OSF and NT; we've preserved
128-bit alignment forever:

      /* Our size must be even (multiple of 16 bytes).  */
      if (sa_size & 1)
        sa_size++;

>  o Would other ports than OpenVMS and tru64 need to be adjusted ?

Someone needs to check OpenVMS and Unicos ABIs, since they
do *not* currently enforce 128-bit alignment.


r~

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: STACK_BOUNDARY on alpha ports ?
  2004-01-21 18:20 ` Richard Henderson
@ 2004-01-22 10:00   ` Olivier Hainque
  2004-01-22 11:39   ` Olivier Hainque
  1 sibling, 0 replies; 5+ messages in thread
From: Olivier Hainque @ 2004-01-22 10:00 UTC (permalink / raw)
  To: Richard Henderson, gcc; +Cc: hainque

Richard Henderson wrote:
> > STACK_BOUNDARY is currently 64 on every alpha port.
> 
> Really?  Wow, this is a surprise...

 Indeed.

> >  o Would it be OK to change STACK_BOUNDARY to 128 on the impacted ports ?
> >    (I presume the current value has been set for some reason)
> 
> Certainly it would be ok for OSF and NT; we've preserved
> 128-bit alignment forever:

 I see, thanks.

> Someone needs to check OpenVMS and Unicos ABIs, since they
> do *not* currently enforce 128-bit alignment.

 I can check for OpenVMS, and have never looked at Unicos so have no
 documentation handy.  I'll see what I can find, and would be grateful
 if anyone has pointers to start with :)

 Thanks for your help,

 Olivier




 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: STACK_BOUNDARY on alpha ports ?
  2004-01-21 18:20 ` Richard Henderson
  2004-01-22 10:00   ` Olivier Hainque
@ 2004-01-22 11:39   ` Olivier Hainque
  2004-01-22 19:36     ` Richard Henderson
  1 sibling, 1 reply; 5+ messages in thread
From: Olivier Hainque @ 2004-01-22 11:39 UTC (permalink / raw)
  To: Richard Henderson, gcc; +Cc: hainque

Richard Henderson wrote:
> Someone needs to check OpenVMS and Unicos ABIs, since they
> do *not* currently enforce 128-bit alignment.

 The OpenVMS calling standard for alpha states (3.7.1 Call conventions):

   o Stack usage: At any time, the stack pointer must denote an address that
     has the minimum alignment required by the Alpha hardware. In addition,
     whenever control is transferred to another procedure, the stack must be
     octaword aligned.

 Would setting STACK_BOUNDARY to 128 be the right way to address that ?

 I see it does not only impact the allocation of frames as a whole, but also
 the alignment of various pointers within a frame (from what init_emit does).


 As for Unicos, the status of it's support in GCC is unclear to me.  
 
 The section in "supported platforms" is not attractive and I couldn't find
 a mention of unicos in MAINTAINTERS.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: STACK_BOUNDARY on alpha ports ?
  2004-01-22 11:39   ` Olivier Hainque
@ 2004-01-22 19:36     ` Richard Henderson
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2004-01-22 19:36 UTC (permalink / raw)
  To: Olivier Hainque; +Cc: gcc, Roman Lechtchinsky

On Thu, Jan 22, 2004 at 12:31:38PM +0100, Olivier Hainque wrote:
>  The OpenVMS calling standard for alpha states (3.7.1 Call conventions):
> 
>    o Stack usage: At any time, the stack pointer must denote an address that
>      has the minimum alignment required by the Alpha hardware. In addition,
>      whenever control is transferred to another procedure, the stack must be
>      octaword aligned.
> 
>  Would setting STACK_BOUNDARY to 128 be the right way to address that ?

Well, it's a start.  I didn't see anything in the prologue code to
round up the stack frame size; that doesn't mean it isn't hiding
somewhere, but it does mean someone needs to look.

>  As for Unicos, the status of it's support in GCC is unclear to me.  
>  
>  The section in "supported platforms" is not attractive and I couldn't find
>  a mention of unicos in MAINTAINTERS.

Roman Lechtchinsky, cc'd, contributed the port.  Roman, the question
is what the unicos abi requires for stack pointer alignment.  All
the other ABIs require 16-byte alignment; is it the same there?


r~

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-01-22 19:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-21 14:35 STACK_BOUNDARY on alpha ports ? Olivier Hainque
2004-01-21 18:20 ` Richard Henderson
2004-01-22 10:00   ` Olivier Hainque
2004-01-22 11:39   ` Olivier Hainque
2004-01-22 19:36     ` Richard Henderson

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).