This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix STACK_BOUNDARY on sparcv9
- From: Richard Henderson <rth at redhat dot com>
- To: Geoff Keating <geoffk at geoffk dot org>
- Cc: gcc-patches at gcc dot gnu dot org, davem at redhat dot com, jakub at redhat dot com
- Date: Mon, 6 Oct 2003 16:25:24 -0700
- Subject: Re: Fix STACK_BOUNDARY on sparcv9
- References: <200310062319.h96NJQG17403@desire.geoffk.org>
On Mon, Oct 06, 2003 at 04:19:26PM -0700, Geoff Keating wrote:
> /* Boundary (in *bits*) on which stack pointer should be aligned. */
> -#define STACK_BOUNDARY (TARGET_ARCH64 ? 128 : 64)
> +#define STACK_BOUNDARY (TARGET_ARCH64 ? (TARGET_STACK_BIAS ? 8 : 128)
This isn't correct at all. This has very far-reaching effects beyond
what you want. For one, frame_pointer_rtx is no longer aligned. For
another, we no longer allocate stack frames as multiples of 16 bytes.
I think what you want is to override init_emit and do
if (TARGET_STACK_BIAS)
REGNO_POINTER_ALIGN (STACK_POINTER_REGNUM) = 8;
somewhere in sparc.c. I guess INIT_EXPANDERS would be the right hook,
since it appears immediately after that bit in init_emit.
r~