From 48528842bd79cb2e2a1d478b1d90d748377bb76c Mon Sep 17 00:00:00 2001 From: Ramana Radhakrishnan Date: Tue, 23 Apr 2019 10:03:41 +0000 Subject: re PR target/89093 (C++ exception handling clobbers d8 VFP register) PR target/89093 * config/arm/arm.c (aapcs_vfp_is_call_or_return_candidate): Diagnose if used with general-regs-only. (arm_conditional_register_usage): Don't add non-general regs if general-regs-only. (arm_valid_target_attribute_rec): Handle general-regs-only. * config/arm/arm.h (TARGET_HARD_FLOAT): Return false if general-regs-only. (TARGET_HARD_FLOAT_SUB): Define. (TARGET_SOFT_FLOAT): Define as negation of TARGET_HARD_FLOAT_SUB. (TARGET_REALLY_IWMMXT): Add && !TARGET_GENERAL_REGS_ONLY. (TARGET_REALLY_IWMMXT2): Likewise. * config/arm/arm.opt: Add -mgeneral-regs-only. * doc/extend.texi: Document ARM general-regs-only target. * doc/invoke.texi: Document ARM -mgeneral-regs-only. libgcc/ * config/arm/pr-support.c: Add #pragma GCC target("general-regs-only"). * config/arm/unwind-arm.c: Likewise. * unwind-c.c (PERSONALITY_FUNCTION): Add general-regs-only target attribute for ARM. libobjc/ * exception.c (PERSONALITY_FUNCTION): Add general-regs-only target attribute for ARM. libphobos/ * libdruntime/gcc/deh.d: Import gcc.attribute. (personality_fn_attributes): New enum. (scanLSDA, CONTINUE_UNWINDING, gdc_personality, __gdc_personality): Add @personality_fn_attributes. libstdc++-v3/ * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add general-regs-only target attribute for ARM. Co-Authored-By: Bernd Edlinger Co-Authored-By: Jakub Jelinek From-SVN: r270504 --- libobjc/ChangeLog | 8 ++++++++ libobjc/exception.c | 1 + 2 files changed, 9 insertions(+) (limited to 'libobjc') diff --git a/libobjc/ChangeLog b/libobjc/ChangeLog index 90cf92331e9..48e21e5b21c 100644 --- a/libobjc/ChangeLog +++ b/libobjc/ChangeLog @@ -1,3 +1,11 @@ +2019-04-23 Ramana Radhakrishnan + Bernd Edlinger + Jakub Jelinek + + PR target/89093 + * exception.c (PERSONALITY_FUNCTION): Add general-regs-only target + attribute for ARM. + 2019-03-06 Uroš Bizjak * encoding.c (DFmode): #undef before #define. diff --git a/libobjc/exception.c b/libobjc/exception.c index b96630c75ee..3c078c04126 100644 --- a/libobjc/exception.c +++ b/libobjc/exception.c @@ -220,6 +220,7 @@ get_ttype_entry (struct lsda_header_info *info, _Unwind_Word i) while (0) _Unwind_Reason_Code +__attribute__((target ("general-regs-only"))) PERSONALITY_FUNCTION (_Unwind_State state, struct _Unwind_Exception *ue_header, struct _Unwind_Context *context) -- cgit v1.2.3