From 89e43e33153195963cf124b257a322f0b7f9c2df Mon Sep 17 00:00:00 2001 From: Kaz Kojima Date: Wed, 23 Aug 2000 04:39:56 +0900 Subject: [PATCH] sh.md (cmpeqdi_t splitter): Fix a reverse testing. * config/sh/sh.md (cmpeqdi_t splitter): Fix a reverse testing. * config/sh/sh.c (prepare_scc_operands): Apply force_reg to sh_compare_op1 when the mode is DImode and sh_compare_op1 isn't const0_rtx. From-SVN: r35889 --- gcc/ChangeLog | 8 ++++++++ gcc/config/sh/sh.c | 1 + gcc/config/sh/sh.md | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5f56c85783e..236b38f1454 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +Tue Aug 22 20:34:52 2000 Kaz Kojima + + * config/sh/sh.md (cmpeqdi_t splitter): Fix a reverse testing. + + * config/sh/sh.c (prepare_scc_operands): Apply force_reg to + sh_compare_op1 when the mode is DImode and sh_compare_op1 isn't + const0_rtx. + 2000-08-22 Nick Clifton * config/arm/lib1funcs.asm (__umodsi3): Before performing any diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index 3eeb183f840..9e2ced69ed0 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -524,6 +524,7 @@ prepare_scc_operands (code) if ((code != EQ && code != NE && (sh_compare_op1 != const0_rtx || code == GTU || code == GEU || code == LTU || code == LEU)) + || (mode == DImode && sh_compare_op1 != const0_rtx) || (TARGET_SH3E && GET_MODE_CLASS (mode) == MODE_FLOAT)) sh_compare_op1 = force_reg (mode, sh_compare_op1); diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index 87021144d32..051acb8e1a7 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -636,7 +636,7 @@ (match_operand:DI 1 "arith_reg_or_0_operand" "N,r")))] "reload_completed" [(set (reg:SI 18) (eq:SI (match_dup 2) (match_dup 3))) - (set (pc) (if_then_else (ne (reg:SI 18) (const_int 0)) + (set (pc) (if_then_else (eq (reg:SI 18) (const_int 0)) (label_ref (match_dup 6)) (pc))) (set (reg:SI 18) (eq:SI (match_dup 4) (match_dup 5))) -- 2.30.2