This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: arm-pe: Do not generate type 2 LDM instructions with writeback
- From: Nick Clifton <nickc at redhat dot com>
- To: Richard dot Earnshaw at arm dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 13 Mar 2003 16:57:39 +0000
- Subject: Re: arm-pe: Do not generate type 2 LDM instructions with writeback
Hi Richard,
> > Don't you also need to undo the output_return_instruction change?
> No - we can generate a valid type 2 LDM in this case, if we have
> an interrupt handler using apcs-32.
Or rather, yes, you are correct. Doh. Here is the patch.
Cheers
Nick
Index: gcc/config/arm/arm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.c,v
retrieving revision 1.267
diff -c -3 -p -w -r1.267 arm.c
*** gcc/config/arm/arm.c 13 Mar 2003 13:27:17 -0000 1.267
--- gcc/config/arm/arm.c 13 Mar 2003 16:52:51 -0000
*************** output_return_instruction (operand, real
*** 8237,8247 ****
character off in this case however, since the actual return
instruction will be a MOVS which will restore the CPSR. */
if ((TARGET_APCS_32 && IS_INTERRUPT (func_type))
! || (really_return
! && ! frame_pointer_needed
! && ((live_regs_mask & (1 << SP_REGNUM)) == 0)
! && ((live_regs_mask & (1 << PC_REGNUM)) == 0))
! )
strcat (p, "^");
}
else
--- 8237,8243 ----
character off in this case however, since the actual return
instruction will be a MOVS which will restore the CPSR. */
if ((TARGET_APCS_32 && IS_INTERRUPT (func_type))
! || (! TARGET_APCS_32 && really_return))
strcat (p, "^");
}
else