+2014-12-02 Tom de Vries <tom@codesourcery.com>
+
+ PR rtl-optimization/63718
+ * config/arm/arm.c (arm_option_override): Disable fuse-caller-save for
+ Thumb1.
+
2014-12-02 Richard Biener <rguenther@suse.de>
* match.pd: When combining divisions exclude the degenerate
&& (!arm_arch7 || !current_tune->prefer_ldrd_strd))
flag_schedule_fusion = 0;
+ /* In Thumb1 mode, we emit the epilogue in RTL, but the last insn
+ - epilogue_insns - does not accurately model the corresponding insns
+ emitted in the asm file. In particular, see the comment in thumb_exit
+ 'Find out how many of the (return) argument registers we can corrupt'.
+ As a consequence, the epilogue may clobber registers without
+ fuse-caller-save finding out about it. Therefore, disable fuse-caller-save
+ in Thumb1 mode.
+ TODO: Accurately model clobbers for epilogue_insns and reenable
+ fuse-caller-save. */
+ if (TARGET_THUMB1)
+ flag_use_caller_save = 0;
+
/* Register global variables with the garbage collector. */
arm_add_gc_roots ();
}