I'm working on Guarded Control Stack support for aarch64 and have a set of patches that are needed for GCS but seem useful without it so makes sense to review them separately from the rest of the GCS work.
previous version: https://gcc.gnu.org/pipermail/gcc-patches/2023-August/628123.html Szabolcs Nagy (7): aarch64: Use br instead of ret for eh_return aarch64: Do not force a stack frame for EH returns aarch64: Add eh_return compile tests aarch64: Disable branch-protection for pcs tests aarch64,arm: Remove accepted_branch_protection_string aarch64,arm: Fix branch-protection= parsing aarch64,arm: Move branch-protection data to targets gcc/config/aarch64/aarch64-opts.h | 6 +- gcc/config/aarch64/aarch64-protos.h | 1 - gcc/config/aarch64/aarch64.cc | 193 +++++++-------- gcc/config/aarch64/aarch64.h | 9 +- gcc/config/arm/aarch-common-protos.h | 5 +- gcc/config/arm/aarch-common.cc | 229 +++++------------- gcc/config/arm/aarch-common.h | 25 +- gcc/config/arm/arm-c.cc | 2 - gcc/config/arm/arm.cc | 57 ++++- gcc/config/arm/arm.opt | 3 - gcc/df-scan.cc | 10 + gcc/doc/tm.texi | 12 + gcc/doc/tm.texi.in | 12 + gcc/except.cc | 20 ++ .../gcc.target/aarch64/aapcs64/func-ret-1.c | 1 + .../gcc.target/aarch64/aapcs64/func-ret-2.c | 1 + .../gcc.target/aarch64/aapcs64/func-ret-3.c | 1 + .../gcc.target/aarch64/aapcs64/func-ret-4.c | 1 + .../aarch64/aapcs64/func-ret-64x1_1.c | 1 + .../aarch64/branch-protection-attr.c | 6 +- .../aarch64/branch-protection-option.c | 2 +- .../gcc.target/aarch64/eh_return-2.c | 9 + .../gcc.target/aarch64/eh_return-3.c | 30 +++ .../aarch64/return_address_sign_1.c | 13 +- .../aarch64/return_address_sign_2.c | 17 +- .../aarch64/return_address_sign_b_1.c | 11 - .../aarch64/return_address_sign_b_2.c | 17 +- 27 files changed, 356 insertions(+), 338 deletions(-) create mode 100644 gcc/testsuite/gcc.target/aarch64/eh_return-2.c create mode 100644 gcc/testsuite/gcc.target/aarch64/eh_return-3.c -- 2.25.1