Jiong Wang <jiong.w...@foss.arm.com> wrote:
> The -fomit-frame-pointer is really broken on aarch64_find_eh_return_addr

Yes, that's a good conclusion. However even with the frame pointer there are 
cases that fail, for example it will access LR off SP even after alloca. In fact
we're lucky it works at all sometimes...

> I think the correct offset when -fomit-frame-pointer should be:
>
>  "cfun->machine->frame.reg_offset[LR_REGNUM]"

With the offset to the register save area added of course. But then you still
need to expand late and so need the patterns in the MD. By forcing a frame
pointer we avoid all that complexity.

Wilco

Reply via email to