From 73ca2d39d888eb873202f4f55ad1c620490b38e6 Mon Sep 17 00:00:00 2001
From: hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Thu, 3 Aug 2000 18:36:14 +0000
Subject: [PATCH] 	* reg-stack.c (subst_stack_regs_pat):  Use replace_reg
 to swap 	operands.

	* i386.c (ix86_expand_branch): Mode of comparison in
	IF_THEN_ELSE is VOIDmode.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35458 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog          | 8 ++++++++
 gcc/config/i386/i386.c | 2 +-
 gcc/reg-stack.c        | 6 +++---
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a77159a4a292..71fc42958d08 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+Thu Aug  3 20:32:25 MET DST 2000  Jan Hubicka  <jh@suse.cz>
+
+	* reg-stack.c (subst_stack_regs_pat):  Use replace_reg to swap
+	operands.
+
+	* i386.c (ix86_expand_branch): Mode of comparison in
+	IF_THEN_ELSE is VOIDmode.
+
 Thu Aug  3 10:05:53 2000  Akiko Matsushita <matusita@sra.co.jp>
 
 	* gengenrtl.c, rtl.c: Avoid #elif.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index e8e984a8f389..c02dfc77346c 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -4897,7 +4897,7 @@ ix86_expand_branch (code, label)
 	code = ix86_prepare_fp_compare_args (code, &ix86_compare_op0,
 					     &ix86_compare_op1);
 
-	tmp = gen_rtx_fmt_ee (code, ix86_fp_compare_mode (code),
+	tmp = gen_rtx_fmt_ee (code, VOIDmode,
 			      ix86_compare_op0, ix86_compare_op1);
 	tmp = gen_rtx_IF_THEN_ELSE (VOIDmode, tmp,
 				    gen_rtx_LABEL_REF (VOIDmode, label),
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c
index 8f0b50e18d9c..99b9eec6ba13 100644
--- a/gcc/reg-stack.c
+++ b/gcc/reg-stack.c
@@ -1637,9 +1637,9 @@ subst_stack_regs_pat (insn, regstack, pat)
 		&& REG_P (*src1) && REG_P (*src2)
 		&& REGNO (*src1) != REGNO (*dest))
 	     {
-		rtx tmp = *src1;
-		*src1 = *src2;
-		*src2 = tmp;
+		int tmp = REGNO (*src1);
+		replace_reg (src1, REGNO (*src2));
+		replace_reg (src2, tmp);
 	     }
 	    break;
 
-- 
GitLab