diff options
author | Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> | 2019-04-23 10:03:41 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-04-23 12:03:41 +0200 |
commit | 48528842bd79cb2e2a1d478b1d90d748377bb76c (patch) | |
tree | 67f80893433a6265908f5557a9cd9491cbccc4a9 /libphobos | |
parent | 70265a0c5bd3e2050ce489ef969e72465e698aa5 (diff) | |
download | gcc-48528842bd79cb2e2a1d478b1d90d748377bb76c.zip gcc-48528842bd79cb2e2a1d478b1d90d748377bb76c.tar.gz gcc-48528842bd79cb2e2a1d478b1d90d748377bb76c.tar.bz2 |
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 <bernd.edlinger@hotmail.de>
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r270504
Diffstat (limited to 'libphobos')
-rw-r--r-- | libphobos/ChangeLog | 10 | ||||
-rw-r--r-- | libphobos/libdruntime/gcc/deh.d | 13 |
2 files changed, 23 insertions, 0 deletions
diff --git a/libphobos/ChangeLog b/libphobos/ChangeLog index 4f15877..74c9c88 100644 --- a/libphobos/ChangeLog +++ b/libphobos/ChangeLog @@ -1,3 +1,13 @@ +2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> + Bernd Edlinger <bernd.edlinger@hotmail.de> + Jakub Jelinek <jakub@redhat.com> + + PR target/89093 + * libdruntime/gcc/deh.d: Import gcc.attribute. + (personality_fn_attributes): New enum. + (scanLSDA, CONTINUE_UNWINDING, gdc_personality, __gdc_personality): + Add @personality_fn_attributes. + 2019-04-20 Iain Buclaw <ibuclaw@gdcproject.org> PR d/89293 diff --git a/libphobos/libdruntime/gcc/deh.d b/libphobos/libdruntime/gcc/deh.d index c04dc21..ee301b2 100644 --- a/libphobos/libdruntime/gcc/deh.d +++ b/libphobos/libdruntime/gcc/deh.d @@ -28,6 +28,7 @@ import gcc.unwind; import gcc.unwind.pe; import gcc.builtins; import gcc.config; +import gcc.attribute; extern(C) { @@ -519,10 +520,19 @@ extern(C) void _d_throw(Throwable object) terminate("unwind error", __LINE__); } +static if (GNU_ARM_EABI_Unwinder) +{ + enum personality_fn_attributes = attribute("target", ("general-regs-only")); +} +else +{ + enum personality_fn_attributes = ""; +} /** * Read and extract information from the LSDA (.gcc_except_table section). */ +@personality_fn_attributes _Unwind_Reason_Code scanLSDA(const(ubyte)* lsda, _Unwind_Exception_Class exceptionClass, _Unwind_Action actions, _Unwind_Exception* unwindHeader, _Unwind_Context* context, _Unwind_Word cfa, @@ -772,6 +782,7 @@ int actionTableLookup(_Unwind_Action actions, _Unwind_Exception* unwindHeader, * Called when the personality function has found neither a cleanup or handler. * To support ARM EABI personality routines, that must also unwind the stack. */ +@personality_fn_attributes _Unwind_Reason_Code CONTINUE_UNWINDING(_Unwind_Exception* unwindHeader, _Unwind_Context* context) { static if (GNU_ARM_EABI_Unwinder) @@ -814,6 +825,7 @@ else static if (GNU_ARM_EABI_Unwinder) { pragma(mangle, PERSONALITY_FUNCTION) + @personality_fn_attributes extern(C) _Unwind_Reason_Code gdc_personality(_Unwind_State state, _Unwind_Exception* unwindHeader, _Unwind_Context* context) @@ -873,6 +885,7 @@ else } } +@personality_fn_attributes private _Unwind_Reason_Code __gdc_personality(_Unwind_Action actions, _Unwind_Exception_Class exceptionClass, _Unwind_Exception* unwindHeader, |