aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@cygnus.com>1998-12-17 14:02:32 +0000
committerNick Clifton <nickc@gcc.gnu.org>1998-12-17 14:02:32 +0000
commitb2e7e6fb8a3ba620d27b747624a9898716edf031 (patch)
tree36e4238959211c912f02a5c7f7e063672508ce52
parent3cdbd1f8ac98649ab5eaba2d9d065653e8a4820d (diff)
downloadgcc-b2e7e6fb8a3ba620d27b747624a9898716edf031.zip
gcc-b2e7e6fb8a3ba620d27b747624a9898716edf031.tar.gz
gcc-b2e7e6fb8a3ba620d27b747624a9898716edf031.tar.bz2
Do not generate CLOBBERs for non-pseudo regs.
From-SVN: r24364
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/expr.c26
2 files changed, 27 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8982f68..c6a3984 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Thu Dec 17 13:57:23 1998 Nick Clifton <nickc@cygnus.com>
+
+ * expr.c (emit_move_insn_1): Only emit a clobber if the target
+ is a pseudo register.
+
Thu Dec 17 13:50:29 1998 Nick Clifton <nickc@cygnus.com>
* gcse.c: Include expr.h in order to get the prototype for
diff --git a/gcc/expr.c b/gcc/expr.c
index 534fac6..e943e53 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -2593,9 +2593,18 @@ emit_move_insn_1 (x, y)
}
else
{
- /* Show the output dies here. */
+ /* Show the output dies here. This is only necessary for pseudos. */
if (x != y)
- emit_insn (gen_rtx_CLOBBER (VOIDmode, x));
+ {
+ rtx reg = x;
+
+ while (GET_CODE (reg) == SUBREG)
+ reg = SUBREG_REG (reg);
+
+ if (GET_CODE (reg) == REG
+ && REGNO (reg) >= FIRST_PSEUDO_REGISTER)
+ emit_insn (gen_rtx_CLOBBER (VOIDmode, x));
+ }
emit_insn (GEN_FCN (mov_optab->handlers[(int) submode].insn_code)
(gen_realpart (submode, x), gen_realpart (submode, y)));
@@ -2624,9 +2633,18 @@ emit_move_insn_1 (x, y)
}
#endif
- /* Show the output dies here. */
+ /* Show the output dies here. This is only necessary for pseudos. */
if (x != y)
- emit_insn (gen_rtx_CLOBBER (VOIDmode, x));
+ {
+ rtx reg = x;
+
+ while (GET_CODE (reg) == SUBREG)
+ reg = SUBREG_REG (reg);
+
+ if (GET_CODE (reg) == REG
+ && REGNO (reg) >= FIRST_PSEUDO_REGISTER)
+ emit_insn (gen_rtx_CLOBBER (VOIDmode, x));
+ }
for (i = 0;
i < (GET_MODE_SIZE (mode) + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD;