From dc577adaac67914bc5d67615aa78e93ffe76cd52 Mon Sep 17 00:00:00 2001 From: James Van Artsdalen Date: Fri, 12 Mar 1993 09:18:56 +0000 Subject: [PATCH] (movM): If REG_WAS_0, make sure the reg hasn't changed since then. From-SVN: r3712 --- gcc/config/tahoe/tahoe.md | 12 ++++++++---- gcc/config/vax/vax.md | 12 +++++++++--- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/gcc/config/tahoe/tahoe.md b/gcc/config/tahoe/tahoe.md index 9e6b85abc70..bf2723431c6 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 01b68a59626..b3178c4aec9 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)