aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTom de Vries <tom@codesourcery.com>2014-12-02 13:35:10 +0000
committerTom de Vries <vries@gcc.gnu.org>2014-12-02 13:35:10 +0000
commitfb98f8869b20ecc3ee1f6cb473ab6d7b3c34ece7 (patch)
treed740a6ef24472cc788d1ae6549262f7ea9cfa7ad /gcc
parente3376050fc1981c8510a720291569c6abaf4e2ef (diff)
downloadgcc-fb98f8869b20ecc3ee1f6cb473ab6d7b3c34ece7.zip
gcc-fb98f8869b20ecc3ee1f6cb473ab6d7b3c34ece7.tar.gz
gcc-fb98f8869b20ecc3ee1f6cb473ab6d7b3c34ece7.tar.bz2
re PR rtl-optimization/63718 (ARM Thumb1 bootstrap fail after fuse-caller-save info in cprop-hardreg)
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. From-SVN: r218271
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/arm/arm.c12
2 files changed, 18 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2bf3bce..3eacc5a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+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
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index c40c3bd..f3be6cf 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -3105,6 +3105,18 @@ arm_option_override (void)
&& (!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 ();
}