Porting libsanitizer to aarch64
Richard Earnshaw
rearnsha@arm.com
Thu May 23 16:43:00 GMT 2013
On 23/05/13 17:36, Jakub Jelinek wrote:
> On Thu, May 23, 2013 at 05:28:29PM +0100, Richard Earnshaw wrote:
>>> FWIW, I would actually recommend against conditionalizing FRAME_GROWS_DOWNWARD
>>> for a new port. Just make it _always_ grow down and save yourself the
>>> additional code bloat in the backend.
>>
>> Doing that would add significantly to the cost of setting up the frame.
>
> Why?
>
I just explained the overheads of laying out the frame from the other end.
>> FRAME_GROWS_DOWNWARD
>> Define this macro to nonzero value if the addresses of local
>> variable slots are at negative offsets from the frame pointer.
>
> Yes, but this usually talks about the eliminable soft frame pointer,
> something that can be eliminated later on to hard frame pointer or stack
> pointer. So, if right now say you are eliminating soft frame pointer
> to hard frame pointer with offset zero, you could eliminate it to
> hard frame pointer minus frame size instead or vice versa (haven't looked
> what aarch64 does now).
>
So you're saying the documentation is wrong, or at the very least
misleading... What about dealing with address validation for soft
accesses? Surely we get better code if the SFP ~= HFP since we end up
with fewer cases where we fall back to sub-optimal sequences.
R.
More information about the Gcc
mailing list