This patch simplifies the handling of EH return. We force the use of the
commite31ad92edb51b5c32ed2d6f727f661f0d9591fc5
authorwilco <wilco@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 17 Jan 2017 19:34:26 +0000 (17 19:34 +0000)
committerwilco <wilco@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 17 Jan 2017 19:34:26 +0000 (17 19:34 +0000)
tree7d5f87929af63c4e61ef125668d02add9f1aa5e8
parent3bc3ba6f54ebc80fb0add18460286b0034e376d5
This patch simplifies the handling of EH return.  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.

    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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244547 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/aarch64/aarch64-protos.h
gcc/config/aarch64/aarch64.c
gcc/config/aarch64/aarch64.h
gcc/config/aarch64/aarch64.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/eh_return.c [new file with mode: 0644]