This is the mail archive of the 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: Expansion of __builtin_frame_address

On Fri, 2006-06-02 at 16:46, Mark Mitchell wrote:
> Richard, I can't tell from your comments how you think _b_f_a(0) should
> be implemented on ARM.  We could use Mark's logic (forcing a hard frame
> pointer), but stuff it into INITIAL_FRAME_ADDRESS_RTX.  We could also
> try to reimplement the thing you mentioned about using a pseudo, though
> I guess we'd need to work out why that was thought a bad idea before.
> What option do you suggest?

I think I need to understand first what _b_f_a(0) would be used for. 
Until I understand that I can't really say how best it should be
implemented.  One _possible_ implementation that would be reasonable
would be the dwarf CFA value for the function: but that's very different
from both the current ARM r11 value or the Thumb r7 value in functions
that use a frame register.  However, it is well defined in both ARM and
Thumb code.

Note that in ARM code r11 points near to the top of the frame, but in
Thumb code r7 points to the bottom of the frame (in gcc-4.2 or later,
since you can't use negative offsets in memory addresses).


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