aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2014-12-03 21:59:10 +0000
committerUlrich Weigand <uweigand@gcc.gnu.org>2014-12-03 21:59:10 +0000
commitbc04abff10076fe8ce25fa765032b1cbfa0324e3 (patch)
treef081b6847a0e9377b7ccb1828811368648fc35ee
parent380abb42063f56b3a38a787b7d14bb67bcce20b7 (diff)
downloadgcc-bc04abff10076fe8ce25fa765032b1cbfa0324e3.zip
gcc-bc04abff10076fe8ce25fa765032b1cbfa0324e3.tar.gz
gcc-bc04abff10076fe8ce25fa765032b1cbfa0324e3.tar.bz2
re PR rtl-optimization/64010 ([msp430-elf] struct function dereference clobbers parameter passed to function)
PR rtl-optimization/64010 * reload.c (push_reload): Before reusing a register contained in an operand as input reload register, ensure that it is not used in CALL_INSN_FUNCTION_USAGE. From-SVN: r218335
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/reload.c1
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index fabd390..0fac9a2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2014-12-03 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ PR rtl-optimization/64010
+ * reload.c (push_reload): Before reusing a register contained
+ in an operand as input reload register, ensure that it is not
+ used in CALL_INSN_FUNCTION_USAGE.
+
2014-12-03 Ulrich Drepper <drepper@gmail.com>
* Makefile.in: Use $(LN_S) instead of $(LN) -s and remove file first
diff --git a/gcc/reload.c b/gcc/reload.c
index 9ef2c89..3f5abb8 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -1625,6 +1625,7 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
end_hard_regno (rel_mode,
regno),
PATTERN (this_insn), inloc)
+ && ! find_reg_fusage (this_insn, USE, XEXP (note, 0))
/* If this is also an output reload, IN cannot be used as
the reload register if it is set in this insn unless IN
is also OUT. */