This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] mudflap: remove usage of builtin_frame_address
- From: Andreas Krebbel1 <KREBBEL1 at de dot ibm dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Ulrich Weigand <Ulrich dot Weigand at de dot ibm dot com>
- Date: Fri, 14 Jan 2005 13:21:01 +0100
- Subject: Re: [PATCH] mudflap: remove usage of builtin_frame_address
> > Do you remember whether and how that issue was solved?
> I'm sure it wasn't.
Obviously right ;-)
Unfortunately simply returning frame_pointer_rtx instead of
hard_frame_pointer_rtx in builtin_frame_address does not appear
to be the right way. It works only for s390 because the frame pointer
is always eliminated to hard frame pointer without any offset. For
i386 there is mostly (if local variables are declared) an offset between
both which makes frame pointer the wrong choice.
Most probably it would also break mips where the frame pointer is
to stack pointer.
Perhaps something like a virtual hard frame pointer would be a solution?!
builtin_frame_address could return a virtual_hard_frame_pointer_rtx which
is eliminated in the back end to either be the hard frame pointer without
any offset or to a stack pointer relative value if the back end does not
intend to maintain a frame pointer for that function.