This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR target/23250 ARM callee super-interworking
- From: Richard Earnshaw <rearnsha at gcc dot gnu dot org>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 12 Aug 2005 16:01:37 +0100
- Subject: Re: [PATCH] Fix PR target/23250 ARM callee super-interworking
- References: <1123771188.21196.19.camel@pc960.cambridge.arm.com>
On Thu, 2005-08-11 at 15:39, Richard Earnshaw wrote:
> This patch fixes a regression in gcc-4.0 on ARM when generating Thumb
> code, where callee-super-interworking no-longer forces interworking
> returns. Callee super-interworking only affects the prologue sequence,
> but it's pointless doing this if the return sequence can also do
> interworking. This patch achieves that by turning on normal
> interworking if the caller has requested super-interworking.
>
> Tested on arm-elf and installed on the mainline and 4.0 branch.
Hmph! I blew it on the 4.0 branch, where I clearly failed to test this
properly :-(
Anyway, in 4.0 we need to use ARM_FLAG_INTERWORK, not MASK_INTERWORK
which was new with the option generation machinery.
Tested properly this time...
R.
2005-08-12 Richard Earnshaw <richard.earnshaw@arm.com>
PR target/23250
* arm.c (arm_override_options): Use ARM_FLAG_INTERWORK, not
MASK_INTERWORK.
Index: config/arm/arm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.c,v
retrieving revision 1.430.2.3
diff -p -r1.430.2.3 arm.c
*** config/arm/arm.c 11 Aug 2005 14:33:15 -0000 1.430.2.3
--- config/arm/arm.c 12 Aug 2005 14:54:50 -0000
*************** arm_override_options (void)
*** 947,953 ****
/* Callee super interworking implies thumb interworking. Adding
this to the flags here simplifies the logic elsewhere. */
if (TARGET_THUMB && TARGET_CALLEE_INTERWORKING)
! target_flags |= MASK_INTERWORK;
/* TARGET_BACKTRACE calls leaf_function_p, which causes a crash if done
from here where no function is being compiled currently. */
--- 947,953 ----
/* Callee super interworking implies thumb interworking. Adding
this to the flags here simplifies the logic elsewhere. */
if (TARGET_THUMB && TARGET_CALLEE_INTERWORKING)
! target_flags |= ARM_FLAG_INTERWORK;
/* TARGET_BACKTRACE calls leaf_function_p, which causes a crash if done
from here where no function is being compiled currently. */