aboutsummaryrefslogtreecommitdiff
path: root/libphobos
diff options
context:
space:
mode:
authorRamana Radhakrishnan <ramana.radhakrishnan@arm.com>2019-04-23 10:03:41 +0000
committerJakub Jelinek <jakub@redhat.com>2019-04-23 10:03:41 +0000
commita8a56baf6a55aa7c84332598195cda979ae84c17 (patch)
tree67f80893433a6265908f5557a9cd9491cbccc4a9 /libphobos
parentba3892a472b69c067f8a6f8c0a47b8cb4dc70c99 (diff)
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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@270504 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libphobos')
-rw-r--r--libphobos/ChangeLog10
-rw-r--r--libphobos/libdruntime/gcc/deh.d13
2 files changed, 23 insertions, 0 deletions
diff --git a/libphobos/ChangeLog b/libphobos/ChangeLog
index 4f158776e23..74c9c88730d 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 c04dc21263b..ee301b2a3ba 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,