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. regards, venkat. On 29 July 2013 11:57, Andrew Pinski <pins...@gmail.com> wrote: > On Sun, Jul 28, 2013 at 3:53 AM, Venkataramanan Kumar > <venkataramanan.ku...@linaro.org> 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 <venkataramanan.ku...@linaro.org> >> >> * 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.