[PATCH][AArch64 - v4] Simplify eh_return implementation
James Greenhalgh
james.greenhalgh@arm.com
Tue Jan 17 18:04:00 GMT 2017
On Mon, Jan 16, 2017 at 03:00:48PM +0000, Wilco Dijkstra wrote:
> Here is the updated version:
>
> This patch simplifies the handling of the EH return value. We force the use of the
> frame pointer so the return location is always at FP + 8. This means we can emit
> a simple volatile access in EH_RETURN_HANDLER_RTX without needing md
> patterns, splitters and frame offset calculations. The new implementation also
> fixes various bugs in aarch64_final_eh_return_addr, which does not work with
> -fomit-frame-pointer, alloca or outgoing arguments.
>
> Bootstrap OK, GCC Regression OK, OK for trunk? Would it be useful to backport
> this to GCC6.x?
This is OK for trunk. I think it would be useful on GCC 6, but give it a few
days on trunk to wait for fallout before backporting.
Thanks,
James
>
> ChangeLog:
>
> 2017-01-16 Wilco Dijkstra <wdijkstr@arm.com>
>
> PR77455
> gcc/
> * config/aarch64/aarch64.md (eh_return): Remove pattern and splitter.
> * config/aarch64/aarch64.h (AARCH64_EH_STACKADJ_REGNUM): Remove.
> (EH_RETURN_HANDLER_RTX): New define.
> * config/aarch64/aarch64.c (aarch64_frame_pointer_required):
> Force frame pointer in EH return functions.
> (aarch64_expand_epilogue): Add barrier for eh_return.
> (aarch64_final_eh_return_addr): Remove.
> (aarch64_eh_return_handler_rtx): New function.
> * config/aarch64/aarch64-protos.h (aarch64_final_eh_return_addr):
> Remove.
> (aarch64_eh_return_handler_rtx): New prototype.
>
> testsuite/
> * gcc.target/aarch64/eh_return.c: New test.
More information about the Gcc-patches
mailing list