Commit ac17cd8f by Zack Weinberg Committed by Zack Weinberg

m32r.h: Don't define SELECT_CC_MODE.

	* config/m32r/m32r.h: Don't define SELECT_CC_MODE.
	* config/m32r/m32r-protos.h: Don't prototype m32r_select_cc_mode.
	* config/m32r/m32r.c: Don't define m32r_select_cc_mode.
	(gen_compare): Use CCmode unconditionally.

From-SVN: r54473
parent 7b668f9e
2002-06-10 Zack Weinberg <zack@codesourcery.com>
* config/m32r/m32r.h: Don't define SELECT_CC_MODE.
* config/m32r/m32r-protos.h: Don't prototype m32r_select_cc_mode.
* config/m32r/m32r.c: Don't define m32r_select_cc_mode.
(gen_compare): Use CCmode unconditionally.
2002-06-10 Jakub Jelinek <jakub@redhat.com> 2002-06-10 Jakub Jelinek <jakub@redhat.com>
PR optimization/6759 PR optimization/6759
......
...@@ -44,7 +44,6 @@ extern int function_arg_partial_nregs PARAMS ((CUMULATIVE_ARGS *, Mmode, tree ...@@ -44,7 +44,6 @@ extern int function_arg_partial_nregs PARAMS ((CUMULATIVE_ARGS *, Mmode, tree
#ifdef RTX_CODE #ifdef RTX_CODE
extern int easy_di_const PARAMS ((rtx)); extern int easy_di_const PARAMS ((rtx));
extern int easy_df_const PARAMS ((rtx)); extern int easy_df_const PARAMS ((rtx));
extern int m32r_select_cc_mode PARAMS ((int, rtx, rtx));
extern rtx gen_compare PARAMS ((enum rtx_code, rtx, rtx, int)); extern rtx gen_compare PARAMS ((enum rtx_code, rtx, rtx, int));
extern rtx gen_split_move_double PARAMS ((rtx *)); extern rtx gen_split_move_double PARAMS ((rtx *));
extern int m32r_address_code PARAMS ((rtx)); extern int m32r_address_code PARAMS ((rtx));
......
...@@ -1061,18 +1061,6 @@ large_insn_p (op, mode) ...@@ -1061,18 +1061,6 @@ large_insn_p (op, mode)
/* Comparisons. */ /* Comparisons. */
/* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE,
return the mode to be used for the comparison. */
int
m32r_select_cc_mode (op, x, y)
int op ATTRIBUTE_UNUSED;
rtx x ATTRIBUTE_UNUSED;
rtx y ATTRIBUTE_UNUSED;
{
return (int) CCmode;
}
/* X and Y are two things to compare using CODE. Emit the compare insn and /* X and Y are two things to compare using CODE. Emit the compare insn and
return the rtx for compare [arg0 of the if_then_else]. return the rtx for compare [arg0 of the if_then_else].
If need_compare is true then the comparison insn must be generated, rather If need_compare is true then the comparison insn must be generated, rather
...@@ -1084,9 +1072,8 @@ gen_compare (code, x, y, need_compare) ...@@ -1084,9 +1072,8 @@ gen_compare (code, x, y, need_compare)
rtx x, y; rtx x, y;
int need_compare; int need_compare;
{ {
enum machine_mode mode = SELECT_CC_MODE (code, x, y);
enum rtx_code compare_code, branch_code; enum rtx_code compare_code, branch_code;
rtx cc_reg = gen_rtx_REG (mode, CARRY_REGNUM); rtx cc_reg = gen_rtx_REG (CCmode, CARRY_REGNUM);
int must_swap = 0; int must_swap = 0;
switch (code) switch (code)
...@@ -1132,7 +1119,7 @@ gen_compare (code, x, y, need_compare) ...@@ -1132,7 +1119,7 @@ gen_compare (code, x, y, need_compare)
{ {
emit_insn (gen_cmp_eqsi_insn (x, y)); emit_insn (gen_cmp_eqsi_insn (x, y));
return gen_rtx (code, mode, cc_reg, const0_rtx); return gen_rtx (code, CCmode, cc_reg, const0_rtx);
} }
break; break;
...@@ -1172,7 +1159,7 @@ gen_compare (code, x, y, need_compare) ...@@ -1172,7 +1159,7 @@ gen_compare (code, x, y, need_compare)
abort (); abort ();
} }
return gen_rtx (code, mode, cc_reg, const0_rtx); return gen_rtx (code, CCmode, cc_reg, const0_rtx);
} }
break; break;
...@@ -1212,7 +1199,7 @@ gen_compare (code, x, y, need_compare) ...@@ -1212,7 +1199,7 @@ gen_compare (code, x, y, need_compare)
abort(); abort();
} }
return gen_rtx (code, mode, cc_reg, const0_rtx); return gen_rtx (code, CCmode, cc_reg, const0_rtx);
} }
break; break;
...@@ -1225,12 +1212,12 @@ gen_compare (code, x, y, need_compare) ...@@ -1225,12 +1212,12 @@ gen_compare (code, x, y, need_compare)
/* reg/reg equal comparison */ /* reg/reg equal comparison */
if (compare_code == EQ if (compare_code == EQ
&& register_operand (y, SImode)) && register_operand (y, SImode))
return gen_rtx (code, mode, x, y); return gen_rtx (code, CCmode, x, y);
/* reg/zero signed comparison */ /* reg/zero signed comparison */
if ((compare_code == EQ || compare_code == LT) if ((compare_code == EQ || compare_code == LT)
&& y == const0_rtx) && y == const0_rtx)
return gen_rtx (code, mode, x, y); return gen_rtx (code, CCmode, x, y);
/* reg/smallconst equal comparison */ /* reg/smallconst equal comparison */
if (compare_code == EQ if (compare_code == EQ
...@@ -1239,7 +1226,7 @@ gen_compare (code, x, y, need_compare) ...@@ -1239,7 +1226,7 @@ gen_compare (code, x, y, need_compare)
{ {
rtx tmp = gen_reg_rtx (SImode); rtx tmp = gen_reg_rtx (SImode);
emit_insn (gen_cmp_ne_small_const_insn (tmp, x, y)); emit_insn (gen_cmp_ne_small_const_insn (tmp, x, y));
return gen_rtx (code, mode, tmp, const0_rtx); return gen_rtx (code, CCmode, tmp, const0_rtx);
} }
/* reg/const equal comparison */ /* reg/const equal comparison */
...@@ -1247,7 +1234,7 @@ gen_compare (code, x, y, need_compare) ...@@ -1247,7 +1234,7 @@ gen_compare (code, x, y, need_compare)
&& CONSTANT_P (y)) && CONSTANT_P (y))
{ {
rtx tmp = force_reg (GET_MODE (x), y); rtx tmp = force_reg (GET_MODE (x), y);
return gen_rtx (code, mode, x, tmp); return gen_rtx (code, CCmode, x, tmp);
} }
} }
...@@ -1283,7 +1270,7 @@ gen_compare (code, x, y, need_compare) ...@@ -1283,7 +1270,7 @@ gen_compare (code, x, y, need_compare)
abort (); abort ();
} }
return gen_rtx (branch_code, VOIDmode, cc_reg, CONST0_RTX (mode)); return gen_rtx (branch_code, VOIDmode, cc_reg, CONST0_RTX (CCmode));
} }
/* Split a 2 word move (DI or DF) into component parts. */ /* Split a 2 word move (DI or DF) into component parts. */
......
...@@ -1421,11 +1421,6 @@ do { \ ...@@ -1421,11 +1421,6 @@ do { \
/* Condition code usage. */ /* Condition code usage. */
/* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE,
return the mode to be used for the comparison. */
#define SELECT_CC_MODE(OP, X, Y) \
((enum machine_mode)m32r_select_cc_mode ((int)OP, X, Y))
/* Return non-zero if SELECT_CC_MODE will never return MODE for a /* Return non-zero if SELECT_CC_MODE will never return MODE for a
floating point inequality comparison. */ floating point inequality comparison. */
#define REVERSIBLE_CC_MODE(MODE) 1 /*???*/ #define REVERSIBLE_CC_MODE(MODE) 1 /*???*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment