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: [PATCH] mudflap: remove usage of builtin_frame_address






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-


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