https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77455

--- Comment #3 from wilco at gcc dot gnu.org ---
Author: wilco
Date: Fri Jan 20 15:34:41 2017
New Revision: 244724

URL: https://gcc.gnu.org/viewcvs?rev=244724&root=gcc&view=rev
Log:
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.

        Backport from mainline
    gcc/
        PR target/77455
        * 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/
        PR target/77455
        * gcc.target/aarch64/eh_return.c: New test.

Added:
    branches/gcc-6-branch/gcc/testsuite/gcc.target/aarch64/eh_return.c
Modified:
    branches/gcc-6-branch/gcc/ChangeLog
    branches/gcc-6-branch/gcc/config/aarch64/aarch64-protos.h
    branches/gcc-6-branch/gcc/config/aarch64/aarch64.c
    branches/gcc-6-branch/gcc/config/aarch64/aarch64.h
    branches/gcc-6-branch/gcc/config/aarch64/aarch64.md
    branches/gcc-6-branch/gcc/testsuite/ChangeLog

Reply via email to