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: [Patch, Aarch64]: Handle return address via. frame pointer

Hi Andrew,

I can see that rs6000 port uses a flag
"cfun->machine->ra_needs_full_frame = 1".

But I need to check if this flag helps to generate frame for all the
functions in a compilation unit.

The requirement is that frame need to be preserved by any function
that calls our function which uses _builtin_return_address(1), even
when -fomit-frame-pointer is used.


On 29 July 2013 11:57, Andrew Pinski <> wrote:
> On Sun, Jul 28, 2013 at 3:53 AM, Venkataramanan Kumar
> <> wrote:
>> Hi Maintainers,
>> This patch adds supports to handle return address via. frame pointer.
> I noticed this patch causes undefined behavior when
> -fomit-frame-pointer and __builtin_return_address(1) is used.  On
> PowerPC it is defined correctly that is it generates a frame for that
> case.  Now on x86_64 it might be undefined but I think that is just
> wrong since __builtin_return_address is just used for debugging
> anyways.
> Thanks,
> Andrew
>> gcc/ChangeLog
>> ---------------------
>> 2013-07-28  Venkataramanan Kumar  <>
>>        *  config/aarch64/aarch64.c (aarch64_return_addr): Handle returning
>>           address from a frame.
>> Regression tested with aarch64-none-elf with V8 foundation model.
>> regards,
>> Venkat.

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