This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Updated patch to overhaul RTX classes


Here is the updated version of the patch to reorder the rtx
classes.  The speedup in bootstrapping the compiler without
the target libraries is 3.5%, but the actual speedup of the
compiler (measured by bootstrapping the toplevel to run the
configure scripts, cleaning, rebuilding libiberty, stage1
and stage2, and then timing another "make bootstrap") is
between 4.7 and 5.6%. That's good news. :-)

The only change WRT the original patch is the typo discovered
by Kevin Chase, and adding 2004 to the copyright years in
ra-debug.c and unroll.c.  The additional places I've
modified are:
- function.c (introduced a GET_RTX_CLASS occurrence
  by Kenner around 2004-02-13)
- rtlanal.c (rewritten commutative_operand_precedence by
  Geoff Keating around 2004-02-16).
- loop-iv.c was introduced by Zdenek around 2004-02-17.

I've checked using cvs diff that no other GET_RTX_CLASS calls
were modified between 2004-02-06 and now.

This is the last patch in my queue.

Bootstrapped/regtested on i686-pc-linux-gnu and sh-elf.
Also checked that no change occurs in assembly output for
combine.i and sed 4.0d's regex matcher.  Ok for mainline?

Paolo

2004-03-01  Paolo Bonzini  <bonzini@gnu.org>

	* alias.c (rtx_equal_for_memref_p): Use predicates
	to test rtx classes and new rtx class codes, possibly
	splitting conditionals that tested against '<' and 'o'.
	* caller-save.c (save_call_clobbered_regs): Likewise.
	* combine.c (contains_muldiv, find_split_point, subst,
	combine_simplify_rtx, simplify_if_then_else,
	simplify_set, simplify_logical, expand_compound_operation,
	make_compound_operation, if_then_else_cond, known_cond,
	apply_distributive_law, cached_nonzero_bits,
	cached_num_sign_bit_copies, simplify_shift_const,
	gen_binary, simplify_comparison, update_table_tick,
	record_value_for_reg, get_lsat_value_validate): Likewise.
	* cse.c (mention_regs, find_best_addr, find_comparison_args,
	fold_rtx, cse_insn, invalidate_memory, cse_basic_block):
	Likewise.
	* emit-rtl.c (copy_insn_1): Likewise.
	* expr.c (force_operand): Likewise.
	* final.c (final_scan_insn, get_mem_expr_from_op): Likewise.
	* flow.c (notice_stack_pointer_modification_1,
	invalidate_mems_from_autoinc, ior_reg_cond, not_reg_cond,
	and_reg_cond, elim_reg_cond): Likewise.
	* function.c (update_epilogue_consts): Likewise.
	* genattrtab.c (attr_rtx_1): Likewise.
	* genopinit.c (gen_insn): Likewise.
	* integrate.c (subst_constants): Likewise.
	* jump.c (reversed_comparison_code_parts,
	reversed_comparison_code, delete_related_insns,
	rtx_renumbered_equal_p): Likewise.
	* local-alloc.c (block_alloc): Likewise.
	* loop.c (rtx_equal_for_prefetch_p, maybe_eliminate_biv,
	canonicalize_condition): Likewise.
	* loop-iv.c (simplify_using_conditions, iv_number_of_iterations):
	Likewise.
	* optabs.c (add_equal_node, expand_binop): Likewise.
	* predict.c (estimate_probability): Likewise.
	* ra-debug.c (ra_print_rtx_2op, ra_print_rtx): Likewise.
	* recog.c (validate_replace_rtx_1, comparison_operator,
	offsettable_address_p, constrain_operands): Likewise.
	* reg-stack.c (swap_rtx_condition_1, subst_stack_regs_pat):
	Likewise.
	* regclass.c (scan_one_insn): Likewise.
	* regmove.c (stable_and_no_regs_but_for_p): Likewise.
	* regrename.c (kill_autoinc_value): Likewise.
	* reload.c (find_reusable_reload, find_reloads,
	reg_overlap_mentioned_for_reload_p): Likewise.
	* reload1.c (gen_reload, delete_address_reloads_1): Likewise.
	* rtl.c (copy_rtx): Likewise.
	* rtl.h (CONSTANT_P, INSN_P): Likewise.
	* rtlanal.c (commutative_operand_precedence): Likewise.
	* sched-deps.c (conditions_mutex_p): Likewise.
	* sched-rgn.c (is_cfg_nonregular): Likewise.
	* simplify-rtx.c (simplify_gen_binary,
	simplify_gen_relational, simplify_replace_rtx,
	simplify_unary_operation, simplify_binary_operation,
	simplify_ternary_operation, simplify_rtx): Likewise.
	* unroll.c (reg_dead_after_loop): Likewise.
	* config/alpha/alpha.c (alpha_swapped_comparison_operator,
	print_operand): Likewise.
	* config/arc/arc.c (proper_comparison_operator): Likewise.
	* config/arm/arm.c (arm_arm_address_cost, arm_select_cc_mode):
	Likewise.
	* config/avr/avr.c (_reg_unused_after): Likewise.
	* config/frv/frv.c (frv_ifcvt_modify_tests,
	frv_ifcvt_modify_insn, frv_pack_insn): Likewise.
	* config/i386/i386.c (ix86_comparison_operator,
	ix86_carry_flag_operator, fcmov_comparison_operator,
	arith_or_logical_operator, print_operand,
	ix86_expand_binary_operator, ix86_binary_operator_ok):
	Likewise.
	* config/i386/i386.md: Likewise.
	* config/ia64/ia64.c (not_postinc_memory_operand,
	ia64_print_operand, update_set_flags, errata_emit_nops):
	Likewise.
	* config/ia64/ia64.h (PREFERRED_RELOAD_CLASS,
	CONSTRAINT_OK_FOR_S): Likewise.
	* config/ip2k/ip2k.c (mdr_resequence_xy_yx,
	mdr_try_move_dp_reload, ip2k_check_can_adjust_stack_ref,
	ip2k_xexp_not_uses_reg_for_mem, ip2k_xexp_not_uses_reg_p,
	ip2k_composite_xexp_not_uses_reg_p, ip2k_unary_operator):
	Likewise.
	* config/iq2000/iq2000.c (cmp_op, symbolic_expression_p,
	eqne_comparison_operator, signed_comparison_operator):
	Likewise.
	* config/mips/mips.c (cmp_op, symbolic_expression_p):
	Likewise.
	* config/mmix/mmix (mmix_foldable_comparison_operator,
	mmix_comparison_operator): Likewise.
	* config/pa/pa.c (hppa_legitimize_address): Likewise.
	* config/rs6000/rs6000.c (stmw_operation,
	branch_comparison_operator, trap_comparison_operator,
	ccr_bit): Likewise.
	* config/rs6000/rs6000.h (SELECT_CC_MODE): Likewise.
	* config/s390/s390.c (s390_alc_comparison,
	s390_slb_comparison): Likewise.
	* config/sh/sh.c (gen_block_redirect, reg_unused_after):
	Likewise.
	* config/sparc/sparc.c (eq_or_neq, normal_comp_operator,
	noov_compare_op, noov_compare64_op, v9_regcmp_op,
	emit_hard_tfmode_operation, reg_unused_after)
	* doc/md.texi, doc/rtl.texi: Likewise.

	* ra-debug.c: Add 2004 to list of copyright years.
	* unroll.c: Likewise.

	* combine.c (simplify_logical): Remove dummy test,
	(apply_distributive_law): Fix typo in comment.
	GET_CODE (x) == AND so x is a commutative binary op.
	* jump.c (delete_related_insns): simplify loop
	condition, move testing of RTX codes inside the loop.
	(rtx_renumbered_equal_p): do not use RTX_CODE.
	* rtl.c (rtx_class): Declare as enum rtx_class.
	* rtl.def (EQ, NE, UNEQ, LTGT, UNORDERED, ORDERED):
	Move to RTX_COMM_COMPARE class.
	(HIGH, SYMBOL_REF, LABEL_REF, CONST, CONST_INT, CONST_DOUBLE):
	Move to RTX_CONST_OBJ class.
	* rtl.h (enum rtx_class): New declaration,
	(RTX_OBJ_MASK, RTX_OBJ_RESULT, RTX_COMPARE_MASK,
	RTX_COMPARE_RESULT, RTX_ARITHMETIC_MASK, RTX_ARITHMETIC_RESULT,
	RTX_BINARY_MASK, RTX_BINARY_RESULT, RTX_COMMUTATIVE_MASK,
	RTX_COMMUTATIVE_RESULT, RTX_NON_COMMUTATIVE_RESULT,
	RTX_EXPR_FIRST, RTX_EXPR_LAST, UNARY_P, BINARY_P,
	ARITHMETIC_P, COMMUTATIVE_ARITHMETIC_P, COMPARISON_P,
	SWAPPABLE_OPERANDS_P, NON_COMMUTATIVE_P, COMMUTATIVE_P,
	OBJECT_P): New macros.
	* config/sparc/sparc.c (noov_compare_op): Remove register
	from parameter.



Index: gcc/alias.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/alias.c,v
retrieving revision 1.215
diff -u -r1.215 alias.c
--- gcc/alias.c	21 Feb 2004 00:39:05 -0000	1.215
+++ gcc/alias.c	1 Mar 2004 09:19:58 -0000
@@ -1173,7 +1173,7 @@
 		&& rtx_equal_for_memref_p (XEXP (x, 1), XEXP (y, 0))));
   /* For commutative operations, the RTX match if the operand match in any
      order.  Also handle the simple binary and unary cases without a loop.  */
-  if (code == EQ || code == NE || GET_RTX_CLASS (code) == 'c')
+  if (COMMUTATIVE_P (x))
     {
       rtx xop0 = canon_rtx (XEXP (x, 0));
       rtx yop0 = canon_rtx (XEXP (y, 0));
@@ -1184,14 +1184,14 @@
 	      || (rtx_equal_for_memref_p (xop0, yop1)
 		  && rtx_equal_for_memref_p (canon_rtx (XEXP (x, 1)), yop0)));
     }
-  else if (GET_RTX_CLASS (code) == '<' || GET_RTX_CLASS (code) == '2')
+  else if (NON_COMMUTATIVE_P (x))
     {
       return (rtx_equal_for_memref_p (canon_rtx (XEXP (x, 0)),
 				      canon_rtx (XEXP (y, 0)))
 	      && rtx_equal_for_memref_p (canon_rtx (XEXP (x, 1)),
 					 canon_rtx (XEXP (y, 1))));
     }
-  else if (GET_RTX_CLASS (code) == '1')
+  else if (UNARY_P (x))
     return rtx_equal_for_memref_p (canon_rtx (XEXP (x, 0)),
 				   canon_rtx (XEXP (y, 0)));
 
@@ -1261,7 +1261,7 @@
   code = GET_CODE (x);
   if (code == SYMBOL_REF || code == LABEL_REF)
     return x;
-  if (GET_RTX_CLASS (code) == 'o')
+  if (OBJECT_P (x))
     return 0;
 
   fmt = GET_RTX_FORMAT (code);
Index: gcc/caller-save.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/caller-save.c,v
retrieving revision 1.63
diff -u -r1.63 caller-save.c
--- gcc/caller-save.c	18 Feb 2004 06:49:58 -0000	1.63
+++ gcc/caller-save.c	1 Mar 2004 09:19:58 -0000
@@ -384,7 +384,7 @@
       if (chain->is_caller_save_insn)
 	abort ();
 
-      if (GET_RTX_CLASS (code) == 'i')
+      if (INSN_P (insn))
 	{
 	  /* If some registers have been saved, see if INSN references
 	     any of them.  We must restore them before the insn if so.  */
Index: gcc/combine.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/combine.c,v
retrieving revision 1.415
diff -u -r1.415 combine.c
--- gcc/combine.c	27 Feb 2004 23:47:59 -0000	1.415
+++ gcc/combine.c	1 Mar 2004 09:20:01 -0000
@@ -1340,18 +1340,14 @@
       return ! (GET_CODE (XEXP (x, 1)) == CONST_INT
 		&& exact_log2 (INTVAL (XEXP (x, 1))) >= 0);
     default:
-      switch (GET_RTX_CLASS (GET_CODE (x)))
-	{
-	case 'c':  case '<':  case '2':
-	  return contains_muldiv (XEXP (x, 0))
+      if (BINARY_P (x))
+	return contains_muldiv (XEXP (x, 0))
 	    || contains_muldiv (XEXP (x, 1));
 
-	case '1':
-	  return contains_muldiv (XEXP (x, 0));
+      if (UNARY_P (x))
+	return contains_muldiv (XEXP (x, 0));
 
-	default:
-	  return 0;
-	}
+      return 0;
     }
 }
 
@@ -2961,10 +2957,9 @@
 	     This will occur on machines that just support REG + CONST
 	     and have a constant moved through some previous computation.  */
 
-	  else if (GET_RTX_CLASS (GET_CODE (XEXP (XEXP (x, 0), 0))) != 'o'
+	  else if (!OBJECT_P (XEXP (XEXP (x, 0), 0))
 		   && ! (GET_CODE (XEXP (XEXP (x, 0), 0)) == SUBREG
-			 && (GET_RTX_CLASS (GET_CODE (SUBREG_REG (XEXP (XEXP (x, 0), 0))))
-			     == 'o')))
+			 && OBJECT_P (SUBREG_REG (XEXP (XEXP (x, 0), 0)))))
 	    return &XEXP (XEXP (x, 0), 0);
 	}
       break;
@@ -2979,9 +2974,9 @@
       if (SET_DEST (x) == cc0_rtx
 	  && GET_CODE (SET_SRC (x)) != COMPARE
 	  && GET_CODE (SET_SRC (x)) != ZERO_EXTRACT
-	  && GET_RTX_CLASS (GET_CODE (SET_SRC (x))) != 'o'
+	  && !OBJECT_P (SET_SRC (x))
 	  && ! (GET_CODE (SET_SRC (x)) == SUBREG
-		&& GET_RTX_CLASS (GET_CODE (SUBREG_REG (SET_SRC (x)))) == 'o'))
+		&& OBJECT_P (SUBREG_REG (SET_SRC (x)))))
 	return &SET_SRC (x);
 #endif
 
@@ -3172,14 +3167,11 @@
       /* See if this is a simple operation with a constant as the second
 	 operand.  It might be that this constant is out of range and hence
 	 could be used as a split point.  */
-      if ((GET_RTX_CLASS (GET_CODE (SET_SRC (x))) == '2'
-	   || GET_RTX_CLASS (GET_CODE (SET_SRC (x))) == 'c'
-	   || GET_RTX_CLASS (GET_CODE (SET_SRC (x))) == '<')
+      if (BINARY_P (SET_SRC (x))
 	  && CONSTANT_P (XEXP (SET_SRC (x), 1))
-	  && (GET_RTX_CLASS (GET_CODE (XEXP (SET_SRC (x), 0))) == 'o'
+	  && (OBJECT_P (XEXP (SET_SRC (x), 0))
 	      || (GET_CODE (XEXP (SET_SRC (x), 0)) == SUBREG
-		  && (GET_RTX_CLASS (GET_CODE (SUBREG_REG (XEXP (SET_SRC (x), 0))))
-		      == 'o'))))
+		  && OBJECT_P (SUBREG_REG (XEXP (SET_SRC (x), 0))))))
 	return &XEXP (SET_SRC (x), 1);
 
       /* Finally, see if this is a simple operation with its first operand
@@ -3187,10 +3179,7 @@
 	 register, so return it as a split point.  We can always do this
 	 because if the first operand were another operation, we would have
 	 already found it as a split point.  */
-      if ((GET_RTX_CLASS (GET_CODE (SET_SRC (x))) == '2'
-	   || GET_RTX_CLASS (GET_CODE (SET_SRC (x))) == 'c'
-	   || GET_RTX_CLASS (GET_CODE (SET_SRC (x))) == '<'
-	   || GET_RTX_CLASS (GET_CODE (SET_SRC (x))) == '1')
+      if ((BINARY_P (SET_SRC (x)) || UNARY_P (SET_SRC (x)))
 	  && ! register_operand (XEXP (SET_SRC (x), 0), VOIDmode))
 	return &XEXP (SET_SRC (x), 0);
 
@@ -3230,20 +3219,21 @@
   /* Otherwise, select our actions depending on our rtx class.  */
   switch (GET_RTX_CLASS (code))
     {
-    case 'b':			/* This is ZERO_EXTRACT and SIGN_EXTRACT.  */
-    case '3':
+    case RTX_BITFIELD_OPS:		/* This is ZERO_EXTRACT and SIGN_EXTRACT.  */
+    case RTX_TERNARY:
       split = find_split_point (&XEXP (x, 2), insn);
       if (split)
 	return split;
       /* ... fall through ...  */
-    case '2':
-    case 'c':
-    case '<':
+    case RTX_BIN_ARITH:
+    case RTX_COMM_ARITH:
+    case RTX_COMPARE:
+    case RTX_COMM_COMPARE:
       split = find_split_point (&XEXP (x, 1), insn);
       if (split)
 	return split;
       /* ... fall through ...  */
-    case '1':
+    case RTX_UNARY:
       /* Some machines have (and (shift ...) ...) insns.  If X is not
 	 an AND, but XEXP (X, 0) is, use it as our split point.  */
       if (GET_CODE (x) != AND && GET_CODE (XEXP (x, 0)) == AND)
@@ -3253,10 +3243,11 @@
       if (split)
 	return split;
       return loc;
-    }
 
-  /* Otherwise, we don't have a split point.  */
-  return 0;
+    default:
+      /* Otherwise, we don't have a split point.  */
+      return 0;
+    }
 }
 
 /* Throughout X, replace FROM with TO, and return the result.
@@ -3315,7 +3306,7 @@
 
   /* If this is an object, we are done unless it is a MEM or LO_SUM, both
      of which may contain things that can be combined.  */
-  if (code != MEM && code != LO_SUM && GET_RTX_CLASS (code) == 'o')
+  if (code != MEM && code != LO_SUM && OBJECT_P (x))
     return x;
 
   /* It is possible to have a subexpression appear twice in the insn.
@@ -3562,7 +3553,7 @@
 
   /* If this is a commutative operation, put a constant last and a complex
      expression first.  We don't need to do this for comparisons here.  */
