aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRamana Radhakrishnan <ramana.radhakrishnan@arm.com>2019-04-24 08:16:07 +0000
committerJakub Jelinek <jakub@gcc.gnu.org>2019-04-24 10:16:07 +0200
commit0f7e4fe2e3df79f854787901c3ab2e899ad1997c (patch)
tree9f8159c505b73d98eaa53a8ecc99e2fd2fcbd306
parent3795b582ace1a4d050c21e5ea0ae29e69b5fbde1 (diff)
downloadgcc-0f7e4fe2e3df79f854787901c3ab2e899ad1997c.zip
gcc-0f7e4fe2e3df79f854787901c3ab2e899ad1997c.tar.gz
gcc-0f7e4fe2e3df79f854787901c3ab2e899ad1997c.tar.bz2
re PR target/89093 (C++ exception handling clobbers d8 VFP register)
PR target/89093 * raise-gcc.c (TARGET_ATTRIBUTE): Define. (continue_unwind, personality_body, PERSONALITY_FUNCTION): Add TARGET_ATTRIBUTE. Co-Authored-By: Bernd Edlinger <bernd.edlinger@hotmail.de> Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r270535
-rw-r--r--gcc/ada/ChangeLog9
-rw-r--r--gcc/ada/raise-gcc.c10
2 files changed, 19 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 7e36b01..0888f54 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,12 @@
+2019-04-24 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+ Bernd Edlinger <bernd.edlinger@hotmail.de>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR target/89093
+ * raise-gcc.c (TARGET_ATTRIBUTE): Define.
+ (continue_unwind, personality_body, PERSONALITY_FUNCTION): Add
+ TARGET_ATTRIBUTE.
+
2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
* libgnat/i-cexten.ads (CFloat_128): New type.
diff --git a/gcc/ada/raise-gcc.c b/gcc/ada/raise-gcc.c
index 3ed9763..6092a87 100644
--- a/gcc/ada/raise-gcc.c
+++ b/gcc/ada/raise-gcc.c
@@ -1154,10 +1154,18 @@ extern void __gnat_notify_unhandled_exception (struct Exception_Occurrence *);
#define PERSONALITY_FUNCTION __gnat_personality_v0
#endif
+#if defined (__ARM_EABI_UNWINDER__) \
+ && (defined (IN_RTS) || GCC_VERSION > 9000)
+#define TARGET_ATTRIBUTE __attribute__((target ("general-regs-only")))
+#else
+#define TARGET_ATTRIBUTE
+#endif
+
/* Code executed to continue unwinding. With the ARM unwinder, the
personality routine must unwind one frame (per EHABI 7.3 4.). */
static _Unwind_Reason_Code
+TARGET_ATTRIBUTE
continue_unwind (struct _Unwind_Exception* ue_header ATTRIBUTE_UNUSED,
struct _Unwind_Context* uw_context ATTRIBUTE_UNUSED)
{
@@ -1172,6 +1180,7 @@ continue_unwind (struct _Unwind_Exception* ue_header ATTRIBUTE_UNUSED,
between all unwinders. */
static _Unwind_Reason_Code
+TARGET_ATTRIBUTE
personality_body (_Unwind_Action uw_phases,
_Unwind_Exception *uw_exception,
_Unwind_Context *uw_context)
@@ -1342,6 +1351,7 @@ PERSONALITY_FUNCTION (_Unwind_State state,
struct _Unwind_Context* uw_context);
PERSONALITY_STORAGE _Unwind_Reason_Code
+TARGET_ATTRIBUTE
PERSONALITY_FUNCTION (_Unwind_State state,
struct _Unwind_Exception* uw_exception,
struct _Unwind_Context* uw_context)