This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/33721] [meta-bug] Gcc can't properly align stack variable



------- Comment #1 from hjl at lucon dot org  2007-10-10 13:52 -------
There are

 -- Macro: STACK_BOUNDARY
     Define this macro to the minimum alignment enforced by hardware
     for the stack pointer on this machine.  The definition is a C
     expression for the desired alignment (measured in bits).  This
     value is used as a default if `PREFERRED_STACK_BOUNDARY' is not
     defined.  On most machines, this should be the same as
     `PARM_BOUNDARY'.

 -- Macro: PREFERRED_STACK_BOUNDARY
     Define this macro if you wish to preserve a certain alignment for
     the stack pointer, greater than what the hardware enforces.  The
     definition is a C expression for the desired alignment (measured
     in bits).  This macro must evaluate to a value equal to or larger
     than `STACK_BOUNDARY'.

For psABI conformance, we need INCOMING_STACK_BOUNDARY, which is specified
by the psABI. For backends with INCOMING_STACK_BOUNDARY support,
PREFERRED_STACK_BOUNDARY is used for outgoing stack alignment only. That
means

STACK_BOUNDARY <= PREFERRED_STACK_BOUNDARY <= INCOMING_STACK_BOUNDARY


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33721


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]