This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: new macro STARTING_FRAME_PHASE: alignment
- From: Geoff Keating <geoffk at geoffk dot org>
- To: rth at redhat dot com
- Cc: aldyh at redhat dot com, gcc-patches at gcc dot gnu dot org, shebs at apple dot com, dalej at apple dot com
- Date: Mon, 21 Jan 2002 21:03:30 -0800
- Subject: Re: new macro STARTING_FRAME_PHASE: alignment
- References: <20020119023540.GA2533@redhat.com> <20020121160054.P19335@redhat.com>
- Reply-to: Geoff Keating <geoffk at redhat dot com>
> Date: Mon, 21 Jan 2002 16:00:54 -0800
> From: Richard Henderson <rth@redhat.com>
> Cc: gcc-patches@gcc.gnu.org, geoffk@redhat.com, shebs@apple.com,
> dalej@apple.com
> Mail-Followup-To: Richard Henderson <rth@redhat.com>,
> Aldy Hernandez <aldyh@redhat.com>, gcc-patches@gcc.gnu.org,
> geoffk@redhat.com, shebs@apple.com, dalej@apple.com
> Content-Disposition: inline
> User-Agent: Mutt/1.2.5.1i
>
> On Fri, Jan 18, 2002 at 06:35:40PM -0800, Aldy Hernandez wrote:
> > this patch introduces a new macro STARTING_FRAME_PHASE (documented).
>
> There is no need for a new macro. The frame pointer _must_ be
> aligned, as we assert here:
>
> emit-rtl.c:4719: REGNO_POINTER_ALIGN (FRAME_POINTER_REGNUM) = STACK_BOUNDARY;
>
> therefore it must always be the case that
>
> sb = STACK_BOUNDARY / BITS_PER_UNIT;
> off = STARTING_FRAME_OFFSET % sb;
>
> STARTING_FRAME_PHASE == (off ? sb - off : 0)
Yes, this is true. Unfortunately, it's not necessarily possible to
compute STARTING_FRAME_OFFSET at the appropriate time; it relies on
things like the size of the outgoing arguments.
I believe a test just like the above is now made in
instantiate_virtual_regs, to verify that STARTING_FRAME_PHASE is set
correctly.
--
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>