aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Van Artsdalen <jrv@gnu.org>1993-03-12 09:18:56 +0000
committerJames Van Artsdalen <jrv@gnu.org>1993-03-12 09:18:56 +0000
commitdc577adaac67914bc5d67615aa78e93ffe76cd52 (patch)
treed96813528df451e2321779b8c6c1cb5ca650d481
parent9516a9afd7705634814618ecdcac6c58c90d4e15 (diff)
downloadgcc-dc577adaac67914bc5d67615aa78e93ffe76cd52.zip
gcc-dc577adaac67914bc5d67615aa78e93ffe76cd52.tar.gz
gcc-dc577adaac67914bc5d67615aa78e93ffe76cd52.tar.bz2
(movM): If REG_WAS_0, make sure the reg hasn't changed since then.
From-SVN: r3712
-rw-r--r--gcc/config/tahoe/tahoe.md12
-rw-r--r--gcc/config/vax/vax.md12
2 files changed, 17 insertions, 7 deletions
diff --git a/gcc/config/tahoe/tahoe.md b/gcc/config/tahoe/tahoe.md
index 9e6b85a..bf27234 100644
--- a/gcc/config/tahoe/tahoe.md
+++ b/gcc/config/tahoe/tahoe.md
@@ -57,9 +57,11 @@
rtx link;
if (operands[1] == const1_rtx
&& (link = find_reg_note (insn, REG_WAS_0, 0))
- && ! XEXP (link, 0)->volatil
+ && ! INSN_DELETED_P (XEXP (link, 0))
&& GET_CODE (XEXP (link, 0)) != NOTE
- && no_labels_between_p (XEXP (link, 0), insn))
+ && no_labels_between_p (XEXP (link, 0), insn)
+ /* Make sure the reg hasn't been clobbered. */
+ && ! reg_set_between_p (operands[0], XEXP (link, 0), insn))
return \"incl %0\";
if (GET_CODE (operands[1]) == SYMBOL_REF || GET_CODE (operands[1]) == CONST)
{
@@ -86,9 +88,11 @@
rtx link;
if (operands[1] == const1_rtx
&& (link = find_reg_note (insn, REG_WAS_0, 0))
- && ! XEXP (link, 0)->volatil
+ && ! INSN_DELETED_P (XEXP (link, 0))
&& GET_CODE (XEXP (link, 0)) != NOTE
- && no_labels_between_p (XEXP (link, 0), insn))
+ && no_labels_between_p (XEXP (link, 0), insn)
+ /* Make sure the reg hasn't been clobbered. */
+ && ! reg_set_between_p (operands[0], XEXP (link, 0), insn))
return \"incw %0\";
if (operands[1] == const0_rtx)
return \"clrw %0\";
diff --git a/gcc/config/vax/vax.md b/gcc/config/vax/vax.md
index 01b68a5..b3178c4 100644
--- a/gcc/config/vax/vax.md
+++ b/gcc/config/vax/vax.md
@@ -207,7 +207,9 @@
&& ! INSN_DELETED_P (XEXP (link, 0))
&& GET_CODE (XEXP (link, 0)) != NOTE
/* Make sure cross jumping didn't happen here. */
- && no_labels_between_p (XEXP (link, 0), insn))
+ && no_labels_between_p (XEXP (link, 0), insn)
+ /* Make sure the reg hasn't been clobbered. */
+ && ! reg_set_between_p (operands[0], XEXP (link, 0), insn))
return \"incl %0\";
if (GET_CODE (operands[1]) == SYMBOL_REF || GET_CODE (operands[1]) == CONST)
{
@@ -250,7 +252,9 @@
&& ! INSN_DELETED_P (XEXP (link, 0))
&& GET_CODE (XEXP (link, 0)) != NOTE
/* Make sure cross jumping didn't happen here. */
- && no_labels_between_p (XEXP (link, 0), insn))
+ && no_labels_between_p (XEXP (link, 0), insn)
+ /* Make sure the reg hasn't been clobbered. */
+ && ! reg_set_between_p (operands[0], XEXP (link, 0), insn))
return \"incw %0\";
if (GET_CODE (operands[1]) == CONST_INT)
@@ -302,7 +306,9 @@
&& ! INSN_DELETED_P (XEXP (link, 0))
&& GET_CODE (XEXP (link, 0)) != NOTE
/* Make sure cross jumping didn't happen here. */
- && no_labels_between_p (XEXP (link, 0), insn))
+ && no_labels_between_p (XEXP (link, 0), insn)
+ /* Make sure the reg hasn't been clobbered. */
+ && ! reg_set_between_p (operands[0], XEXP (link, 0), insn))
return \"incb %0\";
if (GET_CODE (operands[1]) == CONST_INT)