[Bug target/89093] [9 Regression] C++ exception handling clobbers d8 VFP register
ramana at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Apr 12 15:13:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89093
--- Comment #45 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #42)
> Thanks for the explanation.
> In that case, I think it would be better to just add
> __attribute__((target("general-regs-only")))
> to the
> #ifdef __ARM_EABI_UNWINDER__
> _Unwind_Reason_Code
> PERSONALITY_FUNCTION (_Unwind_State, struct _Unwind_Exception *,
> struct _Unwind_Context *);
> decl in unwind-c.c and similarly for eh_personality.cc and to other
> personality routines that use CONTINUE_UNWINDING as well (plus to
> unwind-arm.c and pr-support.c using pragma for everything).
Thanks for all the analysis, this is what I had - I've been swamped this week
on a few other things, let me get this wrapped up soonish. (read it as during
next week).(In reply to Bernd Edlinger from comment #44)
> Comment on attachment 46013 [details]
> updated patch.
>
> @@ -122,12 +122,21 @@ extern tree arm_fp16_type_node;
> #define TARGET_32BIT_P(flags) (TARGET_ARM_P (flags) || TARGET_THUMB2_P
> (flags))
>
> /* Run-time Target Specification. */
> -/* Use hardware floating point instructions. */
> +/* Use hardware floating point instructions. -mgeneral-regs-only prevents
> +the use of floating point instructions and registers but does not prevent
> +emission of floating point pcs attributes. */
> #define TARGET_HARD_FLOAT (arm_float_abi != ARM_FLOAT_ABI_SOFT \
> + && bitmap_bit_p (arm_active_target.isa, \
> + isa_bit_vfpv2) \
> + && TARGET_32BIT \
> + && !TARGET_GENERAL_REGS_ONLY)
> +
> +#define TARGET_HARD_FLOAT_SUB (arm_float_abi != ARM_FLOAT_ABI_SOFT \
> && bitmap_bit_p (arm_active_target.isa, \
> isa_bit_vfpv2) \
> && TARGET_32BIT)
>
>
> BTW, you could define TARGET_HARD_FLOAT in terms of TARGET_HARD_FLOAT_SUB and
> !TARGET_GENERAL_REGS_ONLY.
Yep I could - been traveling quite a lot and I haven't managed to find someone
else to catch this - I will pick this up next week .
My fault, apologies.
Ramana
More information about the Gcc-bugs
mailing list