This is the mail archive of the gcc-patches@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]

Re: Fix STACK_BOUNDARY on sparcv9


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~


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