Re: [PATCH] add 'rs6000_in_function_epilogue_p()'

Daniel Jacobowitz
2005-12-03T04:53:54Z

On Fri, Dec 02, 2005 at 08:20:48PM -0800, Jim Blandy wrote:
> But we can do a bit better than that. If skip_prologue were sure that
> lim_pc represents a real PC value (its callers know), and scanning
> from the entry point wasn't able to reach lim_pc, and lim_pc points
> directly at a return instruction, then we *know* that the current SP
> is our CFA. And if you actually understand all the instructions
> between lim_pc and the return instruction, then you may again be able
> to derive the CFA. This information can be used in preference to that
> obtained with the from-entry-point scan.

Fascinating. So, do both prologue and epilogue recognition. It would
be useful for backtraces in epilogues, but not for much else, and it
would be a lot of work, so I have trouble seeing this get implemented.
But, maybe.

Of course this is only useful without CFI and the main reason PPC
doesn't use CFI has been solved. And the problem is likely to
reoccur with CFI that doesn't describe the epilogue, which today is
prevalent.

--
Daniel Jacobowitz
CodeSourcery, LLC