[PATCH] mudflap: remove usage of builtin_frame_address
Andreas Krebbel1
KREBBEL1@de.ibm.com
Fri Jan 14 12:20:00 GMT 2005
Hi,
> > 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
eliminated
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.
Bye,
-Andreas-
More information about the Gcc-patches
mailing list