-  if (GET_RTX_CLASS (code) == 'c'
+  if (COMMUTATIVE_ARITH_P (x)
       && swap_commutative_operands_p (XEXP (x, 0), XEXP (x, 1)))
     {
       temp = XEXP (x, 0);
@@ -3618,21 +3609,17 @@
 
      Don't do anything if all operands are very simple.  */
 
-  if (((GET_RTX_CLASS (code) == '2' || GET_RTX_CLASS (code) == 'c'
-	|| GET_RTX_CLASS (code) == '<')
-       && ((GET_RTX_CLASS (GET_CODE (XEXP (x, 0))) != 'o'
+  if ((BINARY_P (x)
+       && ((!OBJECT_P (XEXP (x, 0))
 	    && ! (GET_CODE (XEXP (x, 0)) == SUBREG
-		  && (GET_RTX_CLASS (GET_CODE (SUBREG_REG (XEXP (x, 0))))
-		      == 'o')))
-	   || (GET_RTX_CLASS (GET_CODE (XEXP (x, 1))) != 'o'
+		  && OBJECT_P (SUBREG_REG (XEXP (x, 0)))))
+	   || (!OBJECT_P (XEXP (x, 1))
 	       && ! (GET_CODE (XEXP (x, 1)) == SUBREG
-		     && (GET_RTX_CLASS (GET_CODE (SUBREG_REG (XEXP (x, 1))))
-			 == 'o')))))
-      || (GET_RTX_CLASS (code) == '1'
-	  && ((GET_RTX_CLASS (GET_CODE (XEXP (x, 0))) != 'o'
+		     && OBJECT_P (SUBREG_REG (XEXP (x, 1)))))))
+      || (UNARY_P (x)
+          && (!OBJECT_P (XEXP (x, 0))
 	       && ! (GET_CODE (XEXP (x, 0)) == SUBREG
-		     && (GET_RTX_CLASS (GET_CODE (SUBREG_REG (XEXP (x, 0))))
-			 == 'o'))))))
+		     && OBJECT_P (SUBREG_REG (XEXP (x, 0)))))))
     {
       rtx cond, true_rtx, false_rtx;
 
@@ -3640,14 +3627,13 @@
       if (cond != 0
 	  /* If everything is a comparison, what we have is highly unlikely
 	     to be simpler, so don't use it.  */
-	  && ! (GET_RTX_CLASS (code) == '<'
-		&& (GET_RTX_CLASS (GET_CODE (true_rtx)) == '<'
-		    || GET_RTX_CLASS (GET_CODE (false_rtx)) == '<')))
+	  && ! (COMPARISON_P (x)
+		&& (COMPARISON_P (true_rtx) || COMPARISON_P (false_rtx))))
 	{
 	  rtx cop1 = const0_rtx;
 	  enum rtx_code cond_code = simplify_comparison (NE, &cond, &cop1);
 
-	  if (cond_code == NE && GET_RTX_CLASS (GET_CODE (cond)) == '<')
+	  if (cond_code == NE && COMPARISON_P (cond))
 	    return x;
 
 	  /* Simplify the alternative arms; this may collapse the true and
@@ -3713,12 +3699,13 @@
   temp = 0;
   switch (GET_RTX_CLASS (code))
     {
-    case '1':
+    case RTX_UNARY:
       if (op0_mode == VOIDmode)
 	op0_mode = GET_MODE (XEXP (x, 0));
       temp = simplify_unary_operation (code, mode, XEXP (x, 0), op0_mode);
       break;
-    case '<':
+    case RTX_COMPARE:
+    case RTX_COMM_COMPARE:
       {
 	enum machine_mode cmp_mode = GET_MODE (XEXP (x, 0));
 	if (cmp_mode == VOIDmode)
@@ -3741,15 +3728,17 @@
 	}
 #endif
       break;
-    case 'c':
-    case '2':
+    case RTX_COMM_ARITH:
+    case RTX_BIN_ARITH:
       temp = simplify_binary_operation (code, mode, XEXP (x, 0), XEXP (x, 1));
       break;
-    case 'b':
-    case '3':
+    case RTX_BITFIELD_OPS:
+    case RTX_TERNARY:
       temp = simplify_ternary_operation (code, mode, op0_mode, XEXP (x, 0),
 					 XEXP (x, 1), XEXP (x, 2));
       break;
+    default:
+      break;
     }
 
   if (temp)
@@ -3787,7 +3776,7 @@
 
 	  /* Make sure we pass the constant operand if any as the second
 	     one if this is a commutative operation.  */
-	  if (CONSTANT_P (inner_op0) && GET_RTX_CLASS (code) == 'c')
+	  if (CONSTANT_P (inner_op0) && COMMUTATIVE_ARITH_P (x))
 	    {
 	      rtx tem = inner_op0;
 	      inner_op0 = inner_op1;
@@ -3800,7 +3789,7 @@
 
 	  /* For commutative operations, try the other pair if that one
 	     didn't simplify.  */
-	  if (inner == 0 && GET_RTX_CLASS (code) == 'c')
+	  if (inner == 0 && COMMUTATIVE_ARITH_P (x))
 	    {
 	      other = XEXP (XEXP (x, 0), 1);
 	      inner = simplify_binary_operation (code, mode,
@@ -4008,7 +3997,7 @@
          but it works even if the comparison is done in a mode larger
          than HOST_BITS_PER_WIDE_INT.  */
       if (GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT
-	  && GET_RTX_CLASS (GET_CODE (XEXP (x, 0))) == '<'
+	  && COMPARISON_P (XEXP (x, 0))
 	  && ((HOST_WIDE_INT) STORE_FLAG_VALUE & ~GET_MODE_MASK (mode)) == 0)
 	return gen_lowpart (mode, XEXP (x, 0));
 
@@ -4018,7 +4007,7 @@
       if (GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT
 	  && ((HOST_WIDE_INT) STORE_FLAG_VALUE & ~GET_MODE_MASK (mode)) == 0
 	  && (temp = get_last_value (XEXP (x, 0)))
-	  && GET_RTX_CLASS (GET_CODE (temp)) == '<')
+	  && COMPARISON_P (temp))
 	return gen_lowpart (mode, XEXP (x, 0));
 
       break;
@@ -4184,7 +4173,7 @@
 	 C is 1 and STORE_FLAG_VALUE is -1 or if C is -1 and STORE_FLAG_VALUE
 	 is 1.  This produces better code than the alternative immediately
 	 below.  */
-      if (GET_RTX_CLASS (GET_CODE (XEXP (x, 0))) == '<'
+      if (COMPARISON_P (XEXP (x, 0))
 	  && ((STORE_FLAG_VALUE == -1 && XEXP (x, 1) == const1_rtx)
 	      || (STORE_FLAG_VALUE == 1 && XEXP (x, 1) == constm1_rtx))
 	  && (reversed = reversed_comparison (XEXP (x, 0), mode,
@@ -4234,7 +4223,7 @@
 	 by reversing the comparison code if valid.  */
       if (STORE_FLAG_VALUE == 1
 	  && XEXP (x, 0) == const1_rtx
-	  && GET_RTX_CLASS (GET_CODE (XEXP (x, 1))) == '<'
+	  && COMPARISON_P (XEXP (x, 1))
 	  && (reversed = reversed_comparison (XEXP (x, 1), mode,
 					      XEXP (XEXP (x, 1), 0),
 					      XEXP (XEXP (x, 1), 1))))
@@ -4627,7 +4616,7 @@
   rtx true_rtx = XEXP (x, 1);
   rtx false_rtx = XEXP (x, 2);
   enum rtx_code true_code = GET_CODE (cond);
-  int comparison_p = GET_RTX_CLASS (true_code) == '<';
+  int comparison_p = COMPARISON_P (cond);
   rtx temp;
   int i;
   enum rtx_code false_code;
@@ -4712,11 +4701,9 @@
 	  || (CONSTANT_P (true_rtx)
 	      && GET_CODE (false_rtx) != CONST_INT && false_rtx != pc_rtx)
 	  || true_rtx == const0_rtx
-	  || (GET_RTX_CLASS (GET_CODE (true_rtx)) == 'o'
-	      && GET_RTX_CLASS (GET_CODE (false_rtx)) != 'o')
-	  || (GET_CODE (true_rtx) == SUBREG
-	      && GET_RTX_CLASS (GET_CODE (SUBREG_REG (true_rtx))) == 'o'
-	      && GET_RTX_CLASS (GET_CODE (false_rtx)) != 'o')
+	  || (OBJECT_P (true_rtx) && !OBJECT_P (false_rtx))
+	  || (GET_CODE (true_rtx) == SUBREG && OBJECT_P (SUBREG_REG (true_rtx))
+	      && !OBJECT_P (false_rtx))
 	  || reg_mentioned_p (true_rtx, false_rtx)
 	  || rtx_equal_p (false_rtx, XEXP (cond, 0))))
     {
@@ -4733,7 +4720,7 @@
 
       /* It is possible that the conditional has been simplified out.  */
       true_code = GET_CODE (cond);
-      comparison_p = GET_RTX_CLASS (true_code) == '<';
+      comparison_p = COMPARISON_P (cond);
     }
 
   /* If the two arms are identical, we don't need the comparison.  */
@@ -4986,7 +4973,7 @@
        || CC0_P (dest))
       && (cc_use = find_single_use (dest, subst_insn, &other_insn)) != 0
       && (undobuf.other_insn == 0 || other_insn == undobuf.other_insn)
-      && GET_RTX_CLASS (GET_CODE (*cc_use)) == '<'
+      && COMPARISON_P (*cc_use)
       && rtx_equal_p (XEXP (*cc_use, 0), dest))
     {
       enum rtx_code old_code = GET_CODE (*cc_use);
@@ -5149,7 +5136,7 @@
      as long as M1 and M2 have the same number of words.  */
 
   if (GET_CODE (src) == SUBREG && subreg_lowpart_p (src)
-      && GET_RTX_CLASS (GET_CODE (SUBREG_REG (src))) != 'o'
+      && !OBJECT_P (SUBREG_REG (src))
       && (((GET_MODE_SIZE (GET_MODE (src)) + (UNITS_PER_WORD - 1))
 	   / UNITS_PER_WORD)
 	  == ((GET_MODE_SIZE (GET_MODE (SUBREG_REG (src)))
@@ -5353,9 +5340,8 @@
 	  if (GET_CODE (x) != AND)
 	    return x;
 
-	  if (GET_RTX_CLASS (GET_CODE (x)) == 'c'
-	      || GET_RTX_CLASS (GET_CODE (x)) == '2')
-	    op0 = XEXP (x, 0), op1 = XEXP (x, 1);
+	  op0 = XEXP (x, 0);
+	  op1 = XEXP (x, 1);
 	}
 
       /* Convert (A | B) & A to A.  */
@@ -5550,7 +5536,7 @@
 	 comparison if STORE_FLAG_VALUE is 1.  */
       if (STORE_FLAG_VALUE == 1
 	  && op1 == const1_rtx
-	  && GET_RTX_CLASS (GET_CODE (op0)) == '<'
+	  && COMPARISON_P (op0)
 	  && (reversed = reversed_comparison (op0, mode, XEXP (op0, 0),
 					      XEXP (op0, 1))))
 	return reversed;
@@ -5572,7 +5558,7 @@
 	  && ((STORE_FLAG_VALUE & GET_MODE_MASK (mode))
 	      == (unsigned HOST_WIDE_INT) 1 << (GET_MODE_BITSIZE (mode) - 1))
 	  && op1 == const_true_rtx
-	  && GET_RTX_CLASS (GET_CODE (op0)) == '<'
+	  && COMPARISON_P (op0)
 	  && (reversed = reversed_comparison (op0, mode, XEXP (op0, 0),
 					      XEXP (op0, 1))))
 	return reversed;
@@ -5736,7 +5722,7 @@
          than HOST_WIDE_INT.  */
       if (GET_CODE (XEXP (x, 0)) == TRUNCATE
 	  && GET_MODE (XEXP (XEXP (x, 0), 0)) == GET_MODE (x)
-	  && GET_RTX_CLASS (GET_CODE (XEXP (XEXP (x, 0), 0))) == '<'
+	  && COMPARISON_P (XEXP (XEXP (x, 0), 0))
 	  && (GET_MODE_BITSIZE (GET_MODE (XEXP (x, 0)))
 	      <= HOST_BITS_PER_WIDE_INT)
 	  && ((HOST_WIDE_INT) STORE_FLAG_VALUE
@@ -5747,7 +5733,7 @@
       if (GET_CODE (XEXP (x, 0)) == SUBREG
 	  && GET_MODE (SUBREG_REG (XEXP (x, 0))) == GET_MODE (x)
 	  && subreg_lowpart_p (XEXP (x, 0))
-	  && GET_RTX_CLASS (GET_CODE (SUBREG_REG (XEXP (x, 0)))) == '<'
+	  && COMPARISON_P (SUBREG_REG (XEXP (x, 0)))
 	  && (GET_MODE_BITSIZE (GET_MODE (XEXP (x, 0)))
 	      <= HOST_BITS_PER_WIDE_INT)
 	  && ((HOST_WIDE_INT) STORE_FLAG_VALUE
@@ -6428,7 +6414,7 @@
      but once inside, go back to our default of SET.  */
 
   next_code = (code == MEM || code == PLUS || code == MINUS ? MEM
-	       : ((code == COMPARE || GET_RTX_CLASS (code) == '<')
+	       : ((code == COMPARE || COMPARISON_P (x))
 		  && XEXP (x, 1) == const0_rtx) ? COMPARE
 	       : in_code == COMPARE ? SET : in_code);
 
@@ -6594,9 +6580,9 @@
 	 also do this for some cases of SIGN_EXTRACT, but it doesn't
 	 seem worth the effort; the case checked for occurs on Alpha.  */
 
-      if (GET_RTX_CLASS (GET_CODE (lhs)) != 'o'
+      if (!OBJECT_P (lhs)
 	  && ! (GET_CODE (lhs) == SUBREG
-		&& (GET_RTX_CLASS (GET_CODE (SUBREG_REG (lhs))) == 'o'))
+		&& (OBJECT_P (SUBREG_REG (lhs))))
 	  && GET_CODE (rhs) == CONST_INT
 	  && INTVAL (rhs) < HOST_BITS_PER_WIDE_INT
 	  && (new = extract_left_shift (lhs, INTVAL (rhs))) != 0)
@@ -7279,7 +7265,7 @@
 
   /* If this is a unary operation whose operand has one of two values, apply
      our opcode to compute those values.  */
-  else if (GET_RTX_CLASS (code) == '1'
+  else if (UNARY_P (x)
 	   && (cond0 = if_then_else_cond (XEXP (x, 0), &true0, &false0)) != 0)
     {
       *ptrue = simplify_gen_unary (code, mode, true0, GET_MODE (XEXP (x, 0)));
@@ -7296,8 +7282,7 @@
   /* If this is a binary operation, see if either side has only one of two
      values.  If either one does or if both do and they are conditional on
      the same value, compute the new true and false values.  */
-  else if (GET_RTX_CLASS (code) == 'c' || GET_RTX_CLASS (code) == '2'
-	   || GET_RTX_CLASS (code) == '<')
+  else if (BINARY_P (x))
     {
       cond0 = if_then_else_cond (XEXP (x, 0), &true0, &false0);
       cond1 = if_then_else_cond (XEXP (x, 1), &true1, &false1);
@@ -7333,8 +7318,8 @@
 	  cond0 = XEXP (XEXP (x, 0), 0);
 	  cond1 = XEXP (XEXP (x, 1), 0);
 
-	  if (GET_RTX_CLASS (GET_CODE (cond0)) == '<'
-	      && GET_RTX_CLASS (GET_CODE (cond1)) == '<'
+	  if (COMPARISON_P (cond0)
+	      && COMPARISON_P (cond1)
 	      && ((GET_CODE (cond0) == combine_reversed_comparison_code (cond1)
 		   && rtx_equal_p (XEXP (cond0, 0), XEXP (cond1, 0))
 		   && rtx_equal_p (XEXP (cond0, 1), XEXP (cond1, 1)))
@@ -7364,8 +7349,8 @@
 	  cond0 = XEXP (XEXP (x, 0), 0);
 	  cond1 = XEXP (XEXP (x, 1), 0);
 
-	  if (GET_RTX_CLASS (GET_CODE (cond0)) == '<'
-	      && GET_RTX_CLASS (GET_CODE (cond1)) == '<'
+	  if (COMPARISON_P (cond0)
+	      && COMPARISON_P (cond1)
 	      && ((GET_CODE (cond0) == combine_reversed_comparison_code (cond1)
 		   && rtx_equal_p (XEXP (cond0, 0), XEXP (cond1, 0))
 		   && rtx_equal_p (XEXP (cond0, 1), XEXP (cond1, 1)))
@@ -7499,14 +7484,14 @@
   /* The only other cases we handle are MIN, MAX, and comparisons if the
      operands are the same as REG and VAL.  */
 
-  else if (GET_RTX_CLASS (code) == '<' || GET_RTX_CLASS (code) == 'c')
+  else if (COMPARISON_P (x) || COMMUTATIVE_ARITH_P (x))
     {
       if (rtx_equal_p (XEXP (x, 0), val))
 	cond = swap_condition (cond), temp = val, val = reg, reg = temp;
 
       if (rtx_equal_p (XEXP (x, 0), reg) && rtx_equal_p (XEXP (x, 1), val))
 	{
-	  if (GET_RTX_CLASS (code) == '<')
+	  if (COMPARISON_P (x))
 	    {
 	      if (comparison_dominates_p (cond, code))
 		return const_true_rtx;
@@ -7798,8 +7783,7 @@
 
   /* If either operand is a primitive we can't do anything, so get out
      fast.  */
-  if (GET_RTX_CLASS (GET_CODE (lhs)) == 'o'
-      || GET_RTX_CLASS (GET_CODE (rhs)) == 'o')
+  if (OBJECT_P (lhs) || OBJECT_P (rhs))
     return x;
 
   lhs = expand_compound_operation (lhs);
@@ -7861,15 +7845,15 @@
 
   /* Set LHS and RHS to the inner operands (A and B in the example
      above) and set OTHER to the common operand (C in the example).
-     These is only one way to do this unless the inner operation is
+     There is only one way to do this unless the inner operation is
      commutative.  */
-  if (GET_RTX_CLASS (inner_code) == 'c'
+  if (COMMUTATIVE_ARITH_P (lhs)
       && rtx_equal_p (XEXP (lhs, 0), XEXP (rhs, 0)))
     other = XEXP (lhs, 0), lhs = XEXP (lhs, 1), rhs = XEXP (rhs, 1);
-  else if (GET_RTX_CLASS (inner_code) == 'c'
+  else if (COMMUTATIVE_ARITH_P (lhs)
 	   && rtx_equal_p (XEXP (lhs, 0), XEXP (rhs, 1)))
     other = XEXP (lhs, 0), lhs = XEXP (lhs, 1), rhs = XEXP (rhs, 0);
-  else if (GET_RTX_CLASS (inner_code) == 'c'
+  else if (COMMUTATIVE_ARITH_P (lhs)
 	   && rtx_equal_p (XEXP (lhs, 1), XEXP (rhs, 0)))
     other = XEXP (lhs, 1), lhs = XEXP (lhs, 0), rhs = XEXP (rhs, 1);
   else if (rtx_equal_p (XEXP (lhs, 1), XEXP (rhs, 1)))
@@ -8038,8 +8022,7 @@
      nonzero_bits1 on X with the subexpressions as KNOWN_X and the
      precomputed value for the subexpression as KNOWN_RET.  */
 
-  if (GET_RTX_CLASS (GET_CODE (x)) == '2'
-      || GET_RTX_CLASS (GET_CODE (x)) == 'c')
+  if (ARITHMETIC_P (x))
     {
       rtx x0 = XEXP (x, 0);
       rtx x1 = XEXP (x, 1);
@@ -8050,14 +8033,12 @@
 			      nonzero_bits_with_known (x0, mode));
 
       /* Check the second level.  */
-      if ((GET_RTX_CLASS (GET_CODE (x0)) == '2'
-	   || GET_RTX_CLASS (GET_CODE (x0)) == 'c')
+      if (ARITHMETIC_P (x0)
 	  && (x1 == XEXP (x0, 0) || x1 == XEXP (x0, 1)))
 	return nonzero_bits1 (x, mode, x1, mode,
 			      nonzero_bits_with_known (x1, mode));
 
-      if ((GET_RTX_CLASS (GET_CODE (x1)) == '2'
-	   || GET_RTX_CLASS (GET_CODE (x1)) == 'c')
+      if (ARITHMETIC_P (x1)
 	  && (x0 == XEXP (x1, 0) || x0 == XEXP (x1, 1)))
 	return nonzero_bits1 (x, mode, x0, mode,
 			 nonzero_bits_with_known (x0, mode));
@@ -8567,8 +8548,7 @@
      num_sign_bit_copies1 on X with the subexpressions as KNOWN_X and
      the precomputed value for the subexpression as KNOWN_RET.  */
 
-  if (GET_RTX_CLASS (GET_CODE (x)) == '2'
-      || GET_RTX_CLASS (GET_CODE (x)) == 'c')
+  if (ARITHMETIC_P (x))
     {
       rtx x0 = XEXP (x, 0);
       rtx x1 = XEXP (x, 1);
@@ -8580,15 +8560,13 @@
 				num_sign_bit_copies_with_known (x0, mode));
 
       /* Check the second level.  */
-      if ((GET_RTX_CLASS (GET_CODE (x0)) == '2'
-	   || GET_RTX_CLASS (GET_CODE (x0)) == 'c')
+      if (ARITHMETIC_P (x0)
 	  && (x1 == XEXP (x0, 0) || x1 == XEXP (x0, 1)))
 	return
 	  num_sign_bit_copies1 (x, mode, x1, mode,
 				num_sign_bit_copies_with_known (x1, mode));
 
-      if ((GET_RTX_CLASS (GET_CODE (x1)) == '2'
-	   || GET_RTX_CLASS (GET_CODE (x1)) == 'c')
+      if (ARITHMETIC_P (x1)
 	  && (x0 == XEXP (x1, 0) || x0 == XEXP (x1, 1)))
 	return
 	  num_sign_bit_copies1 (x, mode, x0, mode,
@@ -9803,7 +9781,7 @@
      If we were passed a value for X, see if we can use any pieces of
      it.  If not, make new rtx.  */
 
-  if (x && GET_RTX_CLASS (GET_CODE (x)) == '2'
+  if (x && GET_RTX_CLASS (GET_CODE (x)) == RTX_BIN_ARITH
       && GET_CODE (XEXP (x, 1)) == CONST_INT
       && (unsigned HOST_WIDE_INT) INTVAL (XEXP (x, 1)) == count)
     const_rtx = XEXP (x, 1);
@@ -9862,7 +9840,7 @@
 	/* This means that we have determined that the result is
 	   equivalent to a constant.  This should be rare.  */
 	x = GEN_INT (outer_const);
-      else if (GET_RTX_CLASS (outer_op) == '1')
+      else if (GET_RTX_CLASS (outer_op) == RTX_UNARY)
 	x = simplify_gen_unary (outer_op, result_mode, x, result_mode);
       else
 	x = gen_binary (outer_op, result_mode, x, GEN_INT (outer_const));
@@ -10071,7 +10049,7 @@
 
   /* If X is a comparison operator, rewrite it in a new mode.  This
      probably won't match, but may allow further simplifications.  */
-  else if (GET_RTX_CLASS (GET_CODE (x)) == '<')
+  else if (COMPARISON_P (x))
     return gen_rtx_fmt_ee (GET_CODE (x), mode, XEXP (x, 0), XEXP (x, 1));
 
   /* If we couldn't simplify X any other way, just enclose it in a
@@ -10112,11 +10090,12 @@
   else if (GET_CODE (op1) == CLOBBER)
     return op1;
   
-  if (GET_RTX_CLASS (code) == 'c'
+  if (GET_RTX_CLASS (code) == RTX_COMM_ARITH
       && swap_commutative_operands_p (op0, op1))
     tem = op0, op0 = op1, op1 = tem;
 
-  if (GET_RTX_CLASS (code) == '<')
+  if (GET_RTX_CLASS (code) == RTX_COMPARE
+      || GET_RTX_CLASS (code) == RTX_COMM_COMPARE)
     {
       enum machine_mode op_mode = GET_MODE (op0);
 
@@ -10140,7 +10119,7 @@
     return result;
 
   /* Put complex operands first and constants second.  */
-  if (GET_RTX_CLASS (code) == 'c'
+  if (GET_RTX_CLASS (code) == RTX_COMM_ARITH
       && swap_commutative_operands_p (op0, op1))
     return gen_rtx_fmt_ee (code, mode, op1, op0);
 
@@ -10340,8 +10319,7 @@
 
       if (GET_MODE_CLASS (mode) != MODE_INT
 	  && ! (mode == VOIDmode
-		&& (GET_CODE (op0) == COMPARE
-		    || GET_RTX_CLASS (GET_CODE (op0)) == '<')))
+		&& (GET_CODE (op0) == COMPARE || COMPARISON_P (op0))))
 	break;
 
       /* Get the constant we are comparing against and turn off all bits
@@ -10916,9 +10894,9 @@
 	      mask = ((INTVAL (XEXP (op0, 1)) & GET_MODE_MASK (mode))
 		      << INTVAL (XEXP (XEXP (op0, 0), 1)));
 	      if ((~STORE_FLAG_VALUE & mask) == 0
-		  && (GET_RTX_CLASS (GET_CODE (XEXP (XEXP (op0, 0), 0))) == '<'
+		  && (COMPARISON_P (XEXP (XEXP (op0, 0), 0))
 		      || ((tem = get_last_value (XEXP (XEXP (op0, 0), 0))) != 0
-			  && GET_RTX_CLASS (GET_CODE (tem)) == '<')))
+			  && COMPARISON_P (tem))))
 		{
 		  op0 = XEXP (XEXP (op0, 0), 0);
 		  continue;
@@ -11398,9 +11376,7 @@
 	/* Check for identical subexpressions.  If x contains
 	   identical subexpression we only have to traverse one of
 	   them.  */
-	if (i == 0
-	    && (GET_RTX_CLASS (code) == '2'
-		|| GET_RTX_CLASS (code) == 'c'))
+	if (i == 0 && ARITHMETIC_P (x))
 	  {
 	    /* Note that at this point x1 has already been
 	       processed.  */
@@ -11415,15 +11391,13 @@
 	    /* If x0 is identical to a subexpression of x1 then while
 	       processing x1, x0 has already been processed.  Thus we
 	       are done with x.  */
-	    if ((GET_RTX_CLASS (GET_CODE (x1)) == '2'
-		 || GET_RTX_CLASS (GET_CODE (x1)) == 'c')
+	    if (ARITHMETIC_P (x1)
 		&& (x0 == XEXP (x1, 0) || x0 == XEXP (x1, 1)))
 	      break;
 
 	    /* If x1 is identical to a subexpression of x0 then we
 	       still have to process the rest of x0.  */
-	    if ((GET_RTX_CLASS (GET_CODE (x0)) == '2'
-		 || GET_RTX_CLASS (GET_CODE (x0)) == 'c')
+	    if (ARITHMETIC_P (x0)
 		&& (x1 == XEXP (x0, 0) || x1 == XEXP (x0, 1)))
 	      {
 		update_table_tick (XEXP (x0, x1 == XEXP (x0, 0) ? 1 : 0));
@@ -11466,8 +11440,7 @@
 
       if (tem)
 	{
-	  if ((GET_RTX_CLASS (GET_CODE (tem)) == '2'
-	       || GET_RTX_CLASS (GET_CODE (tem)) == 'c')
+	  if (ARITHMETIC_P (tem)
 	      && GET_CODE (XEXP (tem, 0)) == CLOBBER
 	      && GET_CODE (XEXP (tem, 1)) == CLOBBER)
 	    tem = XEXP (tem, 0);
@@ -11777,9 +11750,7 @@
 	  /* Check for identical subexpressions.  If x contains
 	     identical subexpression we only have to traverse one of
 	     them.  */
-	  if (i == 1
-	      && (GET_RTX_CLASS (GET_CODE (x)) == '2'
-		  || GET_RTX_CLASS (GET_CODE (x)) == 'c'))
+	  if (i == 1 && ARITHMETIC_P (x))
 	    {
 	      /* Note that at this point x0 has already been checked
 		 and found valid.  */
@@ -11793,15 +11764,13 @@
 	      /* If x1 is identical to a subexpression of x0 then
 		 while checking x0, x1 has already been checked.  Thus
 		 it is valid and so as x.  */
-	      if ((GET_RTX_CLASS (GET_CODE (x0)) == '2'
-		   || GET_RTX_CLASS (GET_CODE (x0)) == 'c')
+	      if (ARITHMETIC_P (x0)
 		  && (x1 == XEXP (x0, 0) || x1 == XEXP (x0, 1)))
 		return 1;
 
 	      /* If x0 is identical to a subexpression of x1 then x is
 		 valid iff the rest of x1 is valid.  */
-	      if ((GET_RTX_CLASS (GET_CODE (x1)) == '2'
-		   || GET_RTX_CLASS (GET_CODE (x1)) == 'c')
+	      if (ARITHMETIC_P (x1)
 		  && (x0 == XEXP (x1, 0) || x0 == XEXP (x1, 1)))
 		return
 		  get_last_value_validate (&XEXP (x1,
Index: gcc/cse.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cse.c,v
retrieving revision 1.289
diff -u -r1.289 cse.c
--- gcc/cse.c	25 Feb 2004 00:54:30 -0000	1.289
+++ gcc/cse.c	1 Mar 2004 09:20:02 -0000
@@ -1214,7 +1214,7 @@
      call that expensive function in the most common case where the only
      use of the register is in the comparison.  */
 
-  if (code == COMPARE || GET_RTX_CLASS (code) == '<')
+  if (code == COMPARE || COMPARISON_P (x))
     {
       if (GET_CODE (XEXP (x, 0)) == REG
 	  && ! REGNO_QTY_VALID_P (REGNO (XEXP (x, 0))))
@@ -2953,8 +2953,7 @@
      code on the Alpha for unaligned byte stores.  */
 
   if (flag_expensive_optimizations
-      && (GET_RTX_CLASS (GET_CODE (*loc)) == '2'
-	  || GET_RTX_CLASS (GET_CODE (*loc)) == 'c')
+      && ARITHMETIC_P (*loc)
       && GET_CODE (XEXP (*loc, 0)) == REG)
     {
       rtx op1 = XEXP (*loc, 1);
@@ -3068,7 +3067,7 @@
       /* If ARG1 is a comparison operator and CODE is testing for
 	 STORE_FLAG_VALUE, get the inner arguments.  */
 
-      else if (GET_RTX_CLASS (GET_CODE (arg1)) == '<')
+      else if (COMPARISON_P (arg1))
 	{
 #ifdef FLOAT_STORE_FLAG_VALUE
 	  REAL_VALUE_TYPE fsfv;
@@ -3157,7 +3156,7 @@
 			   REAL_VALUE_NEGATIVE (fsfv)))
 #endif
 		   )
-		  && GET_RTX_CLASS (GET_CODE (p->exp)) == '<'))
+		  && COMPARISON_P (p->exp)))
 	    {
 	      x = p->exp;
 	      break;
@@ -3177,7 +3176,7 @@
 			    REAL_VALUE_NEGATIVE (fsfv)))
 #endif
 		    )
-		   && GET_RTX_CLASS (GET_CODE (p->exp)) == '<')
+		   && COMPARISON_P (p->exp))
 	    {
 	      reverse_code = 1;
 	      x = p->exp;
@@ -3210,7 +3209,7 @@
 	  else
 	    code = reversed;
 	}
-      else if (GET_RTX_CLASS (GET_CODE (x)) == '<')
+      else if (COMPARISON_P (x))
 	code = GET_CODE (x);
       arg1 = XEXP (x, 0), arg2 = XEXP (x, 1);
     }
@@ -3391,9 +3390,9 @@
 		enum rtx_code eltcode = GET_CODE (elt->exp);
 
 	        /* Just check for unary and binary operations.  */
-	        if (GET_RTX_CLASS (GET_CODE (elt->exp)) == '1'
-		    && GET_CODE (elt->exp) != SIGN_EXTEND
-		    && GET_CODE (elt->exp) != ZERO_EXTEND
+	        if (UNARY_P (elt->exp)
+		    && eltcode != SIGN_EXTEND
+		    && eltcode != ZERO_EXTEND
 		    && GET_CODE (XEXP (elt->exp, 0)) == SUBREG
 		    && GET_MODE (SUBREG_REG (XEXP (elt->exp, 0))) == mode
 		    && (GET_MODE_CLASS (mode)
@@ -3409,8 +3408,7 @@
 		      new = simplify_unary_operation (GET_CODE (elt->exp), mode,
 						      op0, mode);
 		  }
-	        else if ((GET_RTX_CLASS (GET_CODE (elt->exp)) == '2'
-			  || GET_RTX_CLASS (GET_CODE (elt->exp)) == 'c')
+	        else if (ARITHMETIC_P (elt->exp)
 		         && eltcode != DIV && eltcode != MOD
 		         && eltcode != UDIV && eltcode != UMOD
 		         && eltcode != ASHIFTRT && eltcode != LSHIFTRT
@@ -3768,9 +3766,8 @@
 	    if (validate_change (insn, &XEXP (x, i), replacements[j], 0))
 	      break;
 
-	    if (code == NE || code == EQ || GET_RTX_CLASS (code) == 'c'
-		|| code == LTGT || code == UNEQ || code == ORDERED
-		|| code == UNORDERED)
+	    if (GET_RTX_CLASS (code) == RTX_COMM_COMPARE
+		|| GET_RTX_CLASS (code) == RTX_COMM_ARITH)
 	      {
 		validate_change (insn, &XEXP (x, i), XEXP (x, 1 - i), 1);
 		validate_change (insn, &XEXP (x, 1 - i), replacements[j], 1);
@@ -3802,9 +3799,7 @@
      operand unless the first operand is also a constant integer.  Otherwise,
      place any constant second unless the first operand is also a constant.  */
 
-  if (code == EQ || code == NE || GET_RTX_CLASS (code) == 'c'
-      || code == LTGT || code == UNEQ || code == ORDERED
-      || code == UNORDERED)
+  if (COMMUTATIVE_P (x))
     {
       if (must_swap
 	  || swap_commutative_operands_p (const_arg0 ? const_arg0
@@ -3834,7 +3829,7 @@
 
   switch (GET_RTX_CLASS (code))
     {
-    case '1':
+    case RTX_UNARY:
       {
 	int is_const = 0;
 
@@ -3857,7 +3852,8 @@
       }
       break;
 
-    case '<':
+    case RTX_COMPARE:
+    case RTX_COMM_COMPARE:
       /* See what items are actually being compared and set FOLDED_ARG[01]
 	 to those values and CODE to the actual comparison code.  If any are
 	 constant, set CONST_ARG0 and CONST_ARG1 appropriately.  We needn't
@@ -4039,8 +4035,8 @@
 #endif
       break;
 
-    case '2':
-    case 'c':
+    case RTX_BIN_ARITH:
+    case RTX_COMM_ARITH:
       switch (code)
 	{
 	case PLUS:
@@ -4245,7 +4241,7 @@
 				       const_arg1 ? const_arg1 : folded_arg1);
       break;
 
-    case 'o':
+    case RTX_OBJ:
       /* (lo_sum (high X) X) is simply X.  */
       if (code == LO_SUM && const_arg0 != 0
 	  && GET_CODE (const_arg0) == HIGH
@@ -4253,15 +4249,15 @@
 	return const_arg1;
       break;
 
-    case '3':
-    case 'b':
+    case RTX_TERNARY:
+    case RTX_BITFIELD_OPS:
       new = simplify_ternary_operation (code, mode, mode_arg0,
 					const_arg0 ? const_arg0 : folded_arg0,
 					const_arg1 ? const_arg1 : folded_arg1,
 					const_arg2 ? const_arg2 : XEXP (x, 2));
       break;
 
-    case 'x':
+    case RTX_EXTRA:
       /* Eliminate CONSTANT_P_RTX if its constant.  */
       if (code == CONSTANT_P_RTX)
 	{
@@ -4271,6 +4267,9 @@
 	    return const0_rtx;
 	}
       break;
+
+    default:
+      break;
     }
 
   return new ? new : x;
@@ -5647,7 +5646,7 @@
 #ifdef PUSH_ROUNDING
 	  /* Stack pushes invalidate the stack pointer.  */
 	  rtx addr = XEXP (dest, 0);
-	  if (GET_RTX_CLASS (GET_CODE (addr)) == 'a'
+	  if (GET_RTX_CLASS (GET_CODE (addr)) == RTX_AUTOINC
 	      && XEXP (addr, 0) == stack_pointer_rtx)
 	    invalidate (stack_pointer_rtx, Pmode);
 #endif
@@ -6313,7 +6312,7 @@
 static int
 addr_affects_sp_p (rtx addr)
 {
-  if (GET_RTX_CLASS (GET_CODE (addr)) == 'a'
+  if (GET_RTX_CLASS (GET_CODE (addr)) == RTX_AUTOINC
       && GET_CODE (XEXP (addr, 0)) == REG
       && REGNO (XEXP (addr, 0)) == STACK_POINTER_REGNUM)
     {
@@ -7193,7 +7192,7 @@
       if (GET_MODE (insn) == QImode)
 	PUT_MODE (insn, VOIDmode);
 
-      if (GET_RTX_CLASS (code) == 'i')
+      if (GET_RTX_CLASS (code) == RTX_INSN)
 	{
 	  rtx p;
 
Index: gcc/emit-rtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/emit-rtl.c,v
retrieving revision 1.381
diff -u -r1.381 emit-rtl.c
--- gcc/emit-rtl.c	19 Feb 2004 10:59:44 -0000	1.381
+++ gcc/emit-rtl.c	1 Mar 2004 09:20:03 -0000
@@ -4982,7 +4982,7 @@
   RTX_FLAG (copy, used) = 0;
 
   /* We do not copy JUMP, CALL, or FRAME_RELATED for INSNs.  */
-  if (GET_RTX_CLASS (code) == 'i')
+  if (INSN_P (orig))
     {
       RTX_FLAG (copy, jump) = 0;
       RTX_FLAG (copy, call) = 0;
Index: gcc/expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expr.c,v
retrieving revision 1.627
diff -u -r1.627 expr.c
--- gcc/expr.c	27 Feb 2004 08:11:34 -0000	1.627
+++ gcc/expr.c	1 Mar 2004 09:20:04 -0000
@@ -5624,7 +5624,7 @@
       return target;
     }
 
-  if (GET_RTX_CLASS (code) == '2' || GET_RTX_CLASS (code) == 'c')
+  if (ARITHMETIC_P (value))
     {
       op2 = XEXP (value, 1);
       if (!CONSTANT_P (op2) && !(GET_CODE (op2) == REG && op2 != subtarget))
@@ -5693,7 +5693,7 @@
 				      target, 1, OPTAB_LIB_WIDEN);
 	}
     }
-  if (GET_RTX_CLASS (code) == '1')
+  if (UNARY_P (value))
     {
       op1 = force_operand (XEXP (value, 0), NULL_RTX);
       return expand_simple_unop (GET_MODE (value), code, op1, target, 0);
Index: gcc/final.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/final.c,v
retrieving revision 1.307
diff -u -r1.307 final.c
--- gcc/final.c	6 Feb 2004 20:03:41 -0000	1.307
+++ gcc/final.c	1 Mar 2004 09:20:05 -0000
@@ -2217,7 +2217,7 @@
 	    && GET_CODE (body) == SET
 	    && SET_DEST (body) == pc_rtx
 	    && GET_CODE (SET_SRC (body)) == IF_THEN_ELSE
-	    && GET_RTX_CLASS (GET_CODE (XEXP (SET_SRC (body), 0))) == '<'
+	    && COMPARISON_P (XEXP (SET_SRC (body), 0))
 	    && XEXP (XEXP (SET_SRC (body), 0), 0) == cc0_rtx
 	    /* This is done during prescan; it is not done again
 	       in final scan when prescan has been done.  */
@@ -2845,8 +2845,8 @@
 	   && (expr = get_mem_expr_from_op (XEXP (op, 1), &inner_addressp)))
     return expr;
 
-  while (GET_RTX_CLASS (GET_CODE (op)) == '1'
-	 || GET_RTX_CLASS (GET_CODE (op)) == '2')
+  while (GET_RTX_CLASS (GET_CODE (op)) == RTX_UNARY
+	 || GET_RTX_CLASS (GET_CODE (op)) == RTX_BIN_ARITH)
     op = XEXP (op, 0);
 
   expr = get_mem_expr_from_op (op, &inner_addressp);
Index: gcc/flow.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/flow.c,v
retrieving revision 1.582
diff -u -r1.582 flow.c
--- gcc/flow.c	28 Feb 2004 02:43:41 -0000	1.582
+++ gcc/flow.c	1 Mar 2004 09:20:05 -0000
@@ -914,7 +914,7 @@
 	 of a push until later in flow.  See the comments in rtl.texi
 	 regarding Embedded Side-Effects on Addresses.  */
       || (GET_CODE (x) == MEM
-	  && GET_RTX_CLASS (GET_CODE (XEXP (x, 0))) == 'a'
+	  && GET_RTX_CLASS (GET_CODE (XEXP (x, 0))) == RTX_AUTOINC
 	  && XEXP (XEXP (x, 0), 0) == stack_pointer_rtx))
     current_function_sp_is_unchanging = 0;
 }
@@ -2439,7 +2439,7 @@
   rtx x = *px;
   struct propagate_block_info *pbi = data;
 
-  if (GET_RTX_CLASS (GET_CODE (x)) == 'a')
+  if (GET_RTX_CLASS (GET_CODE (x)) == RTX_AUTOINC)
     {
       invalidate_mems_from_set (pbi, XEXP (x, 0));
       return -1;
@@ -3054,9 +3054,9 @@
 {
   rtx op0, op1;
 
-  if (GET_RTX_CLASS (GET_CODE (old)) == '<')
+  if (COMPARISON_P (old))
     {
-      if (GET_RTX_CLASS (GET_CODE (x)) == '<'
+      if (COMPARISON_P (x))
 	  && REVERSE_CONDEXEC_PREDICATES_P (GET_CODE (x), GET_CODE (old))
 	  && REGNO (XEXP (x, 0)) == REGNO (XEXP (old, 0)))
 	return const1_rtx;
@@ -3149,7 +3149,7 @@
   x_code = GET_CODE (x);
   if (x_code == NOT)
     return XEXP (x, 0);
-  if (GET_RTX_CLASS (x_code) == '<'
+  if (COMPARISON_P (x)
       && GET_CODE (XEXP (x, 0)) == REG)
     {
       if (XEXP (x, 1) != const0_rtx)
@@ -3166,9 +3166,9 @@
 {
   rtx op0, op1;
 
-  if (GET_RTX_CLASS (GET_CODE (old)) == '<')
+  if (COMPARISON_P (old))
     {
-      if (GET_RTX_CLASS (GET_CODE (x)) == '<'
+      if (COMPARISON_P (x))
 	  && GET_CODE (x) == reverse_condition (GET_CODE (old))
 	  && REGNO (XEXP (x, 0)) == REGNO (XEXP (old, 0)))
 	return const0_rtx;
@@ -3259,7 +3259,7 @@
 {
   rtx op0, op1;
 
-  if (GET_RTX_CLASS (GET_CODE (x)) == '<')
+  if (COMPARISON_P (x))
     {
       if (REGNO (XEXP (x, 0)) == regno)
 	return const0_rtx;
Index: gcc/function.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.c,v
retrieving revision 1.499
diff -u -r1.499 function.c
--- gcc/function.c	29 Feb 2004 14:07:39 -0000	1.499
+++ gcc/function.c	1 Mar 2004 09:20:07 -0000
@@ -7677,8 +7677,7 @@
 
   /* If this is a binary operation between a register we have been tracking
      and a constant, see if we can compute a new constant value.  */
-  else if ((GET_RTX_CLASS (GET_CODE (SET_SRC (x))) == 'c'
-	    || GET_RTX_CLASS (GET_CODE (SET_SRC (x))) == '2')
+  else if (ARITHMETIC_P (SET_SRC (x))
 	   && GET_CODE (XEXP (SET_SRC (x), 0)) == REG
 	   && REGNO (XEXP (SET_SRC (x), 0)) < FIRST_PSEUDO_REGISTER
 	   && p->const_equiv[REGNO (XEXP (SET_SRC (x), 0))] != 0
Index: gcc/genattrtab.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/genattrtab.c,v
retrieving revision 1.142
diff -u -r1.142 genattrtab.c
--- gcc/genattrtab.c	4 Feb 2004 06:12:51 -0000	1.142
+++ gcc/genattrtab.c	1 Mar 2004 09:20:08 -0000
@@ -565,7 +565,7 @@
      Use that entry if one is found; otherwise create a new RTL and add it
      to the table.  */
 
-  if (GET_RTX_CLASS (code) == '1')
+  if (GET_RTX_CLASS (code) == RTX_UNARY)
     {
       rtx arg0 = va_arg (p, rtx);
 
@@ -591,9 +591,10 @@
 	  XEXP (rt_val, 0) = arg0;
 	}
     }
-  else if (GET_RTX_CLASS (code) == 'c'
-	   || GET_RTX_CLASS (code) == '2'
-	   || GET_RTX_CLASS (code) == '<')
+  else if (GET_RTX_CLASS (code) == RTX_BIN_ARITH
+  	   || GET_RTX_CLASS (code) == RTX_COMM_ARITH
+  	   || GET_RTX_CLASS (code) == RTX_COMPARE
+  	   || GET_RTX_CLASS (code) == RTX_COMM_COMPARE)
     {
       rtx arg0 = va_arg (p, rtx);
       rtx arg1 = va_arg (p, rtx);
Index: gcc/genopinit.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/genopinit.c,v
retrieving revision 1.67
diff -u -r1.67 genopinit.c
--- gcc/genopinit.c	11 Feb 2004 23:39:35 -0000	1.67
+++ gcc/genopinit.c	1 Mar 2004 09:20:08 -0000
@@ -222,7 +222,9 @@
 		    /* We have to be concerned about matching "gt" and
 		       missing "gtu", e.g., so verify we have reached the
 		       end of thing we are to match.  */
-		    if (*p == 0 && *q == 0 && GET_RTX_CLASS(op) == '<')
+		    if (*p == 0 && *q == 0
+			&& (GET_RTX_CLASS (op) == RTX_COMPARE
+			    || GET_RTX_CLASS (op) == RTX_COMM_COMPARE))
 		      break;
 		  }
 
Index: gcc/integrate.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/integrate.c,v
retrieving revision 1.248
diff -u -r1.248 integrate.c
--- gcc/integrate.c	17 Feb 2004 21:33:33 -0000	1.248
+++ gcc/integrate.c	1 Mar 2004 09:20:09 -0000
@@ -2711,7 +2711,8 @@
   /* If this is a commutative operation, move a constant to the second
      operand unless the second operand is already a CONST_INT.  */
   if (! memonly
-      && (GET_RTX_CLASS (code) == 'c' || code == NE || code == EQ)
+      && (GET_RTX_CLASS (code) == RTX_COMM_ARITH
+	  || GET_RTX_CLASS (code) == RTX_COMM_COMPARE)
       && CONSTANT_P (XEXP (x, 0)) && GET_CODE (XEXP (x, 1)) != CONST_INT)
     {
       rtx tem = XEXP (x, 0);
@@ -2723,14 +2724,15 @@
   if (! memonly)
     switch (GET_RTX_CLASS (code))
       {
-      case '1':
+      case RTX_UNARY:
 	if (op0_mode == MAX_MACHINE_MODE)
 	  abort ();
 	new = simplify_unary_operation (code, GET_MODE (x),
 					XEXP (x, 0), op0_mode);
 	break;
 
-      case '<':
+      case RTX_COMPARE:
+      case RTX_COMM_COMPARE:
 	{
 	  enum machine_mode op_mode = GET_MODE (XEXP (x, 0));
 
@@ -2757,14 +2759,14 @@
 	  break;
 	}
 
-      case '2':
-      case 'c':
+      case RTX_BIN_ARITH:
+      case RTX_COMM_ARITH:
 	new = simplify_binary_operation (code, GET_MODE (x),
 					 XEXP (x, 0), XEXP (x, 1));
 	break;
 
-      case 'b':
-      case '3':
+      case RTX_BITFIELD_OPS:
+      case RTX_TERNARY:
 	if (op0_mode == MAX_MACHINE_MODE)
 	  abort ();
 
@@ -2772,7 +2774,7 @@
 	  {
 	    rtx op0 = XEXP (x, 0);
 
-	    if (GET_RTX_CLASS (GET_CODE (op0)) == '<'
+	    if (COMPARISON_P (op0)
 		&& GET_MODE (op0) == VOIDmode
 		&& ! side_effects_p (op0)
 		&& XEXP (op0, 0) == map->compare_src
@@ -2796,6 +2798,9 @@
 	  new = simplify_ternary_operation (code, GET_MODE (x), op0_mode,
 					    XEXP (x, 0), XEXP (x, 1),
 					    XEXP (x, 2));
+	break;
+
+      default:
 	break;
       }
 
Index: gcc/jump.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/jump.c,v
retrieving revision 1.239
diff -u -r1.239 jump.c
--- gcc/jump.c	2 Feb 2004 00:17:16 -0000	1.239
+++ gcc/jump.c	1 Mar 2004 09:20:09 -0000
@@ -637,7 +637,8 @@
   enum machine_mode mode;
 
   /* If this is not actually a comparison, we can't reverse it.  */
-  if (GET_RTX_CLASS (code) != '<')
+  if (GET_RTX_CLASS (code) != RTX_COMPARE
+      && GET_RTX_CLASS (code) != RTX_COMM_COMPARE)
     return UNKNOWN;
 
   mode = GET_MODE (arg0);
@@ -748,7 +749,7 @@
 enum rtx_code
 reversed_comparison_code (rtx comparison, rtx insn)
 {
-  if (GET_RTX_CLASS (GET_CODE (comparison)) != '<')
+  if (!COMPARISON_P (comparison))
     return UNKNOWN;
   return reversed_comparison_code_parts (GET_CODE (comparison),
 					 XEXP (comparison, 0),
@@ -1764,24 +1765,24 @@
 
   if (was_code_label && prev && GET_CODE (prev) == BARRIER)
     {
-      RTX_CODE code;
-      while (next != 0
-	     && (GET_RTX_CLASS (code = GET_CODE (next)) == 'i'
-		 || code == NOTE || code == BARRIER
-		 || (code == CODE_LABEL && INSN_DELETED_P (next))))
+      enum rtx_code code;
+      while (next)
 	{
+	  code = GET_CODE (next);
 	  if (code == NOTE
 	      && NOTE_LINE_NUMBER (next) != NOTE_INSN_FUNCTION_END)
 	    next = NEXT_INSN (next);
 	  /* Keep going past other deleted labels to delete what follows.  */
 	  else if (code == CODE_LABEL && INSN_DELETED_P (next))
 	    next = NEXT_INSN (next);
-	  else
+	  else if (code == BARRIER || INSN_P (next))
 	    /* Note: if this deletes a jump, it can cause more
 	       deletion of unreachable code, after a different label.
 	       As long as the value from this recursive call is correct,
 	       this invocation functions correctly.  */
 	    next = delete_related_insns (next);
+	  else
+	    break;
 	}
     }
 
@@ -2186,7 +2187,7 @@
 rtx_renumbered_equal_p (rtx x, rtx y)
 {
   int i;
-  RTX_CODE code = GET_CODE (x);
+  enum rtx_code code = GET_CODE (x);
   const char *fmt;
 
   if (x == y)
@@ -2296,16 +2297,15 @@
      order.  Also handle the simple binary and unary cases without a loop.
 
      ??? Don't consider PLUS a commutative operator; see comments above.  */
-  if ((code == EQ || code == NE || GET_RTX_CLASS (code) == 'c')
-      && code != PLUS)
+  if (COMMUTATIVE_P (x) && code != PLUS)
     return ((rtx_renumbered_equal_p (XEXP (x, 0), XEXP (y, 0))
 	     && rtx_renumbered_equal_p (XEXP (x, 1), XEXP (y, 1)))
 	    || (rtx_renumbered_equal_p (XEXP (x, 0), XEXP (y, 1))
 		&& rtx_renumbered_equal_p (XEXP (x, 1), XEXP (y, 0))));
-  else if (GET_RTX_CLASS (code) == '<' || GET_RTX_CLASS (code) == '2')
+  else if (NON_COMMUTATIVE_P (x))
     return (rtx_renumbered_equal_p (XEXP (x, 0), XEXP (y, 0))
 	    && rtx_renumbered_equal_p (XEXP (x, 1), XEXP (y, 1)));
-  else if (GET_RTX_CLASS (code) == '1')
+  else if (UNARY_P (x))
     return rtx_renumbered_equal_p (XEXP (x, 0), XEXP (y, 0));
 
   /* Compare the elements.  If any pair of corresponding elements
Index: gcc/local-alloc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/local-alloc.c,v
retrieving revision 1.128
diff -u -r1.128 local-alloc.c
--- gcc/local-alloc.c	2 Feb 2004 00:17:17 -0000	1.128
+++ gcc/local-alloc.c	1 Mar 2004 09:20:10 -0000
@@ -1392,9 +1392,7 @@
 
 	      /* Here we care if the operation to be computed is
 		 commutative.  */
-	      else if ((GET_CODE (XEXP (note, 0)) == EQ
-			|| GET_CODE (XEXP (note, 0)) == NE
-			|| GET_RTX_CLASS (GET_CODE (XEXP (note, 0))) == 'c')
+	      else if (COMMUTATIVE_P (XEXP (note, 0))
 		       && (r1 = XEXP (XEXP (note, 0), 1),
 			   (GET_CODE (r1) == REG || GET_CODE (r1) == SUBREG))
 		       && no_conflict_p (insn, r0, r1))
Index: gcc/loop-iv.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/loop-iv.c,v
retrieving revision 2.4
diff -u -r2.4 loop-iv.c
--- gcc/loop-iv.c	27 Feb 2004 07:09:43 -0000	2.4
+++ gcc/loop-iv.c	1 Mar 2004 09:20:10 -0000
@@ -1469,7 +1469,7 @@
 {
   rtx rev, reve, exp = *expr;
 
-  if (GET_RTX_CLASS (GET_CODE (*expr)) != '<')
+  if (!COMPARISON_P (exp))
     return;
 
   /* If some register gets altered later, we do not really speak about its
@@ -1894,7 +1894,7 @@
   desc->niter_max = 0;
 
   cond = GET_CODE (condition);
-  if (GET_RTX_CLASS (cond) != '<')
+  if (!COMPARISON_P (condition))
     abort ();
 
   mode = GET_MODE (XEXP (condition, 0));
Index: gcc/loop.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/loop.c,v
retrieving revision 1.493
diff -u -r1.493 loop.c
--- gcc/loop.c	19 Feb 2004 10:53:13 -0000	1.493
+++ gcc/loop.c	1 Mar 2004 09:20:12 -0000
@@ -3678,15 +3678,14 @@
   if (code != GET_CODE (y))
     return 0;
 
-  code = GET_CODE (x);
-
-  if (GET_RTX_CLASS (code) == 'c')
+  if (COMMUTATIVE_ARITH_P (x))
     {
       return ((rtx_equal_for_prefetch_p (XEXP (x, 0), XEXP (y, 0))
 	       && rtx_equal_for_prefetch_p (XEXP (x, 1), XEXP (y, 1)))
 	      || (rtx_equal_for_prefetch_p (XEXP (x, 0), XEXP (y, 1))
 	          && rtx_equal_for_prefetch_p (XEXP (x, 1), XEXP (y, 0))));
     }
+
   /* Compare the elements.  If any pair of corresponding elements fails to
      match, return 0 for the whole thing.  */
 
@@ -8607,7 +8606,7 @@
       rtx note;
 
       /* If this is a libcall that sets a giv, skip ahead to its end.  */
-      if (GET_RTX_CLASS (code) == 'i')
+      if (INSN_P (p))
 	{
 	  note = find_reg_note (p, REG_LIBCALL, NULL_RTX);
 
@@ -9222,7 +9221,8 @@
      the same tests as a function of STORE_FLAG_VALUE as find_comparison_args
      in cse.c  */
 
-  while (GET_RTX_CLASS (code) == '<'
+  while ((GET_RTX_CLASS (code) == RTX_COMPARE
+	  || GET_RTX_CLASS (code) == RTX_COMM_COMPARE)
 	 && op1 == CONST0_RTX (GET_MODE (op0))
 	 && op0 != want_reg)
     {
@@ -9312,7 +9312,7 @@
 			     REAL_VALUE_NEGATIVE (fsfv)))
 #endif
 		     ))
-		   && GET_RTX_CLASS (GET_CODE (SET_SRC (set))) == '<'))
+		   && COMPARISON_P (SET_SRC (set))))
 	      && (((GET_MODE_CLASS (mode) == MODE_CC)
 		   == (GET_MODE_CLASS (inner_mode) == MODE_CC))
 		  || mode == VOIDmode || inner_mode == VOIDmode))
@@ -9332,7 +9332,7 @@
 			     REAL_VALUE_NEGATIVE (fsfv)))
 #endif
 		     ))
-		   && GET_RTX_CLASS (GET_CODE (SET_SRC (set))) == '<'
+		   && COMPARISON_P (SET_SRC (set))
 		   && (((GET_MODE_CLASS (mode) == MODE_CC)
 			== (GET_MODE_CLASS (inner_mode) == MODE_CC))
 		       || mode == VOIDmode || inner_mode == VOIDmode))
@@ -9351,7 +9351,7 @@
 
       if (x)
 	{
-	  if (GET_RTX_CLASS (GET_CODE (x)) == '<')
+	  if (COMPARISON_P (x))
 	    code = GET_CODE (x);
 	  if (reverse_code)
 	    {
Index: gcc/optabs.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/optabs.c,v
retrieving revision 1.208
diff -u -r1.208 optabs.c
--- gcc/optabs.c	19 Feb 2004 18:50:57 -0000	1.208
+++ gcc/optabs.c	1 Mar 2004 09:20:13 -0000
@@ -153,8 +153,11 @@
       || NEXT_INSN (insns) == NULL_RTX)
     abort ();
 
-  if (GET_RTX_CLASS (code) != '1' && GET_RTX_CLASS (code) != '2'
-      && GET_RTX_CLASS (code) != 'c' && GET_RTX_CLASS (code) != '<')
+  if (GET_RTX_CLASS (code) != RTX_COMM_ARITH
+      && GET_RTX_CLASS (code) != RTX_BIN_ARITH
+      && GET_RTX_CLASS (code) != RTX_COMM_COMPARE
+      && GET_RTX_CLASS (code) != RTX_COMPARE
+      && GET_RTX_CLASS (code) != RTX_UNARY)
     return 1;
 
   if (GET_CODE (target) == ZERO_EXTRACT)
@@ -190,7 +193,7 @@
 	}
     }
 
-  if (GET_RTX_CLASS (code) == '1')
+  if (GET_RTX_CLASS (code) == RTX_UNARY)
     note = gen_rtx_fmt_e (code, GET_MODE (target), copy_rtx (op0));
   else
     note = gen_rtx_fmt_ee (code, GET_MODE (target), copy_rtx (op0), copy_rtx (op1));
@@ -718,7 +721,7 @@
      try to make the first operand a register.
      Even better, try to make it the same as the target.
      Also try to make the last operand a constant.  */
-  if (GET_RTX_CLASS (binoptab->code) == 'c'
+  if (GET_RTX_CLASS (binoptab->code) == RTX_COMM_ARITH
       || binoptab == smul_widen_optab
       || binoptab == umul_widen_optab
       || binoptab == smul_highpart_optab
Index: gcc/predict.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/predict.c,v
retrieving revision 1.101
diff -u -r1.101 predict.c
--- gcc/predict.c	24 Feb 2004 23:39:55 -0000	1.101
+++ gcc/predict.c	1 Mar 2004 09:20:13 -0000
@@ -533,7 +533,7 @@
       /* Try "pointer heuristic."
 	 A comparison ptr == 0 is predicted as false.
 	 Similarly, a comparison ptr1 == ptr2 is predicted as false.  */
-      if (GET_RTX_CLASS (GET_CODE (cond)) == '<'
+      if (COMPARISON_P (cond)
 	  && ((REG_P (XEXP (cond, 0)) && REG_POINTER (XEXP (cond, 0)))
 	      || (REG_P (XEXP (cond, 1)) && REG_POINTER (XEXP (cond, 1)))))
 	{
Index: gcc/ra-debug.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ra-debug.c,v
retrieving revision 1.16
diff -u -r1.16 ra-debug.c
--- gcc/ra-debug.c	24 Feb 2004 23:39:55 -0000	1.16
+++ gcc/ra-debug.c	1 Mar 2004 09:20:13 -0000
@@ -1,5 +1,5 @@
 /* Graph coloring register allocator
-   Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
    Contributed by Michael Matz <matz@suse.de>
    and Daniel Berlin <dan@cgsoftware.com>.
 
@@ -130,9 +130,11 @@
       case AND: opname = "&"; break;
       case IOR: opname = "|"; break;
       case XOR: opname = "^"; break;
-      /* class '<' */
+      /* class '=' */
       case NE: opname = "!="; break;
       case EQ: opname = "=="; break;
+      case LTGT: opname = "<>"; break;
+      /* class '<' */
       case GE: opname = "s>="; break;
       case GT: opname = "s>"; break;
       case LE: opname = "s<="; break;
@@ -196,7 +198,7 @@
     }
 }
 
-/* Print rtx X, which represents an object (class 'o' or some constructs
+/* Print rtx X, which represents an object (class 'o', 'C', or some constructs
    of class 'x' (e.g. subreg)), to FILE.
    (reg XX) rtl is represented as "pXX", of XX was a pseudo,
    as "name" it name is the nonnull hardreg name, or as "hXX", if XX
@@ -340,12 +342,10 @@
 ra_print_rtx (FILE *file, rtx x, int with_pn)
 {
   enum rtx_code code;
-  char class;
   int unhandled = 0;
   if (!x)
     return;
   code = GET_CODE (x);
-  class = GET_RTX_CLASS (code);
 
   /* First handle the insn like constructs.  */
   if (INSN_P (x) || code == NOTE || code == CODE_LABEL || code == BARRIER)
@@ -492,16 +492,24 @@
     }
   if (!unhandled)
     return;
-  if (class == '1')
-    ra_print_rtx_1op (file, x);
-  else if (class == '2' || class == 'c' || class == '<')
-    ra_print_rtx_2op (file, x);
-  else if (class == '3' || class == 'b')
-    ra_print_rtx_3op (file, x);
-  else if (class == 'o')
-    ra_print_rtx_object (file, x);
-  else
-    print_inline_rtx (file, x, 0);
+  switch (GET_RTX_CLASS (code))
+    {
+      case RTX_UNARY:
+        ra_print_rtx_1op (file, x);
+      case RTX_BIN_ARITH:
+      case RTX_COMM_ARITH:
+      case RTX_COMPARE:
+      case RTX_COMM_COMPARE:
+        ra_print_rtx_2op (file, x);
+      case RTX_TERNARY:
+      case RTX_BITFIELD_OPS:
+        ra_print_rtx_3op (file, x);
+      case RTX_OBJ:
+      case RTX_CONST_OBJ:
+        ra_print_rtx_object (file, x);
+      default:
+        print_inline_rtx (file, x, 0);
+    }
 }
 
 /* This only calls ra_print_rtx(), but emits a final newline.  */
Index: gcc/recog.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/recog.c,v
retrieving revision 1.198
diff -u -r1.198 recog.c
--- gcc/recog.c	26 Feb 2004 23:39:29 -0000	1.198
+++ gcc/recog.c	1 Mar 2004 09:20:14 -0000
@@ -521,11 +521,11 @@
   /* Do changes needed to keep rtx consistent.  Don't do any other
      simplifications, as it is not our job.  */
 
-  if ((GET_RTX_CLASS (code) == '<' || GET_RTX_CLASS (code) == 'c')
+  if (SWAPPABLE_OPERANDS_P (x)
       && swap_commutative_operands_p (XEXP (x, 0), XEXP (x, 1)))
     {
       validate_change (object, loc,
-		       gen_rtx_fmt_ee (GET_RTX_CLASS (code) == 'c' ? code
+		       gen_rtx_fmt_ee (COMMUTATIVE_ARITH_P (x) ? code
 				       : swap_condition (code),
 				       GET_MODE (x), XEXP (x, 1),
 				       XEXP (x, 0)), 1);
@@ -1370,7 +1370,7 @@
 comparison_operator (rtx op, enum machine_mode mode)
 {
   return ((mode == VOIDmode || GET_MODE (op) == mode)
-	  && GET_RTX_CLASS (GET_CODE (op)) == '<');
+	  && COMPARISON_P (op));
 }
 
 /* If BODY is an insn body that uses ASM_OPERANDS,
@@ -1931,7 +1931,7 @@
       return good;
     }
 
-  if (GET_RTX_CLASS (ycode) == 'a')
+  if (GET_RTX_CLASS (ycode) == RTX_AUTOINC)
     return 0;
 
   /* The offset added here is chosen as the maximum offset that
@@ -2304,7 +2304,7 @@
 
 	  /* A unary operator may be accepted by the predicate, but it
 	     is irrelevant for matching constraints.  */
-	  if (GET_RTX_CLASS (GET_CODE (op)) == '1')
+	  if (UNARY_P (op))
 	    op = XEXP (op, 0);
 
 	  if (GET_CODE (op) == SUBREG)
@@ -2377,9 +2377,9 @@
 
 		      /* A unary operator may be accepted by the predicate,
 			 but it is irrelevant for matching constraints.  */
-		      if (GET_RTX_CLASS (GET_CODE (op1)) == '1')
+		      if (UNARY_P (op1))
 			op1 = XEXP (op1, 0);
-		      if (GET_RTX_CLASS (GET_CODE (op2)) == '1')
+		      if (UNARY_P (op2))
 			op2 = XEXP (op2, 0);
 
 		      val = operands_match_p (op1, op2);
Index: gcc/reg-stack.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/reg-stack.c,v
retrieving revision 1.143
diff -u -r1.143 reg-stack.c
--- gcc/reg-stack.c	6 Feb 2004 13:57:15 -0000	1.143
+++ gcc/reg-stack.c	1 Mar 2004 09:20:14 -0000
@@ -1178,7 +1178,7 @@
   const char *fmt;
   int i, r = 0;
 
-  if (GET_RTX_CLASS (GET_CODE (pat)) == '<')
+  if (COMPARISON_P (pat))
     {
       PUT_CODE (pat, swap_condition (GET_CODE (pat)));
       r = 1;
@@ -1654,7 +1654,7 @@
 	      }
 
 	    /* Keep operand 1 matching with destination.  */
-	    if (GET_RTX_CLASS (GET_CODE (pat_src)) == 'c'
+	    if (COMMUTATIVE_ARITH_P (pat_src)
 		&& REG_P (*src1) && REG_P (*src2)
 		&& REGNO (*src1) != REGNO (*dest))
 	     {
Index: gcc/regclass.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/regclass.c,v
retrieving revision 1.185
diff -u -r1.185 regclass.c
--- gcc/regclass.c	4 Feb 2004 19:15:17 -0000	1.185
+++ gcc/regclass.c	1 Mar 2004 09:20:14 -0000
@@ -1008,13 +1008,12 @@
 static rtx
 scan_one_insn (rtx insn, int pass)
 {
-  enum rtx_code code = GET_CODE (insn);
   enum rtx_code pat_code;
   rtx set, note;
   int i, j;
   struct costs op_costs[MAX_RECOG_OPERANDS];
 
-  if (GET_RTX_CLASS (code) != 'i')
+  if (!INSN_P (insn))
     return insn;
 
   pat_code = GET_CODE (PATTERN (insn));
Index: gcc/regmove.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/regmove.c,v
retrieving revision 1.155
diff -u -r1.155 regmove.c
--- gcc/regmove.c	3 Feb 2004 05:39:53 -0000	1.155
+++ gcc/regmove.c	1 Mar 2004 09:20:15 -0000
@@ -2046,7 +2046,13 @@
   RTX_CODE code = GET_CODE (x);
   switch (GET_RTX_CLASS (code))
     {
-    case '<': case '1': case 'c': case '2': case 'b': case '3':
+    case RTX_UNARY:
+    case RTX_BIN_ARITH:
+    case RTX_COMM_ARITH:
+    case RTX_COMPARE:
+    case RTX_COMM_COMPARE:
+    case RTX_TERNARY:
+    case RTX_BITFIELD_OPS:
       {
 	int i;
 	const char *fmt = GET_RTX_FORMAT (code);
@@ -2056,7 +2062,7 @@
 	      return 0;
 	return 1;
       }
-    case 'o':
+    case RTX_OBJ:
       if (code == REG)
 	return x == src || x == dst;
       /* If this is a MEM, look inside - there might be a register hidden in
Index: gcc/regrename.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/regrename.c,v
retrieving revision 1.76
diff -u -r1.76 regrename.c
--- gcc/regrename.c	24 Feb 2004 23:39:56 -0000	1.76
+++ gcc/regrename.c	1 Mar 2004 09:20:15 -0000
@@ -1173,7 +1173,7 @@
   rtx x = *px;
   struct value_data *vd = data;
 
-  if (GET_RTX_CLASS (GET_CODE (x)) == 'a')
+  if (GET_RTX_CLASS (GET_CODE (x)) == RTX_AUTOINC)
     {
       x = XEXP (x, 0);
       kill_value (x, vd);
Index: gcc/reload.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/reload.c,v
retrieving revision 1.238
diff -u -r1.238 reload.c
--- gcc/reload.c	24 Feb 2004 16:58:35 -0000	1.238
+++ gcc/reload.c	1 Mar 2004 09:20:16 -0000
@@ -771,10 +771,10 @@
 				  true_regnum (rld[i].reg_rtx)))
 	&& out == 0 && rld[i].out == 0 && rld[i].in != 0
 	&& ((GET_CODE (in) == REG
-	     && GET_RTX_CLASS (GET_CODE (rld[i].in)) == 'a'
+	     && GET_RTX_CLASS (GET_CODE (rld[i].in)) == RTX_AUTOINC
 	     && MATCHES (XEXP (rld[i].in, 0), in))
 	    || (GET_CODE (rld[i].in) == REG
-		&& GET_RTX_CLASS (GET_CODE (in)) == 'a'
+		&& GET_RTX_CLASS (GET_CODE (in)) == RTX_AUTOINC
 		&& MATCHES (XEXP (in, 0), rld[i].in)))
 	&& (rld[i].out == 0 || ! earlyclobber_operand_p (rld[i].out))
 	&& (reg_class_size[(int) class] == 1 || SMALL_REGISTER_CLASSES)
@@ -2706,7 +2706,7 @@
 
 	  /* If we now have a simple operand where we used to have a
 	     PLUS or MULT, re-recognize and try again.  */
-	  if ((GET_RTX_CLASS (GET_CODE (*recog_data.operand_loc[i])) == 'o'
+	  if ((OBJECT_P (*recog_data.operand_loc[i])
 	       || GET_CODE (*recog_data.operand_loc[i]) == SUBREG)
 	      && (GET_CODE (recog_data.operand[i]) == MULT
 		  || GET_CODE (recog_data.operand[i]) == PLUS))
@@ -2762,7 +2762,7 @@
 
 	  substed_operand[i] = recog_data.operand[i] = op;
 	}
-      else if (code == PLUS || GET_RTX_CLASS (code) == '1')
+      else if (code == PLUS || GET_RTX_CLASS (code) == RTX_UNARY)
 	/* We can get a PLUS as an "operand" as a result of register
 	   elimination.  See eliminate_regs and gen_reload.  We handle
 	   a unary operator by reloading the operand.  */
@@ -2890,7 +2890,7 @@
 	  /* If the predicate accepts a unary operator, it means that
 	     we need to reload the operand, but do not do this for
 	     match_operator and friends.  */
-	  if (GET_RTX_CLASS (GET_CODE (operand)) == '1' && *p != 0)
+	  if (UNARY_P (operand) && *p != 0)
 	    operand = XEXP (operand, 0);
 
 	  /* If the operand is a SUBREG, extract
@@ -6271,7 +6271,7 @@
 
   /* Overly conservative.  */
   if (GET_CODE (x) == STRICT_LOW_PART
-      || GET_RTX_CLASS (GET_CODE (x)) == 'a')
+      || GET_RTX_CLASS (GET_CODE (x)) == RTX_AUTOINC)
     x = XEXP (x, 0);
 
   /* If either argument is a constant, then modifying X can not affect IN.  */
Index: gcc/reload1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/reload1.c,v
retrieving revision 1.430
diff -u -r1.430 reload1.c
--- gcc/reload1.c	25 Feb 2004 12:42:26 -0000	1.430
+++ gcc/reload1.c	1 Mar 2004 09:20:17 -0000
@@ -7512,7 +7512,7 @@
 #endif
 
   /* If IN is a simple operand, use gen_move_insn.  */
-  else if (GET_RTX_CLASS (GET_CODE (in)) == 'o' || GET_CODE (in) == SUBREG)
+  else if (OBJECT_P (in) || GET_CODE (in) == SUBREG)
     emit_insn (gen_move_insn (out, in));
 
 #ifdef HAVE_reload_load_address
@@ -7779,7 +7779,7 @@
       code = GET_CODE (prev);
       if (code == CODE_LABEL || code == JUMP_INSN)
 	return;
-      if (GET_RTX_CLASS (code) != 'i')
+      if (!INSN_P (prev))
 	continue;
       if (reg_set_p (x, PATTERN (prev)))
 	break;
Index: gcc/rtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtl.c,v
retrieving revision 1.134
diff -u -r1.134 rtl.c
--- gcc/rtl.c	27 Feb 2004 07:09:43 -0000	1.134
+++ gcc/rtl.c	1 Mar 2004 09:20:17 -0000
@@ -90,7 +90,7 @@
 /* Indexed by rtx code, gives a character representing the "class" of
    that rtx code.  See rtl.def for documentation on the defined classes.  */
 
-const char rtx_class[NUM_RTX_CODE] = {
+const enum rtx_class rtx_class[NUM_RTX_CODE] = {
 #define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS)   CLASS,
 #include "rtl.def"		/* rtl expressions are defined here */
 #undef DEF_RTL_EXPR
@@ -260,7 +260,7 @@
   RTX_FLAG (copy, used) = 0;
 
   /* We do not copy FRAME_RELATED for INSNs.  */
-  if (GET_RTX_CLASS (code) == 'i')
+  if (INSN_P (orig))
     RTX_FLAG (copy, frame_related) = 0;
   RTX_FLAG (copy, jump) = RTX_FLAG (orig, jump);
   RTX_FLAG (copy, call) = RTX_FLAG (orig, call);
Index: gcc/rtl.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtl.def,v
retrieving revision 1.79
diff -u -r1.79 rtl.def
--- gcc/rtl.def	6 Feb 2004 20:03:43 -0000	1.79
+++ gcc/rtl.def	1 Mar 2004 09:20:17 -0000
@@ -46,18 +46,33 @@
    4.  The class of the rtx.  These are stored in rtx_class and are accessed
    via the GET_RTX_CLASS macro.  They are defined as follows:
 
-     "o" an rtx code that can be used to represent an object (e.g, REG, MEM)
-     "<" an rtx code for a comparison (e.g, EQ, NE, LT)
-     "1" an rtx code for a unary arithmetic expression (e.g, NEG, NOT)
-     "c" an rtx code for a commutative binary operation (e.g,, PLUS, MULT)
-     "3" an rtx code for a non-bitfield three input operation (IF_THEN_ELSE)
-     "2" an rtx code for a non-commutative binary operation (e.g., MINUS, DIV)
-     "b" an rtx code for a bit-field operation (ZERO_EXTRACT, SIGN_EXTRACT)
-     "i" an rtx code for a machine insn (INSN, JUMP_INSN, CALL_INSN)
-     "m" an rtx code for something that matches in insns (e.g, MATCH_DUP)
-     "g" an rtx code for grouping insns together (e.g, GROUP_PARALLEL)
-     "a" an rtx code for autoincrement addressing modes (e.g. POST_DEC)
-     "x" everything else
+     RTX_CONST_OBJ
+         an rtx code that can be used to represent a constant object
+         (e.g, CONST_INT)
+     RTX_OBJ
+         an rtx code that can be used to represent an object (e.g, REG, MEM)
+     RTX_COMPARE
+         an rtx code for a comparison (e.g, LT, GT)
+     RTX_COMM_COMPARE
+         an rtx code for a commutative comparison (e.g, EQ, NE, ORDERED)
+     RTX_UNARY
+         an rtx code for a unary arithmetic expression (e.g, NEG, NOT)
+     RTX_COMM_ARITH
+         an rtx code for a commutative binary operation (e.g,, PLUS, MULT)
+     RTX_TERNARY
+         an rtx code for a non-bitfield three input operation (IF_THEN_ELSE)
+     RTX_BIN_ARITH
+         an rtx code for a non-commutative binary operation (e.g., MINUS, DIV)
+     RTX_BITFIELD_OPS
+         an rtx code for a bit-field operation (ZERO_EXTRACT, SIGN_EXTRACT)
+     RTX_INSN
+         an rtx code for a machine insn (INSN, JUMP_INSN, CALL_INSN)
+     RTX_MATCH
+         an rtx code for something that matches in insns (e.g, MATCH_DUP)
+     RTX_AUTOINC
+         an rtx code for autoincrement addressing modes (e.g. POST_DEC)
+     RTX_EXTRA
+         everything else
      
    */
 
@@ -67,27 +82,27 @@
    --------------------------------------------------------------------- */
 
 /* an expression code name unknown to the reader */
-DEF_RTL_EXPR(UNKNOWN, "UnKnown", "*", 'x')
+DEF_RTL_EXPR(UNKNOWN, "UnKnown", "*", RTX_EXTRA)
 
 /* (NIL) is used by rtl reader and printer to represent a null pointer.  */
 
-DEF_RTL_EXPR(NIL, "nil", "*", 'x')
+DEF_RTL_EXPR(NIL, "nil", "*", RTX_EXTRA)
 
 
 /* include a file */
 
-DEF_RTL_EXPR(INCLUDE, "include", "s", 'x')
+DEF_RTL_EXPR(INCLUDE, "include", "s", RTX_EXTRA)
 
 /* ---------------------------------------------------------------------
    Expressions used in constructing lists.
    --------------------------------------------------------------------- */
 
 /* a linked list of expressions */
-DEF_RTL_EXPR(EXPR_LIST, "expr_list", "ee", 'x')
+DEF_RTL_EXPR(EXPR_LIST, "expr_list", "ee", RTX_EXTRA)
 
 /* a linked list of instructions.
    The insns are represented in print by their uids.  */
-DEF_RTL_EXPR(INSN_LIST, "insn_list", "ue", 'x')
+DEF_RTL_EXPR(INSN_LIST, "insn_list", "ue", RTX_EXTRA)
 
 /* ----------------------------------------------------------------------
    Expression types for machine descriptions.
@@ -126,19 +141,19 @@
    There must be a 1 to 1 correspondence between these sets of classes in
    all operands for an instruction.
    */
-DEF_RTL_EXPR(MATCH_OPERAND, "match_operand", "iss", 'm')
+DEF_RTL_EXPR(MATCH_OPERAND, "match_operand", "iss", RTX_MATCH)
 
 /* Appears only in machine descriptions.
    Means match a SCRATCH or a register.  When used to generate rtl, a
    SCRATCH is generated.  As for MATCH_OPERAND, the mode specifies
    the desired mode and the first argument is the operand number.
    The second argument is the constraint.  */
-DEF_RTL_EXPR(MATCH_SCRATCH, "match_scratch", "is", 'm')
+DEF_RTL_EXPR(MATCH_SCRATCH, "match_scratch", "is", RTX_MATCH)
 
 /* Appears only in machine descriptions.
    Means match only something equal to what is stored in the operand table
    at the index specified by the argument.  */
-DEF_RTL_EXPR(MATCH_DUP, "match_dup", "i", 'm')
+DEF_RTL_EXPR(MATCH_DUP, "match_dup", "i", RTX_MATCH)
 
 /* Appears only in machine descriptions.
    Means apply a predicate, AND match recursively the operands of the rtx.
@@ -146,7 +161,7 @@
    Operand 1 is a predicate to apply (as a string, a function name).
    Operand 2 is a vector of expressions, each of which must match
    one subexpression of the rtx this construct is matching.  */
-DEF_RTL_EXPR(MATCH_OPERATOR, "match_operator", "isE", 'm')
+DEF_RTL_EXPR(MATCH_OPERATOR, "match_operator", "isE", RTX_MATCH)
 
 /* Appears only in machine descriptions.
    Means to match a PARALLEL of arbitrary length.  The predicate is applied
@@ -155,22 +170,22 @@
    Operand 1 is a predicate to apply to the PARALLEL.
    Operand 2 is a vector of expressions, each of which must match the 
    corresponding element in the PARALLEL.  */
-DEF_RTL_EXPR(MATCH_PARALLEL, "match_parallel", "isE", 'm')
+DEF_RTL_EXPR(MATCH_PARALLEL, "match_parallel", "isE", RTX_MATCH)
 
 /* Appears only in machine descriptions.
    Means match only something equal to what is stored in the operand table
    at the index specified by the argument.  For MATCH_OPERATOR.  */
-DEF_RTL_EXPR(MATCH_OP_DUP, "match_op_dup", "iE", 'm')
+DEF_RTL_EXPR(MATCH_OP_DUP, "match_op_dup", "iE", RTX_MATCH)
 
 /* Appears only in machine descriptions.
    Means match only something equal to what is stored in the operand table
    at the index specified by the argument.  For MATCH_PARALLEL.  */
-DEF_RTL_EXPR(MATCH_PAR_DUP, "match_par_dup", "iE", 'm')
+DEF_RTL_EXPR(MATCH_PAR_DUP, "match_par_dup", "iE", RTX_MATCH)
 
 /* Appears only in machine descriptions.
    Operand 0 is the operand number, as in match_operand.
    Operand 1 is the predicate to apply to the insn.  */
-DEF_RTL_EXPR(MATCH_INSN, "match_insn", "is", 'm')
+DEF_RTL_EXPR(MATCH_INSN, "match_insn", "is", RTX_MATCH)
 
 /* Appears only in machine descriptions.
    Defines the pattern for one kind of instruction.
@@ -189,7 +204,7 @@
       template to use.
    4: optionally, a vector of attributes for this insn.
      */
-DEF_RTL_EXPR(DEFINE_INSN, "define_insn", "sEsTV", 'x')
+DEF_RTL_EXPR(DEFINE_INSN, "define_insn", "sEsTV", RTX_EXTRA)
 
 /* Definition of a peephole optimization.
    1st operand: vector of insn patterns to match
@@ -197,7 +212,7 @@
    3rd operand: template or C code to produce assembler output.
    4: optionally, a vector of attributes for this insn.
      */
-DEF_RTL_EXPR(DEFINE_PEEPHOLE, "define_peephole", "EsTV", 'x')
+DEF_RTL_EXPR(DEFINE_PEEPHOLE, "define_peephole", "EsTV", RTX_EXTRA)
 
 /* Definition of a split operation.
    1st operand: insn pattern to match
@@ -208,7 +223,7 @@
 	elements of `recog_data.operand' for use by the vector of
 	insn-patterns.
 	(`operands' is an alias here for `recog_data.operand').  */
-DEF_RTL_EXPR(DEFINE_SPLIT, "define_split", "EsES", 'x')
+DEF_RTL_EXPR(DEFINE_SPLIT, "define_split", "EsES", RTX_EXTRA)
 
 /* Definition of an insn and associated split.
    This is the concatenation, with a few modifications, of a define_insn
@@ -236,15 +251,15 @@
 	insn-patterns.
 	(`operands' is an alias here for `recog_data.operand').  
    7: optionally, a vector of attributes for this insn.  */
-DEF_RTL_EXPR(DEFINE_INSN_AND_SPLIT, "define_insn_and_split", "sEsTsESV", 'x')
+DEF_RTL_EXPR(DEFINE_INSN_AND_SPLIT, "define_insn_and_split", "sEsTsESV", RTX_EXTRA)
 
 /* Definition of an RTL peephole operation.
    Follows the same arguments as define_split.  */
-DEF_RTL_EXPR(DEFINE_PEEPHOLE2, "define_peephole2", "EsES", 'x')
+DEF_RTL_EXPR(DEFINE_PEEPHOLE2, "define_peephole2", "EsES", RTX_EXTRA)
 
 /* Definition of a combiner pattern.
    Operands not defined yet.  */
-DEF_RTL_EXPR(DEFINE_COMBINE, "define_combine", "Ess", 'x')
+DEF_RTL_EXPR(DEFINE_COMBINE, "define_combine", "Ess", RTX_EXTRA)
 
 /* Define how to generate multiple insns for a standard insn name.
    1st operand: the insn name.
@@ -257,7 +272,7 @@
 	elements of `recog_data.operand' for use by the vector of
 	insn-patterns.
 	(`operands' is an alias here for `recog_data.operand').  */
-DEF_RTL_EXPR(DEFINE_EXPAND, "define_expand", "sEss", 'x')
+DEF_RTL_EXPR(DEFINE_EXPAND, "define_expand", "sEss", RTX_EXTRA)
    
 /* Define a requirement for delay slots.
    1st operand: Condition involving insn attributes that, if true,
@@ -273,7 +288,7 @@
 
    Multiple DEFINE_DELAYs may be present.  They indicate differing
    requirements for delay slots.  */
-DEF_RTL_EXPR(DEFINE_DELAY, "define_delay", "eE", 'x')
+DEF_RTL_EXPR(DEFINE_DELAY, "define_delay", "eE", RTX_EXTRA)
 
 /* Define a set of insns that requires a function unit.  This means that
    these insns produce their result after a delay and that there may be
@@ -314,10 +329,10 @@
 		the insn can be immediately scheduled (subject to the limit
 		on the number of simultaneous operations executing on the
 		unit.)  */
-DEF_RTL_EXPR(DEFINE_FUNCTION_UNIT, "define_function_unit", "siieiiV", 'x')
+DEF_RTL_EXPR(DEFINE_FUNCTION_UNIT, "define_function_unit", "siieiiV", RTX_EXTRA)
 
 /* Define attribute computation for `asm' instructions.  */
-DEF_RTL_EXPR(DEFINE_ASM_ATTRIBUTES, "define_asm_attributes", "V", 'x' )
+DEF_RTL_EXPR(DEFINE_ASM_ATTRIBUTES, "define_asm_attributes", "V", RTX_EXTRA)
 
 /* Definition of a conditional execution meta operation.  Automatically
    generates new instances of DEFINE_INSN, selected by having attribute
@@ -330,16 +345,16 @@
    1: A C expression giving an additional condition for recognizing
       the generated pattern.
    2: A template or C code to produce assembler output.  */
-DEF_RTL_EXPR(DEFINE_COND_EXEC, "define_cond_exec", "Ess", 'x')
+DEF_RTL_EXPR(DEFINE_COND_EXEC, "define_cond_exec", "Ess", RTX_EXTRA)
 
 /* SEQUENCE appears in the result of a `gen_...' function
    for a DEFINE_EXPAND that wants to make several insns.
    Its elements are the bodies of the insns that should be made.
    `emit_insn' takes the SEQUENCE apart and makes separate insns.  */
-DEF_RTL_EXPR(SEQUENCE, "sequence", "E", 'x')
+DEF_RTL_EXPR(SEQUENCE, "sequence", "E", RTX_EXTRA)
 
 /* Refers to the address of its argument.  This is only used in alias.c.  */
-DEF_RTL_EXPR(ADDRESS, "address", "e", 'm')
+DEF_RTL_EXPR(ADDRESS, "address", "e", RTX_MATCH)
 
 /* ----------------------------------------------------------------------
    Constructions for CPU pipeline description described by NDFAs.
@@ -355,12 +370,12 @@
    All define_reservations, define_cpu_units, and
    define_query_cpu_units should have unique names which may not be
    "nothing".  */
-DEF_RTL_EXPR(DEFINE_CPU_UNIT, "define_cpu_unit", "sS", 'x')
+DEF_RTL_EXPR(DEFINE_CPU_UNIT, "define_cpu_unit", "sS", RTX_EXTRA)
 
 /* (define_query_cpu_unit string [string]) describes cpu functional
    units analogously to define_cpu_unit.  The reservation of such
    units can be queried for automaton state.  */
-DEF_RTL_EXPR(DEFINE_QUERY_CPU_UNIT, "define_query_cpu_unit", "sS", 'x')
+DEF_RTL_EXPR(DEFINE_QUERY_CPU_UNIT, "define_query_cpu_unit", "sS", RTX_EXTRA)
 
 /* (exclusion_set string string) means that each CPU functional unit
    in the first string can not be reserved simultaneously with any
@@ -370,7 +385,7 @@
    unit which can execute simultaneously only single floating point
    insns or only double floating point insns.  All CPU functional
    units in a set should belong to the same automaton.  */
-DEF_RTL_EXPR(EXCLUSION_SET, "exclusion_set", "ss", 'x')
+DEF_RTL_EXPR(EXCLUSION_SET, "exclusion_set", "ss", RTX_EXTRA)
 
 /* (presence_set string string) means that each CPU functional unit in
    the first string can not be reserved unless at least one of pattern
@@ -392,7 +407,7 @@
 
    All CPU functional units in a set should belong to the same
    automaton.  */
-DEF_RTL_EXPR(PRESENCE_SET, "presence_set", "ss", 'x')
+DEF_RTL_EXPR(PRESENCE_SET, "presence_set", "ss", RTX_EXTRA)
 
 /* (final_presence_set string string) is analogous to `presence_set'.
    The difference between them is when checking is done.  When an
@@ -413,7 +428,7 @@
       (define_reservation "insn_and_nop" "slot0 + slot1")
 
    but it can be issued if we use analogous `final_presence_set'.  */
-DEF_RTL_EXPR(FINAL_PRESENCE_SET, "final_presence_set", "ss", 'x')
+DEF_RTL_EXPR(FINAL_PRESENCE_SET, "final_presence_set", "ss", RTX_EXTRA)
 
 /* (absence_set string string) means that each CPU functional unit in
    the first string can be reserved only if each pattern of units
@@ -436,12 +451,12 @@
 
    All CPU functional units in a set should to belong the same
    automaton.  */
-DEF_RTL_EXPR(ABSENCE_SET, "absence_set", "ss", 'x')
+DEF_RTL_EXPR(ABSENCE_SET, "absence_set", "ss", RTX_EXTRA)
 
 /* (final_absence_set string string) is analogous to `absence_set' but
    checking is done on the result (state) reservation.  See comments
    for `final_presence_set'.  */
-DEF_RTL_EXPR(FINAL_ABSENCE_SET, "final_absence_set", "ss", 'x')
+DEF_RTL_EXPR(FINAL_ABSENCE_SET, "final_absence_set", "ss", RTX_EXTRA)
 
 /* (define_bypass number out_insn_names in_insn_names) names bypass
    with given latency (the first number) from insns given by the first
@@ -452,7 +467,7 @@
    parameters.  If the function returns zero the bypass will be
    ignored for this case.  Additional guard is necessary to recognize
    complicated bypasses, e.g. when consumer is load address.  */
-DEF_RTL_EXPR(DEFINE_BYPASS, "define_bypass", "issS", 'x')
+DEF_RTL_EXPR(DEFINE_BYPASS, "define_bypass", "issS", RTX_EXTRA)
 
 /* (define_automaton string) describes names of automata generated and
    used for pipeline hazards recognition.  The names are separated by
@@ -461,7 +476,7 @@
    automata, the summary size of the automata usually is less than the
    single one.  The automaton name is used in define_cpu_unit and
    define_query_cpu_unit.  All automata should have unique names.  */
-DEF_RTL_EXPR(DEFINE_AUTOMATON, "define_automaton", "s", 'x')
+DEF_RTL_EXPR(DEFINE_AUTOMATON, "define_automaton", "s", RTX_EXTRA)
 
 /* (automata_option string) describes option for generation of
    automata.  Currently there are the following options:
@@ -484,7 +499,7 @@
 
    o "progress" which means output of a progress bar showing how many
      states were generated so far for automaton being processed.  */
-DEF_RTL_EXPR(AUTOMATA_OPTION, "automata_option", "s", 'x')
+DEF_RTL_EXPR(AUTOMATA_OPTION, "automata_option", "s", RTX_EXTRA)
 
 /* (define_reservation string string) names reservation (the first
    string) of cpu functional units (the 2nd string).  Sometimes unit
@@ -493,7 +508,7 @@
    parameter) in regular expression in define_insn_reservation.  All
    define_reservations, define_cpu_units, and define_query_cpu_units
    should have unique names which may not be "nothing".  */
-DEF_RTL_EXPR(DEFINE_RESERVATION, "define_reservation", "ss", 'x')
+DEF_RTL_EXPR(DEFINE_RESERVATION, "define_reservation", "ss", RTX_EXTRA)
 
 /* (define_insn_reservation name default_latency condition regexpr)
    describes reservation of cpu functional units (the 3nd operand) for
@@ -541,7 +556,7 @@
 
        7. string "nothing" means no units reservation.  */
 
-DEF_RTL_EXPR(DEFINE_INSN_RESERVATION, "define_insn_reservation", "sies", 'x')
+DEF_RTL_EXPR(DEFINE_INSN_RESERVATION, "define_insn_reservation", "sies", RTX_EXTRA)
 
 /* ----------------------------------------------------------------------
    Expressions used for insn attributes.  These also do not appear in
@@ -552,10 +567,10 @@
    1st operand: name of the attribute
    2nd operand: comma-separated list of possible attribute values
    3rd operand: expression for the default value of the attribute.  */
-DEF_RTL_EXPR(DEFINE_ATTR, "define_attr", "sse", 'x')
+DEF_RTL_EXPR(DEFINE_ATTR, "define_attr", "sse", RTX_EXTRA)
 
 /* Marker for the name of an attribute.  */
-DEF_RTL_EXPR(ATTR, "attr", "s", 'x')
+DEF_RTL_EXPR(ATTR, "attr", "s", RTX_EXTRA)
 
 /* For use in the last (optional) operand of DEFINE_INSN or DEFINE_PEEPHOLE and
    in DEFINE_ASM_INSN to specify an attribute to assign to insns matching that
@@ -563,7 +578,7 @@
 
    (set_attr "name" "value") is equivalent to
    (set (attr "name") (const_string "value"))  */
-DEF_RTL_EXPR(SET_ATTR, "set_attr", "ss", 'x')
+DEF_RTL_EXPR(SET_ATTR, "set_attr", "ss", RTX_EXTRA)
 
 /* In the last operand of DEFINE_INSN and DEFINE_PEEPHOLE, this can be used to
    specify that attribute values are to be assigned according to the
@@ -578,16 +593,16 @@
 				 (const_string "a3")])
    (set_attr "att" "a1,a2,a3")
  */
-DEF_RTL_EXPR(SET_ATTR_ALTERNATIVE, "set_attr_alternative", "sE", 'x')
+DEF_RTL_EXPR(SET_ATTR_ALTERNATIVE, "set_attr_alternative", "sE", RTX_EXTRA)
 
 /* A conditional expression true if the value of the specified attribute of
    the current insn equals the specified value.  The first operand is the
    attribute name and the second is the comparison value.  */
-DEF_RTL_EXPR(EQ_ATTR, "eq_attr", "ss", 'x')
+DEF_RTL_EXPR(EQ_ATTR, "eq_attr", "ss", RTX_EXTRA)
 
 /* A special case of the above representing a set of alternatives.  The first
    operand is bitmap of the set, the second one is the default value.  */
-DEF_RTL_EXPR(EQ_ATTR_ALT, "eq_attr_alt", "ii", 'x')
+DEF_RTL_EXPR(EQ_ATTR_ALT, "eq_attr_alt", "ii", RTX_EXTRA)
 
 /* A conditional expression which is true if the specified flag is
    true for the insn being scheduled in reorg.
@@ -597,7 +612,7 @@
 
    forward, backward, very_likely, likely, very_unlikely, and unlikely.  */
 
-DEF_RTL_EXPR (ATTR_FLAG, "attr_flag", "s", 'x')
+DEF_RTL_EXPR (ATTR_FLAG, "attr_flag", "s", RTX_EXTRA)
 
 /* ----------------------------------------------------------------------
    Expression types used for things in the instruction chain.
@@ -610,21 +625,21 @@
    ---------------------------------------------------------------------- */
 
 /* An instruction that cannot jump.  */
-DEF_RTL_EXPR(INSN, "insn", "iuuBieiee", 'i')
+DEF_RTL_EXPR(INSN, "insn", "iuuBieiee", RTX_INSN)
 
 /* An instruction that can possibly jump.
    Fields ( rtx->u.fld[] ) have exact same meaning as INSN's.  */
-DEF_RTL_EXPR(JUMP_INSN, "jump_insn", "iuuBieiee0", 'i')
+DEF_RTL_EXPR(JUMP_INSN, "jump_insn", "iuuBieiee0", RTX_INSN)
 
 /* An instruction that can possibly call a subroutine
    but which will not change which instruction comes next
    in the current function.
    Field ( rtx->u.fld[9] ) is CALL_INSN_FUNCTION_USAGE.
    All other fields ( rtx->u.fld[] ) have exact same meaning as INSN's.  */
-DEF_RTL_EXPR(CALL_INSN, "call_insn", "iuuBieieee", 'i')
+DEF_RTL_EXPR(CALL_INSN, "call_insn", "iuuBieieee", RTX_INSN)
 
 /* A marker that indicates that control will not flow through.  */
-DEF_RTL_EXPR(BARRIER, "barrier", "iuu000000", 'x')
+DEF_RTL_EXPR(BARRIER, "barrier", "iuu000000", RTX_EXTRA)
 
 /* Holds a label that is followed by instructions.
    Operand:
@@ -632,14 +647,14 @@
    5: is used in flow.c to point to the chain of label_ref's to this label.
    6: is a number that is unique in the entire compilation.
    7: is the user-given name of the label, if any.  */
-DEF_RTL_EXPR(CODE_LABEL, "code_label", "iuuB00is", 'x')
+DEF_RTL_EXPR(CODE_LABEL, "code_label", "iuuB00is", RTX_EXTRA)
 
 /* Say where in the code a source line starts, for symbol table's sake.
    Operand:
    4: filename, if line number > 0, note-specific data otherwise.
    5: line number if > 0, enum note_insn otherwise.
    6: unique number if line number == note_insn_deleted_label.  */
-DEF_RTL_EXPR(NOTE, "note", "iuuB0ni", 'x')
+DEF_RTL_EXPR(NOTE, "note", "iuuB0ni", RTX_EXTRA)
 
 /* ----------------------------------------------------------------------
    Top level constituents of INSN, JUMP_INSN and CALL_INSN.
@@ -652,10 +667,10 @@
    Semantics are that there are no side effects if the condition
    is false.  This pattern is created automatically by the if_convert
    pass run after reload or by target-specific splitters.  */
-DEF_RTL_EXPR(COND_EXEC, "cond_exec", "ee", 'x')
+DEF_RTL_EXPR(COND_EXEC, "cond_exec", "ee", RTX_EXTRA)
 
 /* Several operations to be done in parallel (perhaps under COND_EXEC).  */
-DEF_RTL_EXPR(PARALLEL, "parallel", "E", 'x')
+DEF_RTL_EXPR(PARALLEL, "parallel", "E", RTX_EXTRA)
 
 /* A string that is passed through to the assembler as input.
      One can obviously pass comments through by using the
@@ -663,7 +678,7 @@
      These occur in an insn all by themselves as the PATTERN.
      They also appear inside an ASM_OPERANDS
      as a convenient way to hold a string.  */
-DEF_RTL_EXPR(ASM_INPUT, "asm_input", "s", 'x')
+DEF_RTL_EXPR(ASM_INPUT, "asm_input", "s", RTX_EXTRA)
 
 /* An assembler instruction with operands.
    1st operand is the instruction template.
@@ -677,7 +692,7 @@
      and whose mode indicates the mode of the input operand.
    6th is the name of the containing source file.
    7th is the source line number.  */
-DEF_RTL_EXPR(ASM_OPERANDS, "asm_operands", "ssiEEsi", 'x')
+DEF_RTL_EXPR(ASM_OPERANDS, "asm_operands", "ssiEEsi", RTX_EXTRA)
 
 /* A machine-specific operation.
    1st operand is a vector of operands being used by the operation so that
@@ -688,14 +703,14 @@
    genrecog.c record positions within an insn.)
    This can occur all by itself in a PATTERN, as a component of a PARALLEL,
    or inside an expression.  */
-DEF_RTL_EXPR(UNSPEC, "unspec", "Ei", 'x')
+DEF_RTL_EXPR(UNSPEC, "unspec", "Ei", RTX_EXTRA)
 
 /* Similar, but a volatile operation and one which may trap.  */
-DEF_RTL_EXPR(UNSPEC_VOLATILE, "unspec_volatile", "Ei", 'x')
+DEF_RTL_EXPR(UNSPEC_VOLATILE, "unspec_volatile", "Ei", RTX_EXTRA)
 
 /* Vector of addresses, stored as full words.  */
 /* Each element is a LABEL_REF to a CODE_LABEL whose address we want.  */
-DEF_RTL_EXPR(ADDR_VEC, "addr_vec", "E", 'x')
+DEF_RTL_EXPR(ADDR_VEC, "addr_vec", "E", RTX_EXTRA)
 
 /* Vector of address differences X0 - BASE, X1 - BASE, ...
    First operand is BASE; the vector contains the X's.
@@ -720,7 +735,7 @@
    CASE_VECTOR_SHORTEN_MODE is defined, and only in an optimizing
    compilations.  */
      
-DEF_RTL_EXPR(ADDR_DIFF_VEC, "addr_diff_vec", "eEee0", 'x')
+DEF_RTL_EXPR(ADDR_DIFF_VEC, "addr_diff_vec", "eEee0", RTX_EXTRA)
 
 /* Memory prefetch, with attributes supported on some targets.
    Operand 1 is the address of the memory to fetch.
@@ -731,7 +746,7 @@
 
    The attributes specified by operands 2 and 3 are ignored for targets
    whose prefetch instructions do not support them.  */
-DEF_RTL_EXPR(PREFETCH, "prefetch", "eee", 'x')
+DEF_RTL_EXPR(PREFETCH, "prefetch", "eee", RTX_EXTRA)
 
 /* ----------------------------------------------------------------------
    At the top level of an instruction (perhaps under PARALLEL).
@@ -743,69 +758,69 @@
    ALL assignment must use SET.
    Instructions that do multiple assignments must use multiple SET,
    under PARALLEL.  */
-DEF_RTL_EXPR(SET, "set", "ee", 'x')
+DEF_RTL_EXPR(SET, "set", "ee", RTX_EXTRA)
 
 /* Indicate something is used in a way that we don't want to explain.
    For example, subroutine calls will use the register
    in which the static chain is passed.  */
-DEF_RTL_EXPR(USE, "use", "e", 'x')
+DEF_RTL_EXPR(USE, "use", "e", RTX_EXTRA)
 
 /* Indicate something is clobbered in a way that we don't want to explain.
    For example, subroutine calls will clobber some physical registers
    (the ones that are by convention not saved).  */
-DEF_RTL_EXPR(CLOBBER, "clobber", "e", 'x')
+DEF_RTL_EXPR(CLOBBER, "clobber", "e", RTX_EXTRA)
 
 /* Call a subroutine.
    Operand 1 is the address to call.
    Operand 2 is the number of arguments.  */
 
-DEF_RTL_EXPR(CALL, "call", "ee", 'x')
+DEF_RTL_EXPR(CALL, "call", "ee", RTX_EXTRA)
 
 /* Return from a subroutine.  */
 
-DEF_RTL_EXPR(RETURN, "return", "", 'x')
+DEF_RTL_EXPR(RETURN, "return", "", RTX_EXTRA)
 
 /* Conditional trap.
    Operand 1 is the condition.
    Operand 2 is the trap code.
    For an unconditional trap, make the condition (const_int 1).  */
-DEF_RTL_EXPR(TRAP_IF, "trap_if", "ee", 'x')
+DEF_RTL_EXPR(TRAP_IF, "trap_if", "ee", RTX_EXTRA)
 
 /* Placeholder for _Unwind_Resume before we know if a function call
    or a branch is needed.  Operand 1 is the exception region from
    which control is flowing.  */
-DEF_RTL_EXPR(RESX, "resx", "i", 'x')
+DEF_RTL_EXPR(RESX, "resx", "i", RTX_EXTRA)
 
 /* ----------------------------------------------------------------------
    Primitive values for use in expressions.
    ---------------------------------------------------------------------- */
 
 /* numeric integer constant */
-DEF_RTL_EXPR(CONST_INT, "const_int", "w", 'o')
+DEF_RTL_EXPR(CONST_INT, "const_int", "w", RTX_CONST_OBJ)
 
 /* numeric floating point constant.
    Operands hold the value.  They are all 'w' and there may be from 2 to 6;
    see real.h.  */
-DEF_RTL_EXPR(CONST_DOUBLE, "const_double", CONST_DOUBLE_FORMAT, 'o')
+DEF_RTL_EXPR(CONST_DOUBLE, "const_double", CONST_DOUBLE_FORMAT, RTX_CONST_OBJ)
 
 /* Describes a vector constant.  */
-DEF_RTL_EXPR(CONST_VECTOR, "const_vector", "E", 'x')
+DEF_RTL_EXPR(CONST_VECTOR, "const_vector", "E", RTX_EXTRA)
 
 /* String constant.  Used only for attributes right now.  */
-DEF_RTL_EXPR(CONST_STRING, "const_string", "s", 'o')
+DEF_RTL_EXPR(CONST_STRING, "const_string", "s", RTX_OBJ)
 
 /* This is used to encapsulate an expression whose value is constant
    (such as the sum of a SYMBOL_REF and a CONST_INT) so that it will be
    recognized as a constant operand rather than by arithmetic instructions.  */
 
-DEF_RTL_EXPR(CONST, "const", "e", 'o')
+DEF_RTL_EXPR(CONST, "const", "e", RTX_CONST_OBJ)
 
 /* program counter.  Ordinary jumps are represented
    by a SET whose first operand is (PC).  */
-DEF_RTL_EXPR(PC, "pc", "", 'o')
+DEF_RTL_EXPR(PC, "pc", "", RTX_OBJ)
 
 /* Used in the cselib routines to describe a value.  */
-DEF_RTL_EXPR(VALUE, "value", "0", 'o')
+DEF_RTL_EXPR(VALUE, "value", "0", RTX_OBJ)
 
 /* A register.  The "operand" is the register number, accessed with
    the REGNO macro.  If this number is less than FIRST_PSEUDO_REGISTER
@@ -814,14 +829,14 @@
    pseudo register that got turned into a hard register.
    This rtx needs to have as many (or more) fields as a MEM, since we
    can change REG rtx's into MEMs during reload.  */
-DEF_RTL_EXPR(REG, "reg", "i00", 'o')
+DEF_RTL_EXPR(REG, "reg", "i00", RTX_OBJ)
 
 /* A scratch register.  This represents a register used only within a
    single insn.  It will be turned into a REG during register allocation
    or reload unless the constraint indicates that the register won't be
    needed, in which case it can remain a SCRATCH.  This code is
    marked as having one operand so it can be turned into a REG.  */
-DEF_RTL_EXPR(SCRATCH, "scratch", "0", 'o')
+DEF_RTL_EXPR(SCRATCH, "scratch", "0", RTX_OBJ)
 
 /* One word of a multi-word value.
    The first operand is the complete value; the second says which word.
@@ -831,7 +846,7 @@
    This is also used to refer to a value in a different machine mode.
    For example, it can be used to refer to a SImode value as if it were
    Qimode, or vice versa.  Then the word number is always 0.  */
-DEF_RTL_EXPR(SUBREG, "subreg", "ei", 'x')
+DEF_RTL_EXPR(SUBREG, "subreg", "ei", RTX_EXTRA)
 
 /* This one-argument rtx is used for move instructions
    that are guaranteed to alter only the low part of a destination.
@@ -844,38 +859,38 @@
    but the register constraints may be tighter when STRICT_LOW_PART
    is in use.  */
 
-DEF_RTL_EXPR(STRICT_LOW_PART, "strict_low_part", "e", 'x')
+DEF_RTL_EXPR(STRICT_LOW_PART, "strict_low_part", "e", RTX_EXTRA)
 
 /* (CONCAT a b) represents the virtual concatenation of a and b
    to make a value that has as many bits as a and b put together.
    This is used for complex values.  Normally it appears only
    in DECL_RTLs and during RTL generation, but not in the insn chain.  */
-DEF_RTL_EXPR(CONCAT, "concat", "ee", 'o')
+DEF_RTL_EXPR(CONCAT, "concat", "ee", RTX_OBJ)
 
 /* A memory location; operand is the address.  The second operand is the
    alias set to which this MEM belongs.  We use `0' instead of `w' for this
    field so that the field need not be specified in machine descriptions.  */
-DEF_RTL_EXPR(MEM, "mem", "e0", 'o')
+DEF_RTL_EXPR(MEM, "mem", "e0", RTX_OBJ)
 
 /* Reference to an assembler label in the code for this function.
    The operand is a CODE_LABEL found in the insn chain.
    The unprinted fields 1 and 2 are used in flow.c for the
    LABEL_NEXTREF and CONTAINING_INSN.  */
-DEF_RTL_EXPR(LABEL_REF, "label_ref", "u00", 'o')
+DEF_RTL_EXPR(LABEL_REF, "label_ref", "u00", RTX_CONST_OBJ)
 
 /* Reference to a named label: 
    Operand 0: label name
    Operand 1: flags (see SYMBOL_FLAG_* in rtl.h)
    Operand 2: tree from which this symbol is derived, or null.
    This is either a DECL node, or some kind of constant.  */
-DEF_RTL_EXPR(SYMBOL_REF, "symbol_ref", "s00", 'o')
+DEF_RTL_EXPR(SYMBOL_REF, "symbol_ref", "s00", RTX_CONST_OBJ)
 
 /* The condition code register is represented, in our imagination,
    as a register holding a value that can be compared to zero.
    In fact, the machine has already compared them and recorded the
    results; but instructions that look at the condition code
    pretend to be looking at the entire value and comparing it.  */
-DEF_RTL_EXPR(CC0, "cc0", "", 'o')
+DEF_RTL_EXPR(CC0, "cc0", "", RTX_OBJ)
 
 /* Reference to the address of a register.  Removed by purge_addressof after
    CSE has elided as many as possible.
@@ -884,7 +899,7 @@
    3rd operand: the decl for the object in the register, for
      put_reg_in_stack.  */
 
-DEF_RTL_EXPR(ADDRESSOF, "addressof", "eit", 'o')
+DEF_RTL_EXPR(ADDRESSOF, "addressof", "eit", RTX_OBJ)
 
 /* =====================================================================
    A QUEUED expression really points to a member of the queue of instructions
@@ -902,7 +917,7 @@
    4. the next QUEUED expression in the queue.
    ====================================================================== */
 
-DEF_RTL_EXPR(QUEUED, "queued", "eeeee", 'x')
+DEF_RTL_EXPR(QUEUED, "queued", "eeeee", RTX_EXTRA)
 
 /* ----------------------------------------------------------------------
    Expressions for operators in an rtl pattern
@@ -914,7 +929,7 @@
      0:  condition
      1:  then expr
      2:  else expr */
-DEF_RTL_EXPR(IF_THEN_ELSE, "if_then_else", "eee", '3')
+DEF_RTL_EXPR(IF_THEN_ELSE, "if_then_else", "eee", RTX_TERNARY)
 
 /* General conditional. The first operand is a vector composed of pairs of
    expressions.  The first element of each pair is evaluated, in turn.
@@ -923,57 +938,57 @@
    true, the second operand will be used as the value of the conditional.
 
    This should be replaced with use of IF_THEN_ELSE.  */
-DEF_RTL_EXPR(COND, "cond", "Ee", 'x')
+DEF_RTL_EXPR(COND, "cond", "Ee", RTX_EXTRA)
 
 /* Comparison, produces a condition code result.  */
-DEF_RTL_EXPR(COMPARE, "compare", "ee", '2')
+DEF_RTL_EXPR(COMPARE, "compare", "ee", RTX_BIN_ARITH)
 
 /* plus */
-DEF_RTL_EXPR(PLUS, "plus", "ee", 'c')
+DEF_RTL_EXPR(PLUS, "plus", "ee", RTX_COMM_ARITH)
 
 /* Operand 0 minus operand 1.  */
-DEF_RTL_EXPR(MINUS, "minus", "ee", '2')
+DEF_RTL_EXPR(MINUS, "minus", "ee", RTX_BIN_ARITH)
 
 /* Minus operand 0.  */
-DEF_RTL_EXPR(NEG, "neg", "e", '1')
+DEF_RTL_EXPR(NEG, "neg", "e", RTX_UNARY)
 
-DEF_RTL_EXPR(MULT, "mult", "ee", 'c')
+DEF_RTL_EXPR(MULT, "mult", "ee", RTX_COMM_ARITH)
 
 /* Operand 0 divided by operand 1.  */
-DEF_RTL_EXPR(DIV, "div", "ee", '2')
+DEF_RTL_EXPR(DIV, "div", "ee", RTX_BIN_ARITH)
 /* Remainder of operand 0 divided by operand 1.  */
-DEF_RTL_EXPR(MOD, "mod", "ee", '2')
+DEF_RTL_EXPR(MOD, "mod", "ee", RTX_BIN_ARITH)
 
 /* Unsigned divide and remainder.  */
-DEF_RTL_EXPR(UDIV, "udiv", "ee", '2')
-DEF_RTL_EXPR(UMOD, "umod", "ee", '2')
+DEF_RTL_EXPR(UDIV, "udiv", "ee", RTX_BIN_ARITH)
+DEF_RTL_EXPR(UMOD, "umod", "ee", RTX_BIN_ARITH)
 
 /* Bitwise operations.  */
-DEF_RTL_EXPR(AND, "and", "ee", 'c')
+DEF_RTL_EXPR(AND, "and", "ee", RTX_COMM_ARITH)
 
-DEF_RTL_EXPR(IOR, "ior", "ee", 'c')
+DEF_RTL_EXPR(IOR, "ior", "ee", RTX_COMM_ARITH)
 
-DEF_RTL_EXPR(XOR, "xor", "ee", 'c')
+DEF_RTL_EXPR(XOR, "xor", "ee", RTX_COMM_ARITH)
 
-DEF_RTL_EXPR(NOT, "not", "e", '1')
+DEF_RTL_EXPR(NOT, "not", "e", RTX_UNARY)
 
 /* Operand:
      0:  value to be shifted.
      1:  number of bits.  */
-DEF_RTL_EXPR(ASHIFT, "ashift", "ee", '2') /* shift left */
-DEF_RTL_EXPR(ROTATE, "rotate", "ee", '2') /* rotate left */
-DEF_RTL_EXPR(ASHIFTRT, "ashiftrt", "ee", '2') /* arithmetic shift right */
-DEF_RTL_EXPR(LSHIFTRT, "lshiftrt", "ee", '2') /* logical shift right */
-DEF_RTL_EXPR(ROTATERT, "rotatert", "ee", '2') /* rotate right */
+DEF_RTL_EXPR(ASHIFT, "ashift", "ee", RTX_BIN_ARITH) /* shift left */
+DEF_RTL_EXPR(ROTATE, "rotate", "ee", RTX_BIN_ARITH) /* rotate left */
+DEF_RTL_EXPR(ASHIFTRT, "ashiftrt", "ee", RTX_BIN_ARITH) /* arithmetic shift right */
+DEF_RTL_EXPR(LSHIFTRT, "lshiftrt", "ee", RTX_BIN_ARITH) /* logical shift right */
+DEF_RTL_EXPR(ROTATERT, "rotatert", "ee", RTX_BIN_ARITH) /* rotate right */
 
 /* Minimum and maximum values of two operands.  We need both signed and
    unsigned forms.  (We cannot use MIN for SMIN because it conflicts
    with a macro of the same name.) */
 
-DEF_RTL_EXPR(SMIN, "smin", "ee", 'c')
-DEF_RTL_EXPR(SMAX, "smax", "ee", 'c')
-DEF_RTL_EXPR(UMIN, "umin", "ee", 'c')
-DEF_RTL_EXPR(UMAX, "umax", "ee", 'c')
+DEF_RTL_EXPR(SMIN, "smin", "ee", RTX_COMM_ARITH)
+DEF_RTL_EXPR(SMAX, "smax", "ee", RTX_COMM_ARITH)
+DEF_RTL_EXPR(UMIN, "umin", "ee", RTX_COMM_ARITH)
+DEF_RTL_EXPR(UMAX, "umax", "ee", RTX_COMM_ARITH)
 
 /* These unary operations are used to represent incrementation
    and decrementation as they occur in memory addresses.
@@ -982,10 +997,10 @@
    containing MEM.  These operations exist in only two cases:
    1. pushes onto the stack.
    2. created automatically by the life_analysis pass in flow.c.  */
-DEF_RTL_EXPR(PRE_DEC, "pre_dec", "e", 'a')
-DEF_RTL_EXPR(PRE_INC, "pre_inc", "e", 'a')
-DEF_RTL_EXPR(POST_DEC, "post_dec", "e", 'a')
-DEF_RTL_EXPR(POST_INC, "post_inc", "e", 'a')
+DEF_RTL_EXPR(PRE_DEC, "pre_dec", "e", RTX_AUTOINC)
+DEF_RTL_EXPR(PRE_INC, "pre_inc", "e", RTX_AUTOINC)
+DEF_RTL_EXPR(POST_DEC, "post_dec", "e", RTX_AUTOINC)
+DEF_RTL_EXPR(POST_INC, "post_inc", "e", RTX_AUTOINC)
 
 /* These binary operations are used to represent generic address
    side-effects in memory addresses, except for simple incrementation
@@ -999,53 +1014,53 @@
    form (plus (reg) (reg)) and (plus (reg) (const_int)), where
    the first operand of the PLUS has to be the same register as
    the first operand of the *_MODIFY.  */
-DEF_RTL_EXPR(PRE_MODIFY, "pre_modify", "ee", 'a')
-DEF_RTL_EXPR(POST_MODIFY, "post_modify", "ee", 'a')
+DEF_RTL_EXPR(PRE_MODIFY, "pre_modify", "ee", RTX_AUTOINC)
+DEF_RTL_EXPR(POST_MODIFY, "post_modify", "ee", RTX_AUTOINC)
 
 /* Comparison operations.  The ordered comparisons exist in two
    flavors, signed and unsigned.  */
-DEF_RTL_EXPR(NE, "ne", "ee", '<')
-DEF_RTL_EXPR(EQ, "eq", "ee", '<')
-DEF_RTL_EXPR(GE, "ge", "ee", '<')
-DEF_RTL_EXPR(GT, "gt", "ee", '<')
-DEF_RTL_EXPR(LE, "le", "ee", '<')
-DEF_RTL_EXPR(LT, "lt", "ee", '<')
-DEF_RTL_EXPR(GEU, "geu", "ee", '<')
-DEF_RTL_EXPR(GTU, "gtu", "ee", '<')
-DEF_RTL_EXPR(LEU, "leu", "ee", '<')
-DEF_RTL_EXPR(LTU, "ltu", "ee", '<')
+DEF_RTL_EXPR(NE, "ne", "ee", RTX_COMM_COMPARE)
+DEF_RTL_EXPR(EQ, "eq", "ee", RTX_COMM_COMPARE)
+DEF_RTL_EXPR(GE, "ge", "ee", RTX_COMPARE)
+DEF_RTL_EXPR(GT, "gt", "ee", RTX_COMPARE)
+DEF_RTL_EXPR(LE, "le", "ee", RTX_COMPARE)
+DEF_RTL_EXPR(LT, "lt", "ee", RTX_COMPARE)
+DEF_RTL_EXPR(GEU, "geu", "ee", RTX_COMPARE)
+DEF_RTL_EXPR(GTU, "gtu", "ee", RTX_COMPARE)
+DEF_RTL_EXPR(LEU, "leu", "ee", RTX_COMPARE)
+DEF_RTL_EXPR(LTU, "ltu", "ee", RTX_COMPARE)
 
 /* Additional floating point unordered comparison flavors.  */
-DEF_RTL_EXPR(UNORDERED, "unordered", "ee", '<')
-DEF_RTL_EXPR(ORDERED, "ordered", "ee", '<')
+DEF_RTL_EXPR(UNORDERED, "unordered", "ee", RTX_COMM_COMPARE)
+DEF_RTL_EXPR(ORDERED, "ordered", "ee", RTX_COMM_COMPARE)
 
 /* These are equivalent to unordered or ...  */
-DEF_RTL_EXPR(UNEQ, "uneq", "ee", '<')
-DEF_RTL_EXPR(UNGE, "unge", "ee", '<')
-DEF_RTL_EXPR(UNGT, "ungt", "ee", '<')
-DEF_RTL_EXPR(UNLE, "unle", "ee", '<')
-DEF_RTL_EXPR(UNLT, "unlt", "ee", '<')
+DEF_RTL_EXPR(UNEQ, "uneq", "ee", RTX_COMM_COMPARE)
+DEF_RTL_EXPR(UNGE, "unge", "ee", RTX_COMPARE)
+DEF_RTL_EXPR(UNGT, "ungt", "ee", RTX_COMPARE)
+DEF_RTL_EXPR(UNLE, "unle", "ee", RTX_COMPARE)
+DEF_RTL_EXPR(UNLT, "unlt", "ee", RTX_COMPARE)
 
 /* This is an ordered NE, ie !UNEQ, ie false for NaN.  */
-DEF_RTL_EXPR(LTGT, "ltgt", "ee", '<')
+DEF_RTL_EXPR(LTGT, "ltgt", "ee", RTX_COMM_COMPARE)
 
 /* Represents the result of sign-extending the sole operand.
    The machine modes of the operand and of the SIGN_EXTEND expression
    determine how much sign-extension is going on.  */
-DEF_RTL_EXPR(SIGN_EXTEND, "sign_extend", "e", '1')
+DEF_RTL_EXPR(SIGN_EXTEND, "sign_extend", "e", RTX_UNARY)
 
 /* Similar for zero-extension (such as unsigned short to int).  */
-DEF_RTL_EXPR(ZERO_EXTEND, "zero_extend", "e", '1')
+DEF_RTL_EXPR(ZERO_EXTEND, "zero_extend", "e", RTX_UNARY)
 
 /* Similar but here the operand has a wider mode.  */
-DEF_RTL_EXPR(TRUNCATE, "truncate", "e", '1')
+DEF_RTL_EXPR(TRUNCATE, "truncate", "e", RTX_UNARY)
 
 /* Similar for extending floating-point values (such as SFmode to DFmode).  */
-DEF_RTL_EXPR(FLOAT_EXTEND, "float_extend", "e", '1')
-DEF_RTL_EXPR(FLOAT_TRUNCATE, "float_truncate", "e", '1')
+DEF_RTL_EXPR(FLOAT_EXTEND, "float_extend", "e", RTX_UNARY)
+DEF_RTL_EXPR(FLOAT_TRUNCATE, "float_truncate", "e", RTX_UNARY)
 
 /* Conversion of fixed point operand to floating point value.  */
-DEF_RTL_EXPR(FLOAT, "float", "e", '1')
+DEF_RTL_EXPR(FLOAT, "float", "e", RTX_UNARY)
 
 /* With fixed-point machine mode:
    Conversion of floating point operand to fixed point value.
@@ -1053,38 +1068,38 @@
    With floating-point machine mode (and operand with same mode):
    Operand is rounded toward zero to produce an integer value
    represented in floating point.  */
-DEF_RTL_EXPR(FIX, "fix", "e", '1')
+DEF_RTL_EXPR(FIX, "fix", "e", RTX_UNARY)
 
 /* Conversion of unsigned fixed point operand to floating point value.  */
-DEF_RTL_EXPR(UNSIGNED_FLOAT, "unsigned_float", "e", '1')
+DEF_RTL_EXPR(UNSIGNED_FLOAT, "unsigned_float", "e", RTX_UNARY)
 
 /* With fixed-point machine mode:
    Conversion of floating point operand to *unsigned* fixed point value.
    Value is defined only when the operand's value is an integer.  */
-DEF_RTL_EXPR(UNSIGNED_FIX, "unsigned_fix", "e", '1')
+DEF_RTL_EXPR(UNSIGNED_FIX, "unsigned_fix", "e", RTX_UNARY)
 
 /* Absolute value */
-DEF_RTL_EXPR(ABS, "abs", "e", '1')
+DEF_RTL_EXPR(ABS, "abs", "e", RTX_UNARY)
 
 /* Square root */
-DEF_RTL_EXPR(SQRT, "sqrt", "e", '1')
+DEF_RTL_EXPR(SQRT, "sqrt", "e", RTX_UNARY)
 
 /* Find first bit that is set.
    Value is 1 + number of trailing zeros in the arg.,
    or 0 if arg is 0.  */
-DEF_RTL_EXPR(FFS, "ffs", "e", '1')
+DEF_RTL_EXPR(FFS, "ffs", "e", RTX_UNARY)
 
 /* Count leading zeros.  */
-DEF_RTL_EXPR(CLZ, "clz", "e", '1')
+DEF_RTL_EXPR(CLZ, "clz", "e", RTX_UNARY)
 
 /* Count trailing zeros.  */
-DEF_RTL_EXPR(CTZ, "ctz", "e", '1')
+DEF_RTL_EXPR(CTZ, "ctz", "e", RTX_UNARY)
 
 /* Population count (number of 1 bits).  */
-DEF_RTL_EXPR(POPCOUNT, "popcount", "e", '1')
+DEF_RTL_EXPR(POPCOUNT, "popcount", "e", RTX_UNARY)
 
 /* Population parity (number of 1 bits modulo 2).  */
-DEF_RTL_EXPR(PARITY, "parity", "e", '1')
+DEF_RTL_EXPR(PARITY, "parity", "e", RTX_UNARY)
 
 /* Reference to a signed bit-field of specified size and position.
    Operand 0 is the memory unit (usually SImode or QImode) which
@@ -1095,19 +1110,19 @@
    operand 2 counts from the msb of the memory unit.
    Otherwise, the first bit is the lsb and operand 2 counts from
    the lsb of the memory unit.  */
-DEF_RTL_EXPR(SIGN_EXTRACT, "sign_extract", "eee", 'b')
+DEF_RTL_EXPR(SIGN_EXTRACT, "sign_extract", "eee", RTX_BITFIELD_OPS)
 
 /* Similar for unsigned bit-field.  */
-DEF_RTL_EXPR(ZERO_EXTRACT, "zero_extract", "eee", 'b')
+DEF_RTL_EXPR(ZERO_EXTRACT, "zero_extract", "eee", RTX_BITFIELD_OPS)
 
 /* For RISC machines.  These save memory when splitting insns.  */
 
 /* HIGH are the high-order bits of a constant expression.  */
-DEF_RTL_EXPR(HIGH, "high", "e", 'o')
+DEF_RTL_EXPR(HIGH, "high", "e", RTX_CONST_OBJ)
 
 /* LO_SUM is the sum of a register and the low-order bits
    of a constant expression.  */
-DEF_RTL_EXPR(LO_SUM, "lo_sum", "ee", 'o')
+DEF_RTL_EXPR(LO_SUM, "lo_sum", "ee", RTX_OBJ)
 
 /* Header for range information.  Operand 0 is the NOTE_INSN_RANGE_BEG insn.
    Operand 1 is the NOTE_INSN_RANGE_END insn.  Operand 2 is a vector of all of
@@ -1120,7 +1135,7 @@
    is a bitmap of the registers live at the end of the range.  Operand 11 is
    marker number for the start of the range.  Operand 12 is the marker number
    for the end of the range.  */
-DEF_RTL_EXPR(RANGE_INFO, "range_info", "uuEiiiiiibbii", 'x')
+DEF_RTL_EXPR(RANGE_INFO, "range_info", "uuEiiiiiibbii", RTX_EXTRA)
 
 /* Registers that can be substituted within the range.  Operand 0 is the
    original pseudo register number.  Operand 1 will be filled in with the
@@ -1135,22 +1150,22 @@
    across.  Operand 8 is the symbol node of the variable if the register is a
    user variable.  Operand 9 is the block node that the variable is declared
    in if the register is a user variable.  */
-DEF_RTL_EXPR(RANGE_REG, "range_reg", "iiiiiiiitt", 'x')
+DEF_RTL_EXPR(RANGE_REG, "range_reg", "iiiiiiiitt", RTX_EXTRA)
 
 /* Information about a local variable's ranges.  Operand 0 is an EXPR_LIST of
    the different ranges a variable is in where it is copied to a different
    pseudo register.  Operand 1 is the block that the variable is declared in.
    Operand 2 is the number of distinct ranges.  */
-DEF_RTL_EXPR(RANGE_VAR, "range_var", "eti", 'x')
+DEF_RTL_EXPR(RANGE_VAR, "range_var", "eti", RTX_EXTRA)
 
 /* Information about the registers that are live at the current point.  Operand
    0 is the live bitmap.  Operand 1 is the original block number.  */
-DEF_RTL_EXPR(RANGE_LIVE, "range_live", "bi", 'x')
+DEF_RTL_EXPR(RANGE_LIVE, "range_live", "bi", RTX_EXTRA)
 
 /* A unary `__builtin_constant_p' expression.  These are only emitted
    during RTL generation, and then only if optimize > 0.  They are
    eliminated by the first CSE pass.  */
-DEF_RTL_EXPR(CONSTANT_P_RTX, "constant_p_rtx", "e", 'x')
+DEF_RTL_EXPR(CONSTANT_P_RTX, "constant_p_rtx", "e", RTX_EXTRA)
 
 /* A placeholder for a CALL_INSN which may be turned into a normal call,
    a sibling (tail) call or tail recursion.
@@ -1171,49 +1186,49 @@
 
    This method of tail-call elimination is intended to be replaced by
    tree-based optimizations once front-end conversions are complete.  */
-DEF_RTL_EXPR(CALL_PLACEHOLDER, "call_placeholder", "uuuu", 'x')
+DEF_RTL_EXPR(CALL_PLACEHOLDER, "call_placeholder", "uuuu", RTX_EXTRA)
 
 /* Describes a merge operation between two vector values.
    Operands 0 and 1 are the vectors to be merged, operand 2 is a bitmask
    that specifies where the parts of the result are taken from.  Set bits
    indicate operand 0, clear bits indicate operand 1.  The parts are defined
    by the mode of the vectors.  */
-DEF_RTL_EXPR(VEC_MERGE, "vec_merge", "eee", '3')
+DEF_RTL_EXPR(VEC_MERGE, "vec_merge", "eee", RTX_TERNARY)
 
 /* Describes an operation that selects parts of a vector.
    Operands 0 is the source vector, operand 1 is a PARALLEL that contains
    a CONST_INT for each of the subparts of the result vector, giving the
    number of the source subpart that should be stored into it.  */
-DEF_RTL_EXPR(VEC_SELECT, "vec_select", "ee", '2')
+DEF_RTL_EXPR(VEC_SELECT, "vec_select", "ee", RTX_BIN_ARITH)
 
 /* Describes a vector concat operation.  Operands 0 and 1 are the source
    vectors, the result is a vector that is as long as operands 0 and 1
    combined and is the concatenation of the two source vectors.  */
-DEF_RTL_EXPR(VEC_CONCAT, "vec_concat", "ee", '2')
+DEF_RTL_EXPR(VEC_CONCAT, "vec_concat", "ee", RTX_BIN_ARITH)
 
 /* Describes an operation that converts a small vector into a larger one by
    duplicating the input values.  The output vector mode must have the same
    submodes as the input vector mode, and the number of output parts must be
    an integer multiple of the number of input parts.  */
-DEF_RTL_EXPR(VEC_DUPLICATE, "vec_duplicate", "e", '1')
+DEF_RTL_EXPR(VEC_DUPLICATE, "vec_duplicate", "e", RTX_UNARY)
      
 /* Addition with signed saturation */
-DEF_RTL_EXPR(SS_PLUS, "ss_plus", "ee", 'c')
+DEF_RTL_EXPR(SS_PLUS, "ss_plus", "ee", RTX_COMM_ARITH)
 
 /* Addition with unsigned saturation */
-DEF_RTL_EXPR(US_PLUS, "us_plus", "ee", 'c')
+DEF_RTL_EXPR(US_PLUS, "us_plus", "ee", RTX_COMM_ARITH)
 
 /* Operand 0 minus operand 1, with signed saturation.  */
-DEF_RTL_EXPR(SS_MINUS, "ss_minus", "ee", '2')
+DEF_RTL_EXPR(SS_MINUS, "ss_minus", "ee", RTX_BIN_ARITH)
 
 /* Operand 0 minus operand 1, with unsigned saturation.  */
-DEF_RTL_EXPR(US_MINUS, "us_minus", "ee", '2')
+DEF_RTL_EXPR(US_MINUS, "us_minus", "ee", RTX_BIN_ARITH)
 
 /* Signed saturating truncate.  */
-DEF_RTL_EXPR(SS_TRUNCATE, "ss_truncate", "e", '1')
+DEF_RTL_EXPR(SS_TRUNCATE, "ss_truncate", "e", RTX_UNARY)
 
 /* Unsigned saturating truncate.  */
-DEF_RTL_EXPR(US_TRUNCATE, "us_truncate", "e", '1')
+DEF_RTL_EXPR(US_TRUNCATE, "us_truncate", "e", RTX_UNARY)
 
 /* Information about the variable and its location.  */
 DEF_RTL_EXPR(VAR_LOCATION, "var_location", "te", 'x')
Index: gcc/rtl.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtl.h,v
retrieving revision 1.459
diff -u -r1.459 rtl.h
--- gcc/rtl.h	27 Feb 2004 08:54:30 -0000	1.459
+++ gcc/rtl.h	1 Mar 2004 09:20:17 -0000
@@ -52,6 +52,48 @@
 #define NUM_RTX_CODE ((int) LAST_AND_UNUSED_RTX_CODE)
 				/* The cast here, saves many elsewhere.  */
 
+/* Register Transfer Language EXPRESSIONS CODE CLASSES */
+
+enum rtx_class  {
+  /* We check bit 0-1 of some rtx class codes in the predicates below.  */
+
+  /* Bit 0 = comparison if 0, arithmetic is 1
+     Bit 1 = 1 if commutative.  */
+  RTX_COMPARE,		/* 0 */
+  RTX_COMM_COMPARE,
+  RTX_BIN_ARITH,
+  RTX_COMM_ARITH,
+
+  /* Must follow the four preceding values.  */
+  RTX_UNARY,		/* 4 */
+
+  RTX_EXTRA,
+  RTX_MATCH,
+  RTX_INSN,
+
+  /* Bit 0 = 1 if constant.  */
+  RTX_OBJ,		/* 8 */
+  RTX_CONST_OBJ,
+
+  RTX_TERNARY,
+  RTX_BITFIELD_OPS,
+  RTX_AUTOINC
+};
+
+#define RTX_OBJ_MASK (~1)
+#define RTX_OBJ_RESULT (RTX_OBJ & RTX_OBJ_MASK)
+#define RTX_COMPARE_MASK (~1)
+#define RTX_COMPARE_RESULT (RTX_COMPARE & RTX_COMPARE_MASK)
+#define RTX_ARITHMETIC_MASK (~1)
+#define RTX_ARITHMETIC_RESULT (RTX_COMM_ARITH & RTX_ARITHMETIC_MASK)
+#define RTX_BINARY_MASK (~3)
+#define RTX_BINARY_RESULT (RTX_COMPARE & RTX_BINARY_MASK)
+#define RTX_COMMUTATIVE_MASK (~2)
+#define RTX_COMMUTATIVE_RESULT (RTX_COMM_COMPARE & RTX_COMMUTATIVE_MASK)
+#define RTX_NON_COMMUTATIVE_RESULT (RTX_COMPARE & RTX_COMMUTATIVE_MASK)
+#define RTX_EXPR_FIRST (RTX_COMPARE)
+#define RTX_EXPR_LAST (RTX_UNARY)
+
 extern const unsigned char rtx_length[NUM_RTX_CODE];
 #define GET_RTX_LENGTH(CODE)		(rtx_length[(int) (CODE)])
 
@@ -61,7 +103,7 @@
 extern const char * const rtx_format[NUM_RTX_CODE];
 #define GET_RTX_FORMAT(CODE)		(rtx_format[(int) (CODE)])
 
-extern const char rtx_class[NUM_RTX_CODE];
+extern const enum rtx_class rtx_class[NUM_RTX_CODE];
 #define GET_RTX_CLASS(CODE)		(rtx_class[(int) (CODE)])
 
 extern const unsigned char rtx_size[NUM_RTX_CODE];
@@ -288,15 +330,69 @@
   (JUMP_P (INSN) && (GET_CODE (PATTERN (INSN)) == ADDR_VEC || \
 		     GET_CODE (PATTERN (INSN)) == ADDR_DIFF_VEC))
 
+
+/* 1 if X is an insn.  */
+#define INSN_P(X)    \
+  (GET_RTX_CLASS (GET_CODE(X)) == RTX_INSN)
+
+/* 1 if X is a unary operator.  */
+
+#define UNARY_P(X)   \
+  (GET_RTX_CLASS (GET_CODE (X)) == RTX_UNARY)
+
+/* 1 if X is a binary operator.  */
+
+#define BINARY_P(X)   \
+  ((GET_RTX_CLASS (GET_CODE (X)) & RTX_BINARY_MASK) == RTX_BINARY_RESULT)
+
+/* 1 if X is an arithmetic operator.  */
+
+#define ARITHMETIC_P(X)   \
+  ((GET_RTX_CLASS (GET_CODE (X)) & RTX_ARITHMETIC_MASK)			\
+    == RTX_ARITHMETIC_RESULT)
+
+/* 1 if X is an arithmetic operator.  */
+
+#define COMMUTATIVE_ARITH_P(X)   \
+  (GET_RTX_CLASS (GET_CODE (X)) == RTX_COMM_ARITH)
+
+/* 1 if X is a commutative arithmetic operator or a comparison operator.
+   These two are sometimes selected together because it is possible to
+   swap the two operands.  */
+
+#define SWAPPABLE_OPERANDS_P(X)   \
+  ((1 << GET_RTX_CLASS (GET_CODE (X)))					\
+    & ((1 << RTX_COMM_ARITH) | (1 << RTX_COMM_COMPARE)			\
+       | (1 << RTX_COMPARE)))
+
+/* 1 if X is a non-commutative operator.  */
+
+#define NON_COMMUTATIVE_P(X)   \
+  ((GET_RTX_CLASS (GET_CODE (X)) & RTX_COMMUTATIVE_MASK)		\
+    == RTX_NON_COMMUTATIVE_RESULT)
+
+/* 1 if X is a commutative operator on integers.  */
+
+#define COMMUTATIVE_P(X)   \
+  ((GET_RTX_CLASS (GET_CODE (X)) & RTX_COMMUTATIVE_MASK)		\
+    == RTX_COMMUTATIVE_RESULT)
+
+/* 1 if X is a relational operator.  */
+
+#define COMPARISON_P(X)   \
+  ((GET_RTX_CLASS (GET_CODE (X)) & RTX_COMPARE_MASK) == RTX_COMPARE_RESULT)
+
 /* 1 if X is a constant value that is an integer.  */
 
 #define CONSTANT_P(X)   \
-  (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF		\
-   || GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST_DOUBLE		\
-   || GET_CODE (X) == CONST || GET_CODE (X) == HIGH			\
+  (GET_RTX_CLASS (GET_CODE (X)) == RTX_CONST_OBJ			\
    || GET_CODE (X) == CONST_VECTOR	                                \
    || GET_CODE (X) == CONSTANT_P_RTX)
 
+/* 1 if X can be used to represent an object.  */
+#define OBJECT_P(X)							\
+  ((GET_RTX_CLASS (GET_CODE (X)) & RTX_OBJ_MASK) == RTX_OBJ_RESULT)
+
 /* General accessor macros for accessing the fields of an rtx.  */
 
 #if defined ENABLE_RTL_CHECKING && (GCC_VERSION >= 2007)
@@ -554,9 +650,6 @@
 #define XC2EXP(RTX, N, C1, C2)      (RTL_CHECKC2 (RTX, N, C1, C2).rtx)
 
 /* ACCESS MACROS for particular fields of insns.  */
-
-/* Determines whether X is an insn.  */
-#define INSN_P(X)       (GET_RTX_CLASS (GET_CODE(X)) == 'i')
 
 /* Holds a unique number for each insn.
    These are not necessarily sequentially increasing.  */
Index: gcc/rtlanal.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtlanal.c,v
retrieving revision 1.182
diff -u -r1.182 rtlanal.c
--- gcc/rtlanal.c	27 Feb 2004 07:09:43 -0000	1.182
+++ gcc/rtlanal.c	1 Mar 2004 09:20:18 -0000
@@ -3031,7 +3031,6 @@
 commutative_operand_precedence (rtx op)
 {
   enum rtx_code code = GET_CODE (op);
-  char class;
   
   /* Constants always come the second operand.  Prefer "nice" constants.  */
   if (code == CONST_INT)
@@ -3039,41 +3038,52 @@
   if (code == CONST_DOUBLE)
     return -6;
   op = avoid_constant_pool_reference (op);
-  if (code == CONST_INT)
-    return -5;
-  if (code == CONST_DOUBLE)
-    return -4;
-  if (CONSTANT_P (op))
-    return -3;
-
-  /* SUBREGs of objects should come second.  */
-  if (code == SUBREG
-      && GET_RTX_CLASS (GET_CODE (SUBREG_REG (op))) == 'o')
-    return -2;
-
-  class = GET_RTX_CLASS (code);
-
-  /* Prefer operands that are themselves commutative to be first.
-     This helps to make things linear.  In particular,
-     (and (and (reg) (reg)) (not (reg))) is canonical.  */
-  if (class == 'c')
-    return 4;
-
-  /* If only one operand is a binary expression, it will be the first
-     operand.  In particular,  (plus (minus (reg) (reg)) (neg (reg)))
-     is canonical, although it will usually be further simplified.  */
-  if (class == '2')
-    return 2;
+
+  switch (GET_RTX_CLASS (code))
+    {
+    case RTX_CONST_OBJ:
+      if (code == CONST_INT)
+        return -5;
+      if (code == CONST_DOUBLE)
+        return -4;
+      return -3;
+
+    case RTX_EXTRA:
+      /* SUBREGs of objects should come second.  */
+      if (code == SUBREG && OBJECT_P (SUBREG_REG (op)))
+        return -2;
+
+      if (!CONSTANT_P (op))
+        return 0;
+      else
+	/* As for RTX_CONST_OBJ.  */
+	return -3;
+
+    case RTX_OBJ:
+      /* Complex expressions should be the first, so decrease priority
+         of objects.  */
+      return -1;
+
+    case RTX_COMM_ARITH:
+      /* Prefer operands that are themselves commutative to be first.
+         This helps to make things linear.  In particular,
+         (and (and (reg) (reg)) (not (reg))) is canonical.  */
+      return 4;
+
+    case RTX_BIN_ARITH:
+      /* If only one operand is a binary expression, it will be the first
+         operand.  In particular,  (plus (minus (reg) (reg)) (neg (reg)))
+         is canonical, although it will usually be further simplified.  */
+      return 2;
   
-  /* Then prefer NEG and NOT.  */
-  if (code == NEG || code == NOT)
-    return 1;
-
-  /* Complex expressions should be the first, so decrease priority
-     of objects.  */
-  if (GET_RTX_CLASS (code) == 'o')
-    return -1;
-  return 0;
+    case RTX_UNARY:
+      /* Then prefer NEG and NOT.  */
+      if (code == NEG || code == NOT)
+        return 1;
+
+    default:
+      return 0;
+    }
 }
 
 /* Return 1 iff it is necessary to swap operands of commutative operation
Index: gcc/sched-deps.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/sched-deps.c,v
retrieving revision 1.68
diff -u -r1.68 sched-deps.c
--- gcc/sched-deps.c	3 Feb 2004 05:39:53 -0000	1.68
+++ gcc/sched-deps.c	1 Mar 2004 09:20:18 -0000
@@ -171,8 +171,8 @@
 static int
 conditions_mutex_p (rtx cond1, rtx cond2)
 {
-  if (GET_RTX_CLASS (GET_CODE (cond1)) == '<'
-      && GET_RTX_CLASS (GET_CODE (cond2)) == '<'
+  if (COMPARISON_P (cond1)
+      && COMPARISON_P (cond2)
       && GET_CODE (cond1) == reverse_condition (GET_CODE (cond2))
       && XEXP (cond1, 0) == XEXP (cond2, 0)
       && XEXP (cond1, 1) == XEXP (cond2, 1))
Index: gcc/sched-rgn.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/sched-rgn.c,v
retrieving revision 1.70
diff -u -r1.70 sched-rgn.c
--- gcc/sched-rgn.c	4 Feb 2004 19:15:22 -0000	1.70
+++ gcc/sched-rgn.c	1 Mar 2004 09:20:18 -0000
@@ -346,7 +346,7 @@
     for (insn = BB_HEAD (b); ; insn = NEXT_INSN (insn))
       {
 	code = GET_CODE (insn);
-	if (GET_RTX_CLASS (code) == 'i' && code != JUMP_INSN)
+	if (INSN_P (insn) && code != JUMP_INSN)
 	  {
 	    rtx note = find_reg_note (insn, REG_LABEL, NULL_RTX);
 
Index: gcc/simplify-rtx.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/simplify-rtx.c,v
retrieving revision 1.178
diff -u -r1.178 simplify-rtx.c
--- gcc/simplify-rtx.c	21 Feb 2004 18:41:48 -0000	1.178
+++ gcc/simplify-rtx.c	1 Mar 2004 09:20:19 -0000
@@ -77,7 +77,7 @@
   rtx tem;
 
   /* Put complex operands first and constants second if commutative.  */
-  if (GET_RTX_CLASS (code) == 'c'
+  if (GET_RTX_CLASS (code) == RTX_COMM_ARITH
       && swap_commutative_operands_p (op0, op1))
     tem = op0, op0 = op1, op1 = tem;
 
@@ -236,7 +236,7 @@
 				    XEXP (op0, 0), XEXP (op0, 1));
 
   /* If op0 is a comparison, extract the comparison arguments form it.  */
-  if (GET_RTX_CLASS (GET_CODE (op0)) == '<' && op1 == const0_rtx)
+  if (COMPARISON_P (op0) && op1 == const0_rtx)
     {
       if (code == NE)
 	{
@@ -277,7 +277,7 @@
 
   switch (GET_RTX_CLASS (code))
     {
-    case '1':
+    case RTX_UNARY:
       op0 = XEXP (x, 0);
       op_mode = GET_MODE (op0);
       op0 = simplify_replace_rtx (op0, old, new);
@@ -285,15 +285,16 @@
 	return x;
       return simplify_gen_unary (code, mode, op0, op_mode);
 
-    case '2':
-    case 'c':
+    case RTX_BIN_ARITH:
+    case RTX_COMM_ARITH:
       op0 = simplify_replace_rtx (XEXP (x, 0), old, new);
       op1 = simplify_replace_rtx (XEXP (x, 1), old, new);
       if (op0 == XEXP (x, 0) && op1 == XEXP (x, 1))
 	return x;
       return simplify_gen_binary (code, mode, op0, op1);
 
-    case '<':
+    case RTX_COMPARE:
+    case RTX_COMM_COMPARE:
       op0 = XEXP (x, 0);
       op1 = XEXP (x, 1);
       op_mode = GET_MODE (op0) != VOIDmode ? GET_MODE (op0) : GET_MODE (op1);
@@ -303,8 +304,8 @@
 	return x;
       return simplify_gen_relational (code, mode, op_mode, op0, op1);
 
-    case '3':
-    case 'b':
+    case RTX_TERNARY:
+    case RTX_BITFIELD_OPS:
       op0 = XEXP (x, 0);
       op_mode = GET_MODE (op0);
       op0 = simplify_replace_rtx (op0, old, new);
@@ -316,7 +317,7 @@
 	op_mode = GET_MODE (op0);
       return simplify_gen_ternary (code, mode, op_mode, op0, op1, op2);
 
-    case 'x':
+    case RTX_EXTRA:
       /* The only case we try to handle is a SUBREG.  */
       if (code == SUBREG)
 	{
@@ -330,7 +331,7 @@
 	}
       break;
 
-    case 'o':
+    case RTX_OBJ:
       if (code == MEM)
 	{
 	  op0 = simplify_replace_rtx (XEXP (x, 0), old, new);
@@ -902,7 +903,7 @@
 	    return XEXP (op, 0);
 
 	  /* (not (eq X Y)) == (ne X Y), etc.  */
-	  if (GET_RTX_CLASS (GET_CODE (op)) == '<'
+	  if (COMPARISON_P (op)
 	      && (mode == BImode || STORE_FLAG_VALUE == -1)
 	      && ((reversed = reversed_comparison_code (op, NULL_RTX))
 		  != UNKNOWN))
@@ -942,7 +943,7 @@
 	  /* If STORE_FLAG_VALUE is -1, (not (comparison X Y)) can be done
 	     by reversing the comparison code if valid.  */
 	  if (STORE_FLAG_VALUE == -1
-	      && GET_RTX_CLASS (GET_CODE (op)) == '<'
+	      && COMPARISON_P (op)
 	      && (reversed = reversed_comparison_code (op, NULL_RTX))
 		 != UNKNOWN)
 	    return simplify_gen_relational (reversed, mode, VOIDmode,
@@ -1165,16 +1166,19 @@
   rtx trueop0, trueop1;
   rtx tem;
 
+#ifdef ENABLE_CHECKING
   /* Relational operations don't work here.  We must know the mode
      of the operands in order to do the comparison correctly.
      Assuming a full word can give incorrect results.
      Consider comparing 128 with -128 in QImode.  */
 
-  if (GET_RTX_CLASS (code) == '<')
+  if (GET_RTX_CLASS (code) == RTX_COMPARE
+      || GET_RTX_CLASS (code) == RTX_COMM_COMPARE)
     abort ();
+#endif
 
   /* Make sure the constant is second.  */
-  if (GET_RTX_CLASS (code) == 'c'
+  if (GET_RTX_CLASS (code) == RTX_COMM_ARITH
       && swap_commutative_operands_p (op0, op1))
     {
       tem = op0, op0 = op1, op1 = tem;
@@ -2885,7 +2889,7 @@
 		  && rtx_equal_p (XEXP (op0, 1), op1))))
 	return op2;
 
-      if (GET_RTX_CLASS (GET_CODE (op0)) == '<' && ! side_effects_p (op0))
+      if (COMPARISON_P (op0) && ! side_effects_p (op0))
 	{
 	  enum machine_mode cmp_mode = (GET_MODE (XEXP (op0, 0)) == VOIDmode
 					? GET_MODE (XEXP (op0, 1))
@@ -3536,25 +3540,26 @@
 
   switch (GET_RTX_CLASS (code))
     {
-    case '1':
+    case RTX_UNARY:
       return simplify_unary_operation (code, mode,
 				       XEXP (x, 0), GET_MODE (XEXP (x, 0)));
-    case 'c':
+    case RTX_COMM_ARITH:
       if (swap_commutative_operands_p (XEXP (x, 0), XEXP (x, 1)))
 	return simplify_gen_binary (code, mode, XEXP (x, 1), XEXP (x, 0));
 
       /* Fall through....  */
 
-    case '2':
+    case RTX_BIN_ARITH:
       return simplify_binary_operation (code, mode, XEXP (x, 0), XEXP (x, 1));
 
-    case '3':
-    case 'b':
+    case RTX_TERNARY:
+    case RTX_BITFIELD_OPS:
       return simplify_ternary_operation (code, mode, GET_MODE (XEXP (x, 0)),
 					 XEXP (x, 0), XEXP (x, 1),
 					 XEXP (x, 2));
 
-    case '<':
+    case RTX_COMPARE:
+    case RTX_COMM_COMPARE:
       temp = simplify_relational_operation (code,
 					    ((GET_MODE (XEXP (x, 0))
 					      != VOIDmode)
@@ -3573,7 +3578,7 @@
 #endif
       return temp;
 
-    case 'x':
+    case RTX_EXTRA:
       if (code == SUBREG)
 	return simplify_gen_subreg (mode, SUBREG_REG (x),
 				    GET_MODE (SUBREG_REG (x)),
@@ -3585,7 +3590,7 @@
 	}
       break;
 
-    case 'o':
+    case RTX_OBJ:
       if (code == LO_SUM)
 	{
 	  /* Convert (lo_sum (high FOO) FOO) to FOO.  */
Index: gcc/unroll.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/unroll.c,v
retrieving revision 1.205
diff -u -r1.205 unroll.c
--- gcc/unroll.c	1 Dec 2003 21:57:07 -0000	1.205
+++ gcc/unroll.c	1 Mar 2004 09:20:20 -0000
@@ -1,6 +1,6 @@
 /* Try to unroll loops, and split induction variables.
    Copyright (C) 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001,
-   2002, 2003
+   2002, 2003, 2004
    Free Software Foundation, Inc.
    Contributed by James E. Wilson, Cygnus Support/UC Berkeley.
 
@@ -2872,7 +2872,6 @@
 reg_dead_after_loop (const struct loop *loop, rtx reg)
 {
   rtx insn, label;
-  enum rtx_code code;
   int jump_count = 0;
   int label_count = 0;
 
@@ -2902,8 +2901,7 @@
       insn = NEXT_INSN (XEXP (label, 0));
       while (insn)
 	{
-	  code = GET_CODE (insn);
-	  if (GET_RTX_CLASS (code) == 'i')
+	  if (INSN_P (insn))
 	    {
 	      rtx set, note;
 
@@ -2917,18 +2915,18 @@
 	      set = single_set (insn);
 	      if (set && rtx_equal_p (SET_DEST (set), reg))
 		break;
-	    }
 
-	  if (code == JUMP_INSN)
-	    {
-	      if (GET_CODE (PATTERN (insn)) == RETURN)
-		break;
-	      else if (!any_uncondjump_p (insn)
-		       /* Prevent infinite loop following infinite loops.  */
-		       || jump_count++ > 20)
-		return 0;
-	      else
-		insn = JUMP_LABEL (insn);
+	      if (GET_CODE (insn) == JUMP_INSN)
+		{
+		  if (GET_CODE (PATTERN (insn)) == RETURN)
+		    break;
+		  else if (!any_uncondjump_p (insn)
+		           /* Prevent infinite loop following infinite loops.  */
+		           || jump_count++ > 20)
+		    return 0;
+		  else
+		    insn = JUMP_LABEL (insn);
+		}
 	    }
 
 	  insn = NEXT_INSN (insn);
Index: gcc/config/alpha/alpha.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.c,v
retrieving revision 1.353
diff -u -r1.353 alpha.c
--- gcc/config/alpha/alpha.c	26 Feb 2004 01:45:32 -0000	1.353
+++ gcc/config/alpha/alpha.c	1 Mar 2004 09:20:33 -0000
@@ -1134,13 +1134,13 @@
 int
 alpha_swapped_comparison_operator (rtx op, enum machine_mode mode)
 {
-  enum rtx_code code = GET_CODE (op);
+  enum rtx_code code;
 
   if ((mode != GET_MODE (op) && mode != VOIDmode)
-      || GET_RTX_CLASS (code) != '<')
+      || COMPARISON_P (op));
     return 0;
 
-  code = swap_condition (code);
+  code = swap_condition (GET_CODE (op));
   return (code == EQ || code == LE || code == LT
 	  || code == LEU || code == LTU);
 }
@@ -5637,7 +5637,7 @@
       {
 	enum rtx_code c = GET_CODE (x);
 
-        if (GET_RTX_CLASS (c) != '<')
+        if (!COMPARISON_P (x))
 	  output_operand_lossage ("invalid %%C value");
 
 	else if (code == 'D')
Index: gcc/config/arc/arc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arc/arc.c,v
retrieving revision 1.53
diff -u -r1.53 arc.c
--- gcc/config/arc/arc.c	8 Feb 2004 23:08:38 -0000	1.53
+++ gcc/config/arc/arc.c	1 Mar 2004 09:20:34 -0000
@@ -709,11 +709,11 @@
 int
 proper_comparison_operator (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
 {
-  enum rtx_code code = GET_CODE (op);
-
-  if (GET_RTX_CLASS (code) != '<')
+  enum rtx_code code;
+  if (!COMPARISON_P (op))
     return 0;
 
+  code = GET_CODE (op);
   if (GET_MODE (XEXP (op, 0)) == CCZNmode)
     return (code == EQ || code == NE);
   if (GET_MODE (XEXP (op, 0)) == CCZNCmode)
Index: gcc/config/arm/arm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.c,v
retrieving revision 1.335
diff -u -r1.335 arm.c
--- gcc/config/arm/arm.c	25 Feb 2004 17:03:26 -0000	1.335
+++ gcc/config/arm/arm.c	1 Mar 2004 09:20:37 -0000
@@ -3938,13 +3938,10 @@
 
   if (c == PLUS || c == MINUS)
     {
-      char cl0 = GET_RTX_CLASS (GET_CODE (XEXP (x, 0)));
-      char cl1 = GET_RTX_CLASS (GET_CODE (XEXP (x, 1)));
-
       if (GET_CODE (XEXP (x, 0)) == CONST_INT)
 	return 2;
 
-      if (cl0 == '2' || cl0 == 'c' || cl1 == '2' || cl1 == 'c')
+      if (ARITHMETIC_P (XEXP (x, 0)) || ARITHMETIC_P (XEXP (x, 1)))
 	return 3;
 
       return 4;
@@ -6175,21 +6172,21 @@
   if (GET_CODE (x) == IF_THEN_ELSE
       && (XEXP (x, 2) == const0_rtx
 	  || XEXP (x, 2) == const1_rtx)
-      && GET_RTX_CLASS (GET_CODE (XEXP (x, 0))) == '<'
-      && GET_RTX_CLASS (GET_CODE (XEXP (x, 1))) == '<')
+      && COMPARISON_P (XEXP (x, 0))
+      && COMPARISON_P (XEXP (x, 1)))
     return arm_select_dominance_cc_mode (XEXP (x, 0), XEXP (x, 1), 
 					 INTVAL (XEXP (x, 2)));
 
   /* Alternate canonicalizations of the above.  These are somewhat cleaner.  */
   if (GET_CODE (x) == AND
-      && GET_RTX_CLASS (GET_CODE (XEXP (x, 0))) == '<'
-      && GET_RTX_CLASS (GET_CODE (XEXP (x, 1))) == '<')
+      && COMPARISON_P (XEXP (x, 0))
+      && COMPARISON_P (XEXP (x, 1)))
     return arm_select_dominance_cc_mode (XEXP (x, 0), XEXP (x, 1),
 					 DOM_CC_X_AND_Y);
 
   if (GET_CODE (x) == IOR
-      && GET_RTX_CLASS (GET_CODE (XEXP (x, 0))) == '<'
-      && GET_RTX_CLASS (GET_CODE (XEXP (x, 1))) == '<')
+      && COMPARISON_P (XEXP (x, 0))
+      && COMPARISON_P (XEXP (x, 1)))
     return arm_select_dominance_cc_mode (XEXP (x, 0), XEXP (x, 1),
 					 DOM_CC_X_OR_Y);
 
Index: gcc/config/avr/avr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/avr/avr.c,v
retrieving revision 1.116
diff -u -r1.116 avr.c
--- gcc/config/avr/avr.c	8 Feb 2004 23:08:38 -0000	1.116
+++ gcc/config/avr/avr.c	1 Mar 2004 09:20:38 -0000
@@ -4251,6 +4251,7 @@
 
   while ((insn = NEXT_INSN (insn)))
     {
+      rtx set;
       code = GET_CODE (insn);
 
 #if 0
@@ -4263,6 +4264,9 @@
       /* else */
 #endif
 
+      if (!INSN_P (insn))
+	continue;
+
       if (code == JUMP_INSN)
 	return 0;
 
@@ -4320,17 +4324,14 @@
 	    return 1;
 	}
 
-      if (GET_RTX_CLASS (code) == 'i')
-	{
-	  rtx set = single_set (insn);
+      set = single_set (insn);
 
-	  if (set && reg_overlap_mentioned_p (reg, SET_SRC (set)))
-	    return 0;
-	  if (set && reg_overlap_mentioned_p (reg, SET_DEST (set)))
-	    return GET_CODE (SET_DEST (set)) != MEM;
-	  if (set == 0 && reg_overlap_mentioned_p (reg, PATTERN (insn)))
-	    return 0;
-	}
+      if (set && reg_overlap_mentioned_p (reg, SET_SRC (set)))
+	return 0;
+      if (set && reg_overlap_mentioned_p (reg, SET_DEST (set)))
+	return GET_CODE (SET_DEST (set)) != MEM;
+      if (set == 0 && reg_overlap_mentioned_p (reg, PATTERN (insn)))
+	return 0;
     }
   return 1;
 }
Index: gcc/config/frv/frv.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/frv/frv.c,v
retrieving revision 1.53
diff -u -r1.53 frv.c
--- gcc/config/frv/frv.c	29 Feb 2004 22:02:26 -0000	1.53
+++ gcc/config/frv/frv.c	1 Mar 2004 09:20:39 -0000
@@ -6831,7 +6831,7 @@
 
 		      else if (CR_P (regno)
 			       && (src_code == IF_THEN_ELSE
-				   || GET_RTX_CLASS (src_code) == '<'))
+				   || COMPARISON_P (src)))
 			skip_nested_if = TRUE;
 		    }
 		}
@@ -7371,9 +7371,7 @@
       enum machine_mode mode = GET_MODE (dest);
 
       /* Check for normal binary operators.  */
-      if (mode == SImode
-	  && (GET_RTX_CLASS (GET_CODE (src)) == '2'
-	      || GET_RTX_CLASS (GET_CODE (src)) == 'c'))
+      if (mode == SImode && ARITHMETIC_P (src))
 	{
 	  op0 = XEXP (src, 0);
 	  op1 = XEXP (src, 1);
@@ -7486,7 +7484,7 @@
       /* Rewrite a nested set cccr in terms of IF_THEN_ELSE.  Also deal with
          rewriting the CC register to be the same as the paired CC/CR register
          for nested ifs.  */
-      else if (mode == CC_CCRmode && GET_RTX_CLASS (GET_CODE (src)) == '<')
+      else if (mode == CC_CCRmode && COMPARISON_P (src))
 	{
 	  int regno = REGNO (XEXP (src, 0));
 	  rtx if_else;
@@ -8830,7 +8828,7 @@
 	}
 
       /* Things like labels reset everything.  */
-      if (GET_RTX_CLASS (code) != 'i')
+      if (!INSN_P (insn))
 	{
 	  next_start_vliw_p = TRUE;
 	  continue;
Index: gcc/config/i386/i386.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.654
diff -u -r1.654 i386.c
--- gcc/config/i386/i386.c	26 Feb 2004 21:43:34 -0000	1.654
+++ gcc/config/i386/i386.c	1 Mar 2004 09:20:47 -0000
@@ -4006,7 +4006,7 @@
   enum rtx_code code = GET_CODE (op);
   if (mode != VOIDmode && GET_MODE (op) != mode)
     return 0;
-  if (GET_RTX_CLASS (code) != '<')
+  if (!COMPARISON_P (op))
     return 0;
   inmode = GET_MODE (XEXP (op, 0));
 
@@ -4048,7 +4048,7 @@
 
   if (mode != VOIDmode && GET_MODE (op) != mode)
     return 0;
-  if (GET_RTX_CLASS (code) != '<')
+  if (!COMPARISON_P (op))
     return 0;
   inmode = GET_MODE (XEXP (op, 0));
   if (GET_CODE (XEXP (op, 0)) != REG
@@ -4080,7 +4080,7 @@
 
   if (mode != VOIDmode && GET_MODE (op) != mode)
     return 0;
-  if (GET_RTX_CLASS (code) != '<')
+  if (!COMPARISON_P (op))
     return 0;
   inmode = GET_MODE (XEXP (op, 0));
   if (inmode == CCFPmode || inmode == CCFPUmode)
@@ -4199,8 +4199,7 @@
 arith_or_logical_operator (rtx op, enum machine_mode mode)
 {
   return ((mode == VOIDmode || GET_MODE (op) == mode)
-          && (GET_RTX_CLASS (GET_CODE (op)) == 'c'
-              || GET_RTX_CLASS (GET_CODE (op)) == '2'));
+          && ARITHMETIC_P (op));
 }
 
 /* Returns 1 if OP is memory operand with a displacement.  */
@@ -7416,7 +7415,7 @@
 	case 'c':
 	  /* Check to see if argument to %c is really a constant
 	     and not a condition code which needs to be reversed.  */
-	  if (GET_RTX_CLASS (GET_CODE (x)) != '<')
+	  if (!COMPARISON_P (x))
 	  {
 	    output_operand_lossage ("operand is neither a constant nor a condition code, invalid operand code 'c'");
 	     return;
@@ -8439,7 +8438,7 @@
   src2 = operands[2];
 
   /* Recognize <var1> = <value> <op> <var1> for commutative operators */
-  if (GET_RTX_CLASS (code) == 'c'
+  if (GET_RTX_CLASS (code) == RTX_COMM_ARITH
       && (rtx_equal_p (dst, src2)
 	  || immediate_operand (src1, mode)))
     {
@@ -8455,7 +8454,7 @@
     {
       if (rtx_equal_p (dst, src1))
 	matching_memory = 1;
-      else if (GET_RTX_CLASS (code) == 'c'
+      else if (GET_RTX_CLASS (code) == RTX_COMM_ARITH
 	       && rtx_equal_p (dst, src2))
 	matching_memory = 2;
       else
@@ -8475,7 +8474,7 @@
      or non-matching memory.  */
   if ((CONSTANT_P (src1)
        || (!matching_memory && GET_CODE (src1) == MEM))
-      && GET_RTX_CLASS (code) != 'c')
+      && GET_RTX_CLASS (code) != RTX_COMM_ARITH)
     src1 = force_reg (mode, src1);
 
   /* If optimizing, copy to regs to improve CSE */
@@ -8523,18 +8522,18 @@
   if (GET_CODE (operands[1]) == MEM && GET_CODE (operands[2]) == MEM)
     return 0;
   /* If the operation is not commutable, source 1 cannot be a constant.  */
-  if (CONSTANT_P (operands[1]) && GET_RTX_CLASS (code) != 'c')
+  if (CONSTANT_P (operands[1]) && GET_RTX_CLASS (code) != RTX_COMM_ARITH)
     return 0;
   /* If the destination is memory, we must have a matching source operand.  */
   if (GET_CODE (operands[0]) == MEM
       && ! (rtx_equal_p (operands[0], operands[1])
-	    || (GET_RTX_CLASS (code) == 'c'
+	    || (GET_RTX_CLASS (code) == RTX_COMM_ARITH
 		&& rtx_equal_p (operands[0], operands[2]))))
     return 0;
   /* If the operation is not commutable and the source 1 is memory, we must
      have a matching destination.  */
   if (GET_CODE (operands[1]) == MEM
-      && GET_RTX_CLASS (code) != 'c'
+      && GET_RTX_CLASS (code) != RTX_COMM_ARITH
       && ! rtx_equal_p (operands[0], operands[1]))
     return 0;
   return 1;
Index: gcc/config/i386/i386.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.md,v
retrieving revision 1.515
diff -u -r1.515 i386.md
--- gcc/config/i386/i386.md	29 Feb 2004 21:31:06 -0000	1.515
+++ gcc/config/i386/i386.md	1 Mar 2004 09:20:53 -0000
@@ -14300,7 +14300,7 @@
 			[(match_operand:SF 1 "nonimmediate_operand" "%0")
 			 (match_operand:SF 2 "nonimmediate_operand" "fm")]))]
   "TARGET_80387 && !TARGET_SSE_MATH
-   && GET_RTX_CLASS (GET_CODE (operands[3])) == 'c'
+   && COMMUTATIVE_ARITH_P (operands[3])
    && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)"
   "* return output_387_binary_op (insn, operands);"
   [(set (attr "type") 
@@ -14315,7 +14315,7 @@
 			[(match_operand:SF 1 "nonimmediate_operand" "%0,0")
 			 (match_operand:SF 2 "nonimmediate_operand" "fm#x,xm#f")]))]
   "TARGET_80387 && TARGET_SSE_MATH && TARGET_MIX_SSE_I387
-   && GET_RTX_CLASS (GET_CODE (operands[3])) == 'c'
+   && COMMUTATIVE_ARITH_P (operands[3])
    && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)"
   "* return output_387_binary_op (insn, operands);"
   [(set (attr "type") 
@@ -14333,7 +14333,7 @@
 	(match_operator:SF 3 "binary_fp_operator"
 			[(match_operand:SF 1 "nonimmediate_operand" "%0")
 			 (match_operand:SF 2 "nonimmediate_operand" "xm")]))]
-  "TARGET_SSE_MATH && GET_RTX_CLASS (GET_CODE (operands[3])) == 'c'
+  "TARGET_SSE_MATH && COMMUTATIVE_ARITH_P (operands[3])
    && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)"
   "* return output_387_binary_op (insn, operands);"
   [(set (attr "type") 
@@ -14348,7 +14348,7 @@
 			[(match_operand:DF 1 "nonimmediate_operand" "%0")
 			 (match_operand:DF 2 "nonimmediate_operand" "fm")]))]
   "TARGET_80387 && (!TARGET_SSE2 || !TARGET_SSE_MATH)
-   && GET_RTX_CLASS (GET_CODE (operands[3])) == 'c'
+   && COMMUTATIVE_ARITH_P (operands[3])
    && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)"
   "* return output_387_binary_op (insn, operands);"
   [(set (attr "type") 
@@ -14363,7 +14363,7 @@
 			[(match_operand:DF 1 "nonimmediate_operand" "%0,0")
 			 (match_operand:DF 2 "nonimmediate_operand" "fm#Y,Ym#f")]))]
   "TARGET_80387 && TARGET_SSE_MATH && TARGET_SSE2 && TARGET_MIX_SSE_I387
-   && GET_RTX_CLASS (GET_CODE (operands[3])) == 'c'
+   && COMMUTATIVE_ARITH_P (operands[3])
    && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)"
   "* return output_387_binary_op (insn, operands);"
   [(set (attr "type") 
@@ -14382,7 +14382,7 @@
 			[(match_operand:DF 1 "nonimmediate_operand" "%0")
 			 (match_operand:DF 2 "nonimmediate_operand" "Ym")]))]
   "TARGET_SSE2 && TARGET_SSE_MATH
-   && GET_RTX_CLASS (GET_CODE (operands[3])) == 'c'
+   && COMMUTATIVE_ARITH_P (operands[3])
    && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)"
   "* return output_387_binary_op (insn, operands);"
   [(set (attr "type") 
@@ -14397,7 +14397,7 @@
 			[(match_operand:XF 1 "register_operand" "%0")
 			 (match_operand:XF 2 "register_operand" "f")]))]
   "TARGET_80387
-   && GET_RTX_CLASS (GET_CODE (operands[3])) == 'c'"
+   && COMMUTATIVE_ARITH_P (operands[3])"
   "* return output_387_binary_op (insn, operands);"
   [(set (attr "type") 
         (if_then_else (match_operand:XF 3 "mult_operator" "") 
@@ -14411,7 +14411,7 @@
 			[(match_operand:SF 1 "nonimmediate_operand" "0,fm")
 			 (match_operand:SF 2 "nonimmediate_operand" "fm,0")]))]
   "TARGET_80387 && !TARGET_SSE_MATH
-   && GET_RTX_CLASS (GET_CODE (operands[3])) != 'c'
+   && !COMMUTATIVE_ARITH_P (operands[3])
    && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)"
   "* return output_387_binary_op (insn, operands);"
   [(set (attr "type") 
@@ -14429,7 +14429,7 @@
 			[(match_operand:SF 1 "nonimmediate_operand" "0,fm,0")
 			 (match_operand:SF 2 "nonimmediate_operand" "fm,0,xm#f")]))]
   "TARGET_80387 && TARGET_SSE_MATH && TARGET_MIX_SSE_I387
-   && GET_RTX_CLASS (GET_CODE (operands[3])) != 'c'
+   && !COMMUTATIVE_ARITH_P (operands[3])
    && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)"
   "* return output_387_binary_op (insn, operands);"
   [(set (attr "type") 
@@ -14455,7 +14455,7 @@
 			[(match_operand:SF 1 "register_operand" "0")
 			 (match_operand:SF 2 "nonimmediate_operand" "xm")]))]
   "TARGET_SSE_MATH
-   && GET_RTX_CLASS (GET_CODE (operands[3])) != 'c'"
+   && !COMMUTATIVE_ARITH_P (operands[3])"
   "* return output_387_binary_op (insn, operands);"
   [(set (attr "type") 
         (cond [(match_operand:SF 3 "mult_operator" "")
@@ -14509,7 +14509,7 @@
 			[(match_operand:DF 1 "nonimmediate_operand" "0,fm")
 			 (match_operand:DF 2 "nonimmediate_operand" "fm,0")]))]
   "TARGET_80387 && (!TARGET_SSE2 || !TARGET_SSE_MATH)
-   && GET_RTX_CLASS (GET_CODE (operands[3])) != 'c'
+   && !COMMUTATIVE_ARITH_P (operands[3])
    && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)"
   "* return output_387_binary_op (insn, operands);"
   [(set (attr "type") 
@@ -14528,7 +14528,7 @@
 			[(match_operand:DF 1 "nonimmediate_operand" "0,fm,0")
 			 (match_operand:DF 2 "nonimmediate_operand" "fm,0,Ym#f")]))]
   "TARGET_80387 && TARGET_SSE2 && TARGET_SSE_MATH && TARGET_MIX_SSE_I387
-   && GET_RTX_CLASS (GET_CODE (operands[3])) != 'c'
+   && !COMMUTATIVE_ARITH_P (operands[3])
    && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)"
   "* return output_387_binary_op (insn, operands);"
   [(set (attr "type") 
@@ -14554,7 +14554,7 @@
 			[(match_operand:DF 1 "register_operand" "0")
 			 (match_operand:DF 2 "nonimmediate_operand" "Ym")]))]
   "TARGET_SSE2 && TARGET_SSE_MATH
-   && GET_RTX_CLASS (GET_CODE (operands[3])) != 'c'"
+   && !COMMUTATIVE_ARITH_P (operands[3])"
   "* return output_387_binary_op (insn, operands);"
   [(set_attr "mode" "DF")
    (set (attr "type") 
@@ -14660,7 +14660,7 @@
 			[(match_operand:XF 1 "register_operand" "0,f")
 			 (match_operand:XF 2 "register_operand" "f,0")]))]
   "TARGET_80387
-   && GET_RTX_CLASS (GET_CODE (operands[3])) != 'c'"
+   && !COMMUTATIVE_ARITH_P (operands[3])"
   "* return output_387_binary_op (insn, operands);"
   [(set (attr "type") 
         (cond [(match_operand:XF 3 "mult_operator" "") 
Index: gcc/config/ia64/ia64.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.c,v
retrieving revision 1.281
diff -u -r1.281 ia64.c
--- gcc/config/ia64/ia64.c	27 Feb 2004 17:17:01 -0000	1.281
+++ gcc/config/ia64/ia64.c	1 Mar 2004 09:20:55 -0000
@@ -863,7 +863,7 @@
 not_postinc_memory_operand (rtx op, enum machine_mode mode)
 {
   return (memory_operand (op, mode)
-	  && GET_RTX_CLASS (GET_CODE (XEXP (op, 0))) != 'a');
+	  && GET_RTX_CLASS (GET_CODE (XEXP (op, 0))) != RTX_AUTOINC);
 }
 
 /* Return 1 if this is a comparison operator, which accepts a normal 8-bit
@@ -4356,7 +4356,7 @@
     case MEM:
       {
 	rtx addr = XEXP (x, 0);
-	if (GET_RTX_CLASS (GET_CODE (addr)) == 'a')
+	if (GET_RTX_CLASS (GET_CODE (addr)) == RTX_AUTOINC)
 	  addr = XEXP (addr, 0);
 	fprintf (file, "[%s]", reg_names [REGNO (addr)]);
 	break;
@@ -5159,7 +5159,7 @@
       /* ... fall through ...  */
 
     default:
-      if (GET_RTX_CLASS (GET_CODE (src)) == '<'
+      if (COMPARISON_P (src)
 	  && GET_MODE_CLASS (GET_MODE (XEXP (src, 0))) == MODE_FLOAT)
 	/* Set pflags->is_fp to 1 so that we know we're dealing
 	   with a floating point comparison when processing the
@@ -5883,8 +5883,8 @@
 	  || GET_CODE (XEXP (SET_SRC (set), 0)) != POST_MODIFY)
       && GENERAL_REGNO_P (REGNO (SET_DEST (set))))
     {
-      if (GET_RTX_CLASS (GET_CODE (cond)) != '<'
-	  || ! REG_P (XEXP (cond, 0)))
+      if (!COMPARISON_P (cond)
+	  || !REG_P (XEXP (cond, 0)))
 	abort ();
 
       if (TEST_HARD_REG_BIT (prev_group->p_reg_set, REGNO (XEXP (cond, 0))))
Index: gcc/config/ia64/ia64.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.h,v
retrieving revision 1.171
diff -u -r1.171 ia64.h
--- gcc/config/ia64/ia64.h	27 Feb 2004 17:17:01 -0000	1.171
+++ gcc/config/ia64/ia64.h	1 Mar 2004 09:20:55 -0000
@@ -1021,7 +1021,7 @@
 #define PREFERRED_RELOAD_CLASS(X, CLASS) \
   (CLASS == FR_REGS && GET_CODE (X) == MEM && MEM_VOLATILE_P (X) ? NO_REGS   \
    : CLASS == FR_REGS && GET_CODE (X) == CONST_DOUBLE ? NO_REGS		     \
-   : GET_RTX_CLASS (GET_CODE (X)) != 'o'				     \
+   : !OBJECT_P (X)							     \
      && (CLASS == AR_M_REGS || CLASS == AR_I_REGS) ? NO_REGS		     \
    : CLASS)
 
@@ -1124,9 +1124,9 @@
 #define CONSTRAINT_OK_FOR_R(VALUE) \
   (GET_CODE (VALUE) == CONST_INT && INTVAL (VALUE) >= 1 && INTVAL (VALUE) <= 4)
 /* Non-post-inc memory for asms and other unsavory creatures.  */
-#define CONSTRAINT_OK_FOR_S(VALUE)				\
-  (GET_CODE (VALUE) == MEM					\
-   && GET_RTX_CLASS (GET_CODE (XEXP ((VALUE), 0))) != 'a'	\
+#define CONSTRAINT_OK_FOR_S(VALUE)					\
+  (GET_CODE (VALUE) == MEM						\
+   && GET_RTX_CLASS (GET_CODE (XEXP ((VALUE), 0))) != RTX_AUTOINC	\
    && (reload_in_progress || memory_operand ((VALUE), VOIDmode)))
 /* Symbol ref to small-address-area: */
 #define CONSTRAINT_OK_FOR_T(VALUE)						\
Index: gcc/config/ip2k/ip2k.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ip2k/ip2k.c,v
retrieving revision 1.35
diff -u -r1.35 ip2k.c
--- gcc/config/ip2k/ip2k.c	8 Feb 2004 23:08:41 -0000	1.35
+++ gcc/config/ip2k/ip2k.c	1 Mar 2004 09:20:56 -0000
@@ -3428,7 +3428,7 @@
 	     appropriate, try to do the same thing with the second operand.
 	     Of course there are fewer operations that can match here
 	     because they must be commutative.  */
-          if (GET_RTX_CLASS (GET_CODE (XEXP (set, 1))) == 'c'
+          if (GET_RTX_CLASS (GET_CODE (XEXP (set, 1))) == RTX_COMM_ARITH
 	      && (GET_CODE (XEXP (XEXP (set, 1), 1)) == REG
 	          || GET_CODE (XEXP (XEXP (set, 1), 1)) == MEM)
 	      && rtx_equal_p (XEXP (set2, 0), XEXP (XEXP (set, 1), 1))
@@ -4104,12 +4104,11 @@
 static int
 ip2k_check_can_adjust_stack_ref (rtx x, int offset)
 {
-  if (GET_RTX_CLASS (GET_CODE (x)) == '2'
-      || GET_RTX_CLASS (GET_CODE (x)) == 'c')
+  if (ARITHMETIC_P (x))
     return (ip2k_check_can_adjust_stack_ref (XEXP (x, 0), offset)
 	    && ip2k_check_can_adjust_stack_ref (XEXP (x, 1), offset));
 
-  if (GET_RTX_CLASS (GET_CODE (x)) == '1')
+  if (UNARY_P (x))
     return ip2k_check_can_adjust_stack_ref (XEXP (x, 0), offset);
 
   switch (GET_CODE (x))
@@ -4150,15 +4149,14 @@
 static void
 ip2k_adjust_stack_ref (rtx *x, int offset)
 {
-  if (GET_RTX_CLASS (GET_CODE (*x)) == '2'
-      || GET_RTX_CLASS (GET_CODE (*x)) == 'c')
+  if (ARITHMETIC_P (*x))
     {
       ip2k_adjust_stack_ref (&XEXP (*x, 0), offset);
       ip2k_adjust_stack_ref (&XEXP (*x, 1), offset);
       return;
     }
 
-  if (GET_RTX_CLASS (GET_CODE (*x)) == '1')
+  if (UNARY_P (*x))
     {
       ip2k_adjust_stack_ref (&XEXP (*x, 0), offset);
       return;
@@ -4642,21 +4640,6 @@
   if (regno & 1)
     regno &= 0xfffffffe;
 
-  if (GET_RTX_CLASS (GET_CODE (x)) == 'b')
-    return (ip2k_xexp_not_uses_reg_for_mem (XEXP (x, 0), regno)
-	    && ip2k_xexp_not_uses_reg_for_mem (XEXP (x, 1), regno)
-	    && ip2k_xexp_not_uses_reg_for_mem (XEXP (x, 2), regno));
-
-  if (GET_RTX_CLASS (GET_CODE (x)) == '2'
-      || GET_RTX_CLASS (GET_CODE (x)) == 'c'
-      || GET_RTX_CLASS (GET_CODE (x)) == '<')
-    return (ip2k_xexp_not_uses_reg_for_mem (XEXP (x, 0), regno)
-	    && ip2k_xexp_not_uses_reg_for_mem (XEXP (x, 1), regno));
-
-  if (GET_RTX_CLASS (GET_CODE (x)) == '1'
-      || GET_RTX_CLASS (GET_CODE (x)) == '3')
-    return ip2k_xexp_not_uses_reg_for_mem (XEXP (x, 0), regno);
-
   switch (GET_CODE (x))
     {
     case REG:
@@ -4682,6 +4665,19 @@
       return 1;
 
     default:
+      if (GET_RTX_CLASS (GET_CODE (x)) == RTX_BITFIELD_OPS)
+	return (ip2k_xexp_not_uses_reg_for_mem (XEXP (x, 0), regno)
+		&& ip2k_xexp_not_uses_reg_for_mem (XEXP (x, 1), regno)
+		&& ip2k_xexp_not_uses_reg_for_mem (XEXP (x, 2), regno));
+
+      if (BINARY_P (x))
+	return (ip2k_xexp_not_uses_reg_for_mem (XEXP (x, 0), regno)
+		&& ip2k_xexp_not_uses_reg_for_mem (XEXP (x, 1), regno));
+
+      if (UNARY_P (x)
+	  || GET_RTX_CLASS (GET_CODE (x)) == '3')
+	return ip2k_xexp_not_uses_reg_for_mem (XEXP (x, 0), regno);
+
       return 0;
     }
 }
@@ -5972,19 +5968,17 @@
 int
 ip2k_composite_xexp_not_uses_reg_p (rtx x, unsigned int r, int rsz)
 {
-  if (GET_RTX_CLASS (GET_CODE (x)) == 'b')
+  if (GET_RTX_CLASS (GET_CODE (x)) == RTX_BITFIELD_OPS)
     return (ip2k_composite_xexp_not_uses_reg_p (XEXP (x, 0), r, rsz)
 	    && ip2k_composite_xexp_not_uses_reg_p (XEXP (x, 1), r, rsz)
 	    && ip2k_composite_xexp_not_uses_reg_p (XEXP (x, 2), r, rsz));
 
-  if (GET_RTX_CLASS (GET_CODE (x)) == '2'
-      || GET_RTX_CLASS (GET_CODE (x)) == 'c'
-      || GET_RTX_CLASS (GET_CODE (x)) == '<')
+  if (BINARY_P (x)
     return (ip2k_composite_xexp_not_uses_reg_p (XEXP (x, 0), r, rsz)
 	    && ip2k_composite_xexp_not_uses_reg_p (XEXP (x, 1), r, rsz));
 
-  if (GET_RTX_CLASS (GET_CODE (x)) == '1'
-      || GET_RTX_CLASS (GET_CODE (x)) == '3')
+  if (UNARY_P (x)
+      || GET_RTX_CLASS (GET_CODE (x)) == RTX_TERNARY)
     return ip2k_composite_xexp_not_uses_reg_p (XEXP (x, 0), r, rsz);
 
   return ip2k_xexp_not_uses_reg_p (x, r, rsz);
@@ -5996,19 +5990,17 @@
 int
 ip2k_composite_xexp_not_uses_cc0_p (rtx x)
 {
-  if (GET_RTX_CLASS (GET_CODE (x)) == 'b')
+  if (GET_RTX_CLASS (GET_CODE (x)) == RTX_BITFIELD_OPS)
     return (ip2k_composite_xexp_not_uses_cc0_p (XEXP (x, 0))
 	    && ip2k_composite_xexp_not_uses_cc0_p (XEXP (x, 1))
 	    && ip2k_composite_xexp_not_uses_cc0_p (XEXP (x, 2)));
 
-  if (GET_RTX_CLASS (GET_CODE (x)) == '2'
-      || GET_RTX_CLASS (GET_CODE (x)) == 'c'
-      || GET_RTX_CLASS (GET_CODE (x)) == '<')
+  if (BINARY_P (x))
     return (ip2k_composite_xexp_not_uses_cc0_p (XEXP (x, 0))
 	    && ip2k_composite_xexp_not_uses_cc0_p (XEXP (x, 1)));
 
-  if (GET_RTX_CLASS (GET_CODE (x)) == '1'
-      || GET_RTX_CLASS (GET_CODE (x)) == '3')
+  if (UNARY_P (x)
+      || GET_RTX_CLASS (GET_CODE (x)) == RTX_TERNARY)
     return ip2k_composite_xexp_not_uses_cc0_p (XEXP (x, 0));
 
   return GET_CODE (x) != CC0;
@@ -6158,15 +6150,14 @@
 ip2k_unary_operator (rtx op, enum machine_mode mode)
 {
   return ((mode == VOIDmode || GET_MODE (op) == mode)
-	  && GET_RTX_CLASS (GET_CODE (op)) == '1');
+	  && UNARY_P (op);
 }
 
 int
 ip2k_binary_operator (rtx op, enum machine_mode mode)
 {
   return ((mode == VOIDmode || GET_MODE (op) == mode)
-	  && (GET_RTX_CLASS (GET_CODE (op)) == 'c'
-	      || GET_RTX_CLASS (GET_CODE (op)) == '2'));
+	  && ARITHMETIC_P (op);
 }
 
 int
Index: gcc/config/iq2000/iq2000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/iq2000/iq2000.c,v
retrieving revision 1.15
diff -u -r1.15 iq2000.c
--- gcc/config/iq2000/iq2000.c	23 Feb 2004 21:43:02 -0000	1.15
+++ gcc/config/iq2000/iq2000.c	1 Mar 2004 09:20:57 -0000
@@ -357,7 +357,7 @@
   if (mode != GET_MODE (op))
     return 0;
 
-  return GET_RTX_CLASS (GET_CODE (op)) == '<';
+  return COMPARISON_P (op);
 }
 
 /* Return nonzero if the operand is either the PC or a label_ref.  */
@@ -2583,11 +2583,10 @@
   if (GET_CODE (x) == CONST)
     return symbolic_expression_p (XEXP (x, 0));
 
-  if (GET_RTX_CLASS (GET_CODE (x)) == '1')
+  if (UNARY_P (x))
     return symbolic_expression_p (XEXP (x, 0));
 
-  if (GET_RTX_CLASS (GET_CODE (x)) == 'c'
-      || GET_RTX_CLASS (GET_CODE (x)) == '2')
+  if (ARITHMETIC_P (x))
     return (symbolic_expression_p (XEXP (x, 0))
 	    || symbolic_expression_p (XEXP (x, 1)));
 
Index: gcc/config/m32r/m32r.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m32r/m32r.c,v
retrieving revision 1.88
diff -u -r1.88 m32r.c
--- gcc/config/m32r/m32r.c	8 Feb 2004 23:08:42 -0000	1.88
+++ gcc/config/m32r/m32r.c	1 Mar 2004 09:20:57 -0000
@@ -908,8 +908,6 @@
 {
   enum rtx_code code = GET_CODE (op);
 
-  if (GET_RTX_CLASS (code) != '<')
-    return 0;
   return (code == EQ || code == NE);
 }
 
@@ -920,10 +918,9 @@
 {
   enum rtx_code code = GET_CODE (op);
 
-  if (GET_RTX_CLASS (code) != '<')
-    return 0;
-  return (code == EQ || code == NE
-	  || code == LT || code == LE || code == GT || code == GE);
+  return (COMPARISON_P (op)
+  	  && (code == EQ || code == NE
+	      || code == LT || code == LE || code == GT || code == GE);
 }
 
 /* Return 1 if OP is (mem (reg ...)).
Index: gcc/config/mips/mips.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.c,v
retrieving revision 1.388
diff -u -r1.388 mips.c
--- gcc/config/mips/mips.c	28 Feb 2004 20:27:42 -0000	1.388
+++ gcc/config/mips/mips.c	1 Mar 2004 09:20:59 -0000
@@ -1509,7 +1509,7 @@
   if (mode != GET_MODE (op))
     return 0;
 
-  return GET_RTX_CLASS (GET_CODE (op)) == '<';
+  return COMPARISON_P (op);
 }
 
 /* Return nonzero if the code is a relational operation suitable for a
@@ -7249,11 +7249,10 @@
   if (GET_CODE (x) == CONST)
     return symbolic_expression_p (XEXP (x, 0));
 
-  if (GET_RTX_CLASS (GET_CODE (x)) == '1')
+  if (UNARY_P (x))
     return symbolic_expression_p (XEXP (x, 0));
 
-  if (GET_RTX_CLASS (GET_CODE (x)) == 'c'
-      || GET_RTX_CLASS (GET_CODE (x)) == '2')
+  if (ARITHMETIC_P (x))
     return (symbolic_expression_p (XEXP (x, 0))
 	    || symbolic_expression_p (XEXP (x, 1)));
 
Index: gcc/config/mmix/mmix.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mmix/mmix.c,v
retrieving revision 1.60
diff -u -r1.60 mmix.c
--- gcc/config/mmix/mmix.c	4 Feb 2004 20:01:02 -0000	1.60
+++ gcc/config/mmix/mmix.c	1 Mar 2004 09:21:02 -0000
@@ -2498,7 +2498,7 @@
   if (mode == VOIDmode)
     mode = GET_MODE (op);
 
-  if (mode == VOIDmode && GET_RTX_CLASS (GET_CODE (op)) == '<')
+  if (mode == VOIDmode && COMPARISON_P (op))
     mode = GET_MODE (XEXP (op, 0));
 
   return ((mode == CCmode || mode == DImode)
@@ -2526,13 +2526,13 @@
     mode = GET_MODE (op);
 
   /* Get the mode from the first operand if we don't have one.  */
-  if (mode == VOIDmode && GET_RTX_CLASS (GET_CODE (op)) == '<')
+  if (mode == VOIDmode && COMPARISON_P (op))
     mode = GET_MODE (XEXP (op, 0));
 
   /* FIXME: This needs to be kept in sync with the tables in
      mmix_output_condition.  */
   return
-    (mode == VOIDmode && GET_RTX_CLASS (GET_CODE (op)) == '<')
+    (mode == VOIDmode && COMPARISON_P (op))
     || (mode == CC_FUNmode
 	&& (code == ORDERED || code == UNORDERED))
     || (mode == CC_FPmode
Index: gcc/config/pa/pa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pa/pa.c,v
retrieving revision 1.244
diff -u -r1.244 pa.c
--- gcc/config/pa/pa.c	23 Feb 2004 21:43:04 -0000	1.244
+++ gcc/config/pa/pa.c	1 Mar 2004 09:21:04 -0000
@@ -1100,7 +1100,7 @@
   if (GET_CODE (x) == PLUS && GET_CODE (XEXP (x, 0)) == MULT
       && GET_CODE (XEXP (XEXP (x, 0), 1)) == CONST_INT
       && shadd_constant_p (INTVAL (XEXP (XEXP (x, 0), 1)))
-      && (GET_RTX_CLASS (GET_CODE (XEXP (x, 1))) == 'o'
+      && (OBJECT_P (XEXP (x, 1))
 	  || GET_CODE (XEXP (x, 1)) == SUBREG)
       && GET_CODE (XEXP (x, 1)) != CONST)
     {
Index: gcc/config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.598
diff -u -r1.598 rs6000.c
--- gcc/config/rs6000/rs6000.c	23 Feb 2004 18:40:46 -0000	1.598
+++ gcc/config/rs6000/rs6000.c	1 Mar 2004 09:21:10 -0000
@@ -8105,7 +8105,8 @@
 static void
 validate_condition_mode (enum rtx_code code, enum machine_mode mode)
 {
-  if (GET_RTX_CLASS (code) != '<' 
+  if ((GET_RTX_CLASS (code) != RTX_COMPARE
+       && GET_RTX_CLASS (code) != RTX_COMM_COMPARE)
       || GET_MODE_CLASS (mode) != MODE_CC)
     abort ();
 
@@ -8149,7 +8150,7 @@
   enum rtx_code code = GET_CODE (op);
   enum machine_mode cc_mode;
 
-  if (GET_RTX_CLASS (code) != '<')
+  if (!COMPARISON_P (op))
     return 0;
 
   cc_mode = GET_MODE (XEXP (op, 0));
@@ -8194,7 +8195,7 @@
 {
   if (mode != VOIDmode && mode != GET_MODE (op))
     return 0;
-  return GET_RTX_CLASS (GET_CODE (op)) == '<';
+  return COMPARISON_P (op);
 }
 
 int
@@ -8574,7 +8575,7 @@
   int base_bit;
   rtx reg;
 
-  if (GET_RTX_CLASS (code) != '<')
+  if (!COMPARISON_P (op))
     return -1;
 
   reg = XEXP (op, 0);
Index: gcc/config/rs6000/rs6000.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.h,v
retrieving revision 1.313
diff -u -r1.313 rs6000.h
--- gcc/config/rs6000/rs6000.h	21 Feb 2004 09:08:36 -0000	1.313
+++ gcc/config/rs6000/rs6000.h	1 Mar 2004 09:21:11 -0000
@@ -2287,7 +2287,7 @@
 #define SELECT_CC_MODE(OP,X,Y) \
   (GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT ? CCFPmode	\
    : (OP) == GTU || (OP) == LTU || (OP) == GEU || (OP) == LEU ? CCUNSmode \
-   : (((OP) == EQ || (OP) == NE) && GET_RTX_CLASS (GET_CODE (X)) == '<'   \
+   : (((OP) == EQ || (OP) == NE) && COMPARISON_P (X)			  \
       ? CCEQmode : CCmode))
 
 /* Can the condition code MODE be safely reversed?  This is safe in
Index: gcc/config/s390/s390.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/s390/s390.c,v
retrieving revision 1.137
diff -u -r1.137 s390.c
--- gcc/config/s390/s390.c	18 Feb 2004 22:37:04 -0000	1.137
+++ gcc/config/s390/s390.c	1 Mar 2004 09:21:17 -0000
@@ -467,7 +467,7 @@
   if (mode != VOIDmode && mode != GET_MODE (op))
     return 0;
 
-  if (GET_RTX_CLASS (GET_CODE (op)) != '<')
+  if (!COMPARISON_P (op))
     return 0;
 
   if (GET_CODE (XEXP (op, 0)) != REG
@@ -509,7 +509,7 @@
   if (mode != VOIDmode && mode != GET_MODE (op))
     return 0;
 
-  if (GET_RTX_CLASS (GET_CODE (op)) != '<')
+  if (!COMPARISON_P (op))
     return 0;
 
   if (GET_CODE (XEXP (op, 0)) != REG
Index: gcc/config/sh/sh.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.c,v
retrieving revision 1.262
diff -u -r1.262 sh.c
--- gcc/config/sh/sh.c	29 Feb 2004 22:02:27 -0000	1.262
+++ gcc/config/sh/sh.c	1 Mar 2004 09:21:19 -0000
@@ -3514,7 +3514,7 @@
 	  if (INSN_DELETED_P (scan))
 	    continue;
 	  code = GET_CODE (scan);
-	  if (GET_RTX_CLASS (code) == 'i')
+	  if (INSN_P (scan))
 	    {
 	      used |= regs_used (PATTERN (scan), 0);
 	      if (code == CALL_INSN)
@@ -7667,6 +7667,10 @@
 
   while ((insn = NEXT_INSN (insn)))
     {
+      rtx set;
+      if (!INSN_P (insn))
+	continue;
+
       code = GET_CODE (insn);
 
 #if 0
@@ -7723,17 +7727,14 @@
 	  else if (code == JUMP_INSN)
 	    return 0;
 	}
-      else if (GET_RTX_CLASS (code) == 'i')
-	{
-	  rtx set = single_set (insn);
 
-	  if (set && reg_overlap_mentioned_p (reg, SET_SRC (set)))
-	    return 0;
-	  if (set && reg_overlap_mentioned_p (reg, SET_DEST (set)))
-	    return GET_CODE (SET_DEST (set)) != MEM;
-	  if (set == 0 && reg_overlap_mentioned_p (reg, PATTERN (insn)))
-	    return 0;
-	}
+      set = single_set (insn);
+      if (set && reg_overlap_mentioned_p (reg, SET_SRC (set)))
+	return 0;
+      if (set && reg_overlap_mentioned_p (reg, SET_DEST (set)))
+	return GET_CODE (SET_DEST (set)) != MEM;
+      if (set == 0 && reg_overlap_mentioned_p (reg, PATTERN (insn)))
+	return 0;
 
       if (code == CALL_INSN && call_used_regs[REGNO (reg)])
 	return 1;
Index: gcc/config/sparc/sparc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.c,v
retrieving revision 1.292
diff -u -r1.292 sparc.c
--- gcc/config/sparc/sparc.c	26 Feb 2004 18:40:40 -0000	1.292
+++ gcc/config/sparc/sparc.c	1 Mar 2004 09:21:21 -0000
@@ -958,15 +958,16 @@
 int
 normal_comp_operator (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
 {
-  enum rtx_code code = GET_CODE (op);
+  enum rtx_code code;
 
-  if (GET_RTX_CLASS (code) != '<')
+  if (!COMPARISON_P (op))
     return 0;
 
   if (GET_MODE (XEXP (op, 0)) == CCFPmode
       || GET_MODE (XEXP (op, 0)) == CCFPEmode)
     return 1;
 
+  code = GET_CODE (op);
   return (code != NE && code != EQ && code != GEU && code != LTU);
 }
 
@@ -974,13 +975,14 @@
    MATCH_OPERATOR to recognize all the branch insns.  */
 
 int
-noov_compare_op (register rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
+noov_compare_op (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
 {
-  enum rtx_code code = GET_CODE (op);
+  enum rtx_code code;
 
-  if (GET_RTX_CLASS (code) != '<')
+  if (!COMPARISON_P (op))
     return 0;
 
+  code = GET_CODE (op);
   if (GET_MODE (XEXP (op, 0)) == CC_NOOVmode
       || GET_MODE (XEXP (op, 0)) == CCX_NOOVmode)
     /* These are the only branches which work with CC_NOOVmode.  */
@@ -994,14 +996,15 @@
 int
 noov_compare64_op (register rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
 {
-  enum rtx_code code = GET_CODE (op);
+  enum rtx_code code;
 
   if (! TARGET_V9)
     return 0;
 
-  if (GET_RTX_CLASS (code) != '<')
+  if (!COMPARISON_P (op));
     return 0;
 
+  code = GET_CODE (op);
   if (GET_MODE (XEXP (op, 0)) == CCX_NOOVmode)
     /* These are the only branches which work with CCX_NOOVmode.  */
     return (code == EQ || code == NE || code == GE || code == LT);
@@ -1012,13 +1015,14 @@
    conditional move or branch on register contents instructions.  */
 
 int
-v9_regcmp_op (register rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
+v9_regcmp_op (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
 {
-  enum rtx_code code = GET_CODE (op);
+  enum rtx_code code;
 
-  if (GET_RTX_CLASS (code) != '<')
+  if (!COMPARISON_P (op))
     return 0;
 
+  code = GET_CODE (op);
   return v9_regcmp_p (code);
 }
 
@@ -2687,7 +2691,7 @@
 {
   rtx op, dest;
 
-  if (GET_RTX_CLASS (code) == '1')
+  if (GET_RTX_CLASS (code) == RTX_UNARY)
     {
       operands[1] = force_reg (GET_MODE (operands[1]), operands[1]);
       op = gen_rtx_fmt_e (code, GET_MODE (operands[0]), operands[1]);
@@ -3073,7 +3077,7 @@
       if (GET_CODE (insn) == CODE_LABEL)
 	return 1;
 
-      if (GET_RTX_CLASS (code) == 'i')
+      if (INSN_P (insn))
 	{
 	  rtx set = single_set (insn);
 	  int in_src = set && reg_overlap_mentioned_p (reg, SET_SRC (set));
Index: gcc/doc/md.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/md.texi,v
retrieving revision 1.91
diff -u -r1.91 md.texi
--- gcc/doc/md.texi	19 Feb 2004 18:50:57 -0000	1.91
+++ gcc/doc/md.texi	1 Mar 2004 09:21:29 -0000
@@ -367,14 +367,14 @@
 
 @smallexample
 int
-commutative_operator (x, mode)
+commutative_integer_operator (x, mode)
      rtx x;
      enum machine_mode mode;
 @{
   enum rtx_code code = GET_CODE (x);
   if (GET_MODE (x) != mode)
     return 0;
-  return (GET_RTX_CLASS (code) == 'c'
+  return (GET_RTX_CLASS (code) == RTX_COMM_ARITH
           || code == EQ || code == NE);
 @}
 @end smallexample
Index: gcc/doc/rtl.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/rtl.texi,v
retrieving revision 1.64
diff -u -r1.64 rtl.texi
--- gcc/doc/rtl.texi	27 Jan 2004 18:03:17 -0000	1.64
+++ gcc/doc/rtl.texi	1 Mar 2004 09:21:30 -0000
@@ -140,58 +140,67 @@
 Currently, @file{rtx.def} defines these classes:
 
 @table @code
-@item o
+@item RTX_OBJ
 An RTX code that represents an actual object, such as a register
 (@code{REG}) or a memory location (@code{MEM}, @code{SYMBOL_REF}).
-Constants and basic transforms on objects (@code{ADDRESSOF},
-@code{HIGH}, @code{LO_SUM}) are also included.  Note that @code{SUBREG}
-and @code{STRICT_LOW_PART} are not in this class, but in class @code{x}.
+@code{LO_SUM}) is also included; instead, @code{SUBREG} and
+@code{STRICT_LOW_PART} are not in this class, but in class @code{x}.
 
-@item <
-An RTX code for a comparison, such as @code{NE} or @code{LT}.
+@item RTX_CONST_OBJ
+An RTX code that represents a constant object.  @code{HIGH} is also
+included in this class.
+
+@item RTX_COMPARE
+An RTX code for a non-symmetric comparison, such as @code{GEU} or
+@code{LT}.
+
+@item RTX_COMM_COMPARE
+An RTX code for a symmetric (commutative) comparison, such as @code{EQ}
+or @code{ORDERED}.
 
-@item 1
+@item RTX_UNARY
 An RTX code for a unary arithmetic operation, such as @code{NEG},
 @code{NOT}, or @code{ABS}.  This category also includes value extension
 (sign or zero) and conversions between integer and floating point.
 
-@item c
+@item RTX_COMM_ARITH
 An RTX code for a commutative binary operation, such as @code{PLUS} or
 @code{AND}.  @code{NE} and @code{EQ} are comparisons, so they have class
 @code{<}.
 
-@item 2
+@item RTX_BIN_ARITH
 An RTX code for a non-commutative binary operation, such as @code{MINUS},
 @code{DIV}, or @code{ASHIFTRT}.
 
-@item b
+@item RTX_BITFIELD_OPS
 An RTX code for a bit-field operation.  Currently only
 @code{ZERO_EXTRACT} and @code{SIGN_EXTRACT}.  These have three inputs
 and are lvalues (so they can be used for insertion as well).
 @xref{Bit-Fields}.
 
-@item 3
+@item RTX_TERNARY
 An RTX code for other three input operations.  Currently only
-@code{IF_THEN_ELSE}.
+@code{IF_THEN_ELSE} and @code{VEC_MERGE}.
 
-@item i
+@item RTX_INSN
 An RTX code for an entire instruction:  @code{INSN}, @code{JUMP_INSN}, and
 @code{CALL_INSN}.  @xref{Insns}.
 
-@item m
+@item RTX_MATCH
 An RTX code for something that matches in insns, such as
 @code{MATCH_DUP}.  These only occur in machine descriptions.
 
-@item a
+@item RTX_AUTOINC
 An RTX code for an auto-increment addressing mode, such as
 @code{POST_INC}.
 
-@item x
+@item RTX_EXTRA
 All other RTX codes.  This category includes the remaining codes used
 only in machine descriptions (@code{DEFINE_*}, etc.).  It also includes
 all the codes describing side effects (@code{SET}, @code{USE},
 @code{CLOBBER}, etc.) and the non-insns that may appear on an insn
 chain, such as @code{NOTE}, @code{BARRIER}, and @code{CODE_LABEL}.
+@code{SUBREG} is also part of this class.
 @end table
 
 @cindex RTL format


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]