This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [rfc] stack alignment macro cleanup
- From: Paul Brook <paul at codesourcery dot com>
- To: gcc at gcc dot gnu dot org
- Cc: Richard Henderson <rth at redhat dot com>, ubizjak at gmail dot com, hjl dot tools at gmail dot com, Jakub Jelinek <jakub at redhat dot com>
- Date: Mon, 4 Oct 2010 19:00:31 +0100
- Subject: Re: [rfc] stack alignment macro cleanup
- References: <4CA78F92.5050709@redhat.com>
> I would like to reduce this to
>
> STACK_BOUNDARY
>
> -- minimum alignment enforced by hardware.
>...
> -- unchanged
This may be determined by factors other than hardware. For example the ARM
EABI requires that the stack be 8-byte aligned at public entry points. However
within a function the stack pointer is only required to be 4-byte aligned.
We currently set S_B=64 and hope nothing notices that the prologue/epilogue
involve transient 32-bit aligned values.
Your proposal doesn't make this problem any worse, if anything it's better
because we don't have to device between S_B and PREFERRED_STACK_BOUNDARY. I'm
just noting that documenting this as a hardware property is at best
misleading.
Paul