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


Andreas Krebbel1 <KREBBEL1@de.ibm.com> writes:
> Unfortunately simply returning frame_pointer_rtx instead of
> hard_frame_pointer_rtx in builtin_frame_address does not appear
> to be the right way.  [...]  Most probably it would also break
> mips where the frame pointer is eliminated to stack pointer.

I'm just echoing what rth said here really, but in those circumstances,
__builtin_frame_address() should return the value of the stack pointer.
In other words, using frame_pointer_rtx should be exactly right for mips.

In theory (not tested ;) this should also help mips16, where the hard
frame pointer is offset from the soft frame pointer by the size of the
outgoing arguments.  I think any mips users of __b_f_a() would expect it
to return a pointer to the first outgoing argument in all circumstances,
including when a mips16 function decides to use a hard frame pointer.

I think the current value of __builtin_frame_address() is just as
broken for mips as it is for s390.

Richard


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