summaryrefslogtreecommitdiff
path: root/gcc/genconfig.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-07 05:49:18 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-07 05:49:18 +0000
commit7014838cdd847f5d22f8b4bff0285ad622b707b5 (patch)
treef1a67b6ea75a7f0da3f06e0a1c60b213f4403168 /gcc/genconfig.c
parent713829e97b2cabe9369424002f6efb23a7c86aba (diff)
downloadgcc-7014838cdd847f5d22f8b4bff0285ad622b707b5.tar.gz
Merge in gcc2-ss-010999
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29150 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genconfig.c')
-rw-r--r--gcc/genconfig.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/gcc/genconfig.c b/gcc/genconfig.c
index 4001774eba3..a40b6b3f05a 100644
--- a/gcc/genconfig.c
+++ b/gcc/genconfig.c
@@ -42,6 +42,7 @@ static int max_clobbers_per_insn;
static int register_constraint_flag;
static int have_cc0_flag;
static int have_cmove_flag;
+static int have_cond_arith_flag;
static int have_lo_sum_flag;
static int have_peephole_flag;
static int have_peephole2_flag;
@@ -135,12 +136,21 @@ walk_insn_part (part, recog_p, non_pc_set_src)
two arms of the IF_THEN_ELSE are both MATCH_OPERAND. Otherwise,
we have some specific IF_THEN_ELSE construct (like the doz
instruction on the RS/6000) that can't be used in the general
- context we want it for. */
+ context we want it for. If the first operand is an arithmetic
+ operation and the second is a MATCH_OPERNAND, show we have
+ conditional arithmetic. */
if (recog_p && non_pc_set_src
&& GET_CODE (XEXP (part, 1)) == MATCH_OPERAND
&& GET_CODE (XEXP (part, 2)) == MATCH_OPERAND)
have_cmove_flag = 1;
+ else if (recog_p && non_pc_set_src
+ && (GET_RTX_CLASS (GET_CODE (XEXP (part, 1))) == '1'
+ || GET_RTX_CLASS (GET_CODE (XEXP (part, 1))) == '2'
+ || GET_RTX_CLASS (GET_CODE (XEXP (part, 1))) == 'c')
+ && GET_CODE (XEXP (XEXP (part, 1), 0)) == MATCH_OPERAND
+ && GET_CODE (XEXP (part, 2)) == MATCH_OPERAND)
+ have_cond_arith_flag = 1;
break;
case REG: case CONST_INT: case SYMBOL_REF:
@@ -345,6 +355,9 @@ from the machine description file `md'. */\n\n");
if (have_cmove_flag)
printf ("#define HAVE_conditional_move\n");
+ if (have_cond_arith_flag)
+ printf ("#define HAVE_conditional_arithmetic\n");
+
if (have_lo_sum_flag)
printf ("#define HAVE_lo_sum\n");