diff options
author | Paul Brook <paul@codesourcery.com> | 2006-02-16 15:58:41 +0000 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2006-02-16 15:58:41 +0000 |
commit | 0db1a8aeb12b183841af4461a84f7a1a01b008cf (patch) | |
tree | e19fff2d7107e7319b091ff6e64c1bd420e34fc6 | |
parent | 1ec39a0cab0a3c93689a260a7bfd55cdfa411c0e (diff) |
2005-02-16 Paul Brook <paul@codesourcery.com>csl-arm-branch
* reload1.c (emit_reload_insns): Invalidate dead input registers used
for reloads.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/csl-arm-branch@111140 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog.csl-arm | 5 | ||||
-rw-r--r-- | gcc/reload1.c | 17 |
2 files changed, 16 insertions, 6 deletions
diff --git a/gcc/ChangeLog.csl-arm b/gcc/ChangeLog.csl-arm index 525b860618f..9ca3bc6c63f 100644 --- a/gcc/ChangeLog.csl-arm +++ b/gcc/ChangeLog.csl-arm @@ -1,3 +1,8 @@ +2005-02-16 Paul Brook <paul@codesourcery.com> + + * reload1.c (emit_reload_insns): Invalidate dead input registers used + for reloads. + 2006-01-18 Paul Brook <paul@codesourcery.com> * doc/invoke.texi: Document Arm -march=armv6t2 and -mcpu1156t2. diff --git a/gcc/reload1.c b/gcc/reload1.c index 26f62aa2ee5..7cb5ce9570b 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -7214,13 +7214,18 @@ emit_reload_insns (struct insn_chain *chain) /* If a register gets output-reloaded from a non-spill register, that invalidates any previous reloaded copy of it. But forget_old_reloads_1 won't get to see it, because - it thinks only about the original insn. So invalidate it here. */ - if (i < 0 && rld[r].out != 0 - && (GET_CODE (rld[r].out) == REG - || (GET_CODE (rld[r].out) == MEM + it thinks only about the original insn. So invalidate it here. + Also do the same thing for RELOAD_OTHER constraints where the + output is discarded. */ + if (i < 0 + && ((rld[r].out != 0 + && (GET_CODE (rld[r].out) == REG + || (GET_CODE (rld[r].out) == MEM + && GET_CODE (rld[r].out_reg) == REG))) + || (rld[r].out == 0 && rld[r].out_reg && GET_CODE (rld[r].out_reg) == REG))) { - rtx out = (GET_CODE (rld[r].out) == REG + rtx out = (rld[r].out && GET_CODE (rld[r].out) == REG ? rld[r].out : rld[r].out_reg); int nregno = REGNO (out); if (nregno >= FIRST_PSEUDO_REGISTER) @@ -7296,7 +7301,7 @@ emit_reload_insns (struct insn_chain *chain) } else { - int num_regs = HARD_REGNO_NREGS (nregno, GET_MODE (rld[r].out)); + int num_regs = HARD_REGNO_NREGS (nregno, GET_MODE (out)); while (num_regs-- > 0) reg_last_reload_reg[nregno + num_regs] = 0; |