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]

Add MODE argument to REGISTER_MOVE_COST


Someone (rth?) told me having a MODE argument in REGISTER_MOVE_COST
would let us clean up some odd ends in the ia64 port.  It will also
make it easier to assign the right cost to vector-mode moves when no
instructions to perform vector moves are available.

I'm checking this in, approved by Bernd Schmidt.  Tested on
i686-pc-linux-gnu.  I apologize in advance if I break some other
target; I won't even pretend to have tested them all :-(

Index: gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* tm.texi (REGISTER_MOVE_COST): Add a mode argument.
	* reload.c (REGISTER_MOVE_COST): Likewise.  Adjust all callers.
	* reload1.c (REGISTER_MOVE_COST): Likewise.
	* regclass.c (REGISTER_MOVE_COST): Likewise.
	(move_cost, may_move_in_cost, may_move_out_cost): Add mode
	dimension.  Adjust all users.
	(init_reg_sets_1): Iterate on all modes.
	* config/1750a/1750a.h (REGISTER_MOVE_COST): Adjust.
	* config/a29k/a29k.h (REGISTER_MOVE_COST): Adjust.
	* config/alpha/alpha.h (REGISTER_MOVE_COST): Adjust.
	* config/arc/arc.h (REGISTER_MOVE_COST): Adjust.
	* config/arm/arm.h (REGISTER_MOVE_COST): Adjust.
	* config/avr/avr.h (REGISTER_MOVE_COST): Adjust.
	* config/c4x/c4x.h (REGISTER_MOVE_COST): Adjust.
	* config/d30v/d30v.h (REGISTER_MOVE_COST): Adjust.
	* config/dsp16xx/dsp16xx.h (REGISTER_MOVE_COST): Adjust.
	* config/h8300/h8300.h (REGISTER_MOVE_COST): Adjust.
	* config/i386/i386.h (REGISTER_MOVE_COST): Adjust.
	* config/ia64/ia64.h (REGISTER_MOVE_COST): Adjust.
	* config/m32r/m32r.h (REGISTER_MOVE_COST): Adjust.
	* config/m68hc11/m68hc11.h (REGISTER_MOVE_COST): Adjust.
	* config/m68k/m68k.h (REGISTER_MOVE_COST): Adjust.
	* config/mcore/mcore.h (REGISTER_MOVE_COST): Adjust.
	* config/mips/mips.h (REGISTER_MOVE_COST): Adjust.
	* config/mn10200/mn10200.h (REGISTER_MOVE_COST): Adjust.
	* config/mn10300/mn10300.h (REGISTER_MOVE_COST): Adjust.
	* config/ns32k/ns32k.h (REGISTER_MOVE_COST): Adjust.
	* config/pa/pa.h (REGISTER_MOVE_COST): Adjust.
	* config/pdp11/pdp11.h (REGISTER_MOVE_COST): Adjust.
	* config/pj/pj.h (REGISTER_MOVE_COST): Adjust.
	* config/romp/romp.h (REGISTER_MOVE_COST): Adjust.
	* config/rs6000/rs6000.h (REGISTER_MOVE_COST): Adjust.
	* config/sh/sh.h (REGISTER_MOVE_COST): Adjust.
	* config/sparc/sparc.h (REGISTER_MOVE_COST): Adjust.

Index: gcc/regclass.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/regclass.c,v
retrieving revision 1.109
diff -u -p -r1.109 regclass.c
--- gcc/regclass.c 2000/11/30 06:31:18 1.109
+++ gcc/regclass.c 2001/01/01 20:14:07
@@ -1,6 +1,6 @@
 /* Compute register class preferences for pseudo-registers.
    Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996
-   1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+   1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -42,7 +42,7 @@ Boston, MA 02111-1307, USA.  */
 #include "ggc.h"
 
 #ifndef REGISTER_MOVE_COST
-#define REGISTER_MOVE_COST(x, y) 2
+#define REGISTER_MOVE_COST(m, x, y) 2
 #endif
 
 static void init_reg_sets_1	PARAMS ((void));
@@ -177,17 +177,17 @@ enum machine_mode reg_raw_mode[FIRST_PSE
 /* Maximum cost of moving from a register in one class to a register in
    another class.  Based on REGISTER_MOVE_COST.  */
 
-static int move_cost[N_REG_CLASSES][N_REG_CLASSES];
+static int move_cost[MAX_MACHINE_MODE][N_REG_CLASSES][N_REG_CLASSES];
 
 /* Similar, but here we don't have to move if the first index is a subset
    of the second so in that case the cost is zero.  */
 
-static int may_move_in_cost[N_REG_CLASSES][N_REG_CLASSES];
+static int may_move_in_cost[MAX_MACHINE_MODE][N_REG_CLASSES][N_REG_CLASSES];
 
 /* Similar, but here we don't have to move if the first index is a superset
    of the second so in that case the cost is zero.  */
 
-static int may_move_out_cost[N_REG_CLASSES][N_REG_CLASSES];
+static int may_move_out_cost[MAX_MACHINE_MODE][N_REG_CLASSES][N_REG_CLASSES];
 
 #ifdef FORBIDDEN_INC_DEC_CLASSES
 
@@ -287,6 +287,7 @@ static void
 init_reg_sets_1 ()
 {
   register unsigned int i, j;
+  register unsigned int /* enum machine_mode */ m;
 
   /* This macro allows the fixed or call-used registers
      and the register classes to depend on target flags.  */
@@ -426,39 +427,40 @@ init_reg_sets_1 ()
   /* Initialize the move cost table.  Find every subset of each class
      and take the maximum cost of moving any subset to any other.  */
 
-  for (i = 0; i < N_REG_CLASSES; i++)
-    for (j = 0; j < N_REG_CLASSES; j++)
-      {
-	int cost = i == j ? 2 : REGISTER_MOVE_COST (i, j);
-	enum reg_class *p1, *p2;
+  for (m = 0; m < MAX_MACHINE_MODE; m++)
+    for (i = 0; i < N_REG_CLASSES; i++)
+      for (j = 0; j < N_REG_CLASSES; j++)
+	{
+	  int cost = i == j ? 2 : REGISTER_MOVE_COST (m, i, j);
+	  enum reg_class *p1, *p2;
 
-	for (p2 = &reg_class_subclasses[j][0]; *p2 != LIM_REG_CLASSES; p2++)
-	  if (*p2 != i)
-	    cost = MAX (cost, REGISTER_MOVE_COST (i, *p2));
+	  for (p2 = &reg_class_subclasses[j][0]; *p2 != LIM_REG_CLASSES; p2++)
+	    if (*p2 != i)
+	      cost = MAX (cost, REGISTER_MOVE_COST (m, i, *p2));
 
-	for (p1 = &reg_class_subclasses[i][0]; *p1 != LIM_REG_CLASSES; p1++)
-	  {
-	    if (*p1 != j)
-	      cost = MAX (cost, REGISTER_MOVE_COST (*p1, j));
+	  for (p1 = &reg_class_subclasses[i][0]; *p1 != LIM_REG_CLASSES; p1++)
+	    {
+	      if (*p1 != j)
+		cost = MAX (cost, REGISTER_MOVE_COST (m, *p1, j));
 
-	    for (p2 = &reg_class_subclasses[j][0];
-		 *p2 != LIM_REG_CLASSES; p2++)
-	      if (*p1 != *p2)
-		cost = MAX (cost, REGISTER_MOVE_COST (*p1, *p2));
-	  }
+	      for (p2 = &reg_class_subclasses[j][0];
+		   *p2 != LIM_REG_CLASSES; p2++)
+		if (*p1 != *p2)
+		  cost = MAX (cost, REGISTER_MOVE_COST (m, *p1, *p2));
+	    }
 
-	move_cost[i][j] = cost;
+	  move_cost[m][i][j] = cost;
 
-	if (reg_class_subset_p (i, j))
-	  may_move_in_cost[i][j] = 0;
-	else
-	  may_move_in_cost[i][j] = cost;
+	  if (reg_class_subset_p (i, j))
+	    may_move_in_cost[m][i][j] = 0;
+	  else
+	    may_move_in_cost[m][i][j] = cost;
 
-	if (reg_class_subset_p (j, i))
-	  may_move_out_cost[i][j] = 0;
-	else
-	  may_move_out_cost[i][j] = cost;
-      }
+	  if (reg_class_subset_p (j, i))
+	    may_move_out_cost[m][i][j] = 0;
+	  else
+	    may_move_out_cost[m][i][j] = cost;
+	}
 
 #ifdef CLASS_CANNOT_CHANGE_MODE
   {
@@ -564,9 +566,9 @@ memory_move_secondary_cost (mode, class,
     return 0;
 
   if (in)
-    partial_cost = REGISTER_MOVE_COST (altclass, class);
+    partial_cost = REGISTER_MOVE_COST (mode, altclass, class);
   else
-    partial_cost = REGISTER_MOVE_COST (class, altclass);
+    partial_cost = REGISTER_MOVE_COST (mode, class, altclass);
 
   if (class == altclass)
     /* This isn't simply a copy-to-temporary situation.  Can't guess
@@ -1403,10 +1405,10 @@ record_reg_classes (n_alts, n_ops, ops, 
 		  for (class = 0; class < N_REG_CLASSES; class++)
 		    pp->cost[class]
 		      = ((recog_data.operand_type[i] != OP_OUT
-			  ? may_move_in_cost[class][(int) classes[i]]
+			  ? may_move_in_cost[mode][class][(int) classes[i]]
 			  : 0)
 			 + (recog_data.operand_type[i] != OP_IN
-			    ? may_move_out_cost[(int) classes[i]][class]
+			    ? may_move_out_cost[mode][(int) classes[i]][class]
 			    : 0));
 		  
 		  /* If the alternative actually allows memory, make things
@@ -1428,7 +1430,8 @@ record_reg_classes (n_alts, n_ops, ops, 
 
 		  if (reg_pref)
 		    alt_cost
-		      += (may_move_in_cost[(unsigned char) reg_pref[REGNO (op)].prefclass]
+		      += (may_move_in_cost[mode]
+			  [(unsigned char) reg_pref[REGNO (op)].prefclass]
 			  [(int) classes[i]]);
 
 		  if (REGNO (ops[i]) != REGNO (ops[j])
@@ -1615,10 +1618,10 @@ record_reg_classes (n_alts, n_ops, ops, 
 		  for (class = 0; class < N_REG_CLASSES; class++)
 		    pp->cost[class]
 		      = ((recog_data.operand_type[i] != OP_OUT
-			  ? may_move_in_cost[class][(int) classes[i]]
+			  ? may_move_in_cost[mode][class][(int) classes[i]]
 			  : 0)
 			 + (recog_data.operand_type[i] != OP_IN
-			    ? may_move_out_cost[(int) classes[i]][class]
+			    ? may_move_out_cost[mode][(int) classes[i]][class]
 			    : 0));
 
 		  /* If the alternative actually allows memory, make things
@@ -1640,7 +1643,8 @@ record_reg_classes (n_alts, n_ops, ops, 
 
 		  if (reg_pref)
 		    alt_cost
-		      += (may_move_in_cost[(unsigned char) reg_pref[REGNO (op)].prefclass]
+		      += (may_move_in_cost[mode]
+			  [(unsigned char) reg_pref[REGNO (op)].prefclass]
 			  [(int) classes[i]]);
 		}
 	    }
@@ -1729,7 +1733,7 @@ record_reg_classes (n_alts, n_ops, ops, 
 
 	      if ((reg_class_size[(unsigned char) pref]
 		   == CLASS_MAX_NREGS (pref, mode))
-		  && REGISTER_MOVE_COST (pref, pref) < 10 * 2)
+		  && REGISTER_MOVE_COST (mode, pref, pref) < 10 * 2)
 		op_costs[i].cost[(unsigned char) pref] = -1;
 	    }
 	  else if (regno < FIRST_PSEUDO_REGISTER)
@@ -1797,7 +1801,7 @@ copy_cost (x, mode, class, to_p)
 #endif
 
   if (secondary_class != NO_REGS)
-    return (move_cost[(int) secondary_class][(int) class]
+    return (move_cost[mode][(int) secondary_class][(int) class]
 	    + copy_cost (x, mode, secondary_class, 2));
 #endif  /* HAVE_SECONDARY_RELOADS */
 
@@ -1809,7 +1813,7 @@ copy_cost (x, mode, class, to_p)
     return MEMORY_MOVE_COST (mode, class, to_p);
 
   else if (GET_CODE (x) == REG)
-    return move_cost[(int) REGNO_REG_CLASS (REGNO (x))][(int) class];
+    return move_cost[mode][(int) REGNO_REG_CLASS (REGNO (x))][(int) class];
 
   else
     /* If this is a constant, we may eventually want to call rtx_cost here.  */
@@ -1986,7 +1990,7 @@ record_address_regs (x, class, scale)
 	pp->mem_cost += (MEMORY_MOVE_COST (Pmode, class, 1) * scale) / 2;
 
 	for (i = 0; i < N_REG_CLASSES; i++)
-	  pp->cost[i] += (may_move_in_cost[i][(int) class] * scale) / 2;
+	  pp->cost[i] += (may_move_in_cost[Pmode][i][(int) class] * scale) / 2;
       }
       break;
 
Index: gcc/reload.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/reload.c,v
retrieving revision 1.138
diff -u -p -r1.138 reload.c
--- gcc/reload.c 2001/01/01 17:20:08 1.138
+++ gcc/reload.c 2001/01/01 20:14:17
@@ -1,6 +1,6 @@
 /* Search an insn for pseudo regs that must be in hard regs and are not.
    Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000 Free Software Foundation, Inc.
+   1999, 2000, 2001 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -104,7 +104,7 @@ a register with any other reload.  */
 #include "toplev.h"
 
 #ifndef REGISTER_MOVE_COST
-#define REGISTER_MOVE_COST(x, y) 2
+#define REGISTER_MOVE_COST(m, x, y) 2
 #endif
 
 #ifndef REGNO_MODE_OK_FOR_BASE_P
@@ -2467,7 +2467,8 @@ find_reloads (insn, replace, ind_levels,
       && REGNO (SET_DEST (body)) < FIRST_PSEUDO_REGISTER
       && GET_CODE (SET_SRC (body)) == REG
       && REGNO (SET_SRC (body)) < FIRST_PSEUDO_REGISTER
-      && REGISTER_MOVE_COST (REGNO_REG_CLASS (REGNO (SET_SRC (body))),
+      && REGISTER_MOVE_COST (GET_MODE (SET_SRC (body)),
+			     REGNO_REG_CLASS (REGNO (SET_SRC (body))),
 			     REGNO_REG_CLASS (REGNO (SET_DEST (body)))) == 2)
     return 0;
 
Index: gcc/reload1.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/reload1.c,v
retrieving revision 1.247
diff -u -p -r1.247 reload1.c
--- gcc/reload1.c 2000/12/19 16:10:19 1.247
+++ gcc/reload1.c 2001/01/01 20:14:33
@@ -1,6 +1,6 @@
 /* Reload pseudo regs into hard regs for insns that require hard regs.
    Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000 Free Software Foundation, Inc.
+   1999, 2000, 2001 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -81,7 +81,7 @@ Boston, MA 02111-1307, USA.  */
    into the reload registers.  */
 
 #ifndef REGISTER_MOVE_COST
-#define REGISTER_MOVE_COST(x, y) 2
+#define REGISTER_MOVE_COST(m, x, y) 2
 #endif
 
 #ifndef LOCAL_REGNO
@@ -5396,7 +5396,7 @@ choose_reload_regs (chain)
 			     register, we might use it for reload_override_in,
 			     if copying it to the desired class is cheap
 			     enough.  */
-			  || ((REGISTER_MOVE_COST (last_class, class)
+			  || ((REGISTER_MOVE_COST (mode, last_class, class)
 			       < MEMORY_MOVE_COST (mode, class, 1))
 #ifdef SECONDARY_INPUT_RELOAD_CLASS
 			      && (SECONDARY_INPUT_RELOAD_CLASS (class, mode,
@@ -6113,7 +6113,7 @@ emit_input_reload_insns (chain, rl, old,
 
       if (oldequiv != 0
 	  && ((REGNO_REG_CLASS (regno) != rl->class
-	       && (REGISTER_MOVE_COST (REGNO_REG_CLASS (regno),
+	       && (REGISTER_MOVE_COST (mode, REGNO_REG_CLASS (regno),
 				       rl->class)
 		   >= MEMORY_MOVE_COST (mode, rl->class, 1)))
 #ifdef SECONDARY_INPUT_RELOAD_CLASS
@@ -8106,7 +8106,8 @@ reload_cse_simplify_set (set, insn)
   else if (CONSTANT_P (src))
     old_cost = rtx_cost (src, SET);
   else if (GET_CODE (src) == REG)
-    old_cost = REGISTER_MOVE_COST (REGNO_REG_CLASS (REGNO (src)), dclass);
+    old_cost = REGISTER_MOVE_COST (GET_MODE (src),
+				   REGNO_REG_CLASS (REGNO (src)), dclass);
   else
     /* ???   */
     old_cost = rtx_cost (src, SET);
@@ -8120,7 +8121,8 @@ reload_cse_simplify_set (set, insn)
       if (CONSTANT_P (l->loc) && ! references_value_p (l->loc, 0))
 	this_cost = rtx_cost (l->loc, SET);
       else if (GET_CODE (l->loc) == REG)
-	this_cost = REGISTER_MOVE_COST (REGNO_REG_CLASS (REGNO (l->loc)),
+	this_cost = REGISTER_MOVE_COST (GET_MODE (l->loc),
+					REGNO_REG_CLASS (REGNO (l->loc)),
 					dclass);
       else
 	continue;
Index: gcc/tm.texi
===================================================================
RCS file: /cvs/gcc/egcs/gcc/tm.texi,v
retrieving revision 1.158
diff -u -p -r1.158 tm.texi
--- gcc/tm.texi 2000/12/20 09:03:23 1.158
+++ gcc/tm.texi 2001/01/01 20:14:56
@@ -1,4 +1,4 @@
-@c Copyright (C) 1988,1989,1992,1993,1994,1995,1996,1997,1998,1999,2000
+@c Copyright (C) 1988,1989,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001
 @c Free Software Foundation, Inc.
 @c This is part of the GCC manual.
 @c For copying conditions, see the file gcc.texi.
@@ -4869,11 +4869,12 @@ This macro will normally either not be d
 constant.
 
 @findex REGISTER_MOVE_COST
-@item REGISTER_MOVE_COST (@var{from}, @var{to})
-A C expression for the cost of moving data from a register in class
-@var{from} to one in class @var{to}.  The classes are expressed using
-the enumeration values such as @code{GENERAL_REGS}.  A value of 2 is the
-default; other values are interpreted relative to that.
+@item REGISTER_MOVE_COST (@var{mode}, @var{from}, @var{to})
+A C expression for the cost of moving data of mode @var{mode} from a
+register in class @var{from} to one in class @var{to}.  The classes are
+expressed using the enumeration values such as @code{GENERAL_REGS}.  A
+value of 2 is the default; other values are interpreted relative to
+that.
 
 It is not required that the cost always equal 2 when @var{from} is the
 same as @var{to}; on some machines it is expensive to move between
Index: gcc/config/1750a/1750a.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/1750a/1750a.h,v
retrieving revision 1.19
diff -u -p -r1.19 1750a.h
--- gcc/config/1750a/1750a.h 2000/06/27 02:26:15 1.19
+++ gcc/config/1750a/1750a.h 2001/01/01 20:14:59
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler.
    Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999,
-   2000 Free Software Foundation, Inc.
+   2000, 2001 Free Software Foundation, Inc.
    Contributed by O.M.Kellogg, DASA (oliver.kellogg@space.otn.dasa.de)
 
 This file is part of GNU CC.
@@ -904,7 +904,7 @@ enum reg_class { NO_REGS, R2, R0_1, INDE
 
 #define ADDRESS_COST(ADDRESS)  (memop_valid (ADDRESS) ?  3 : 10)
 
-#define REGISTER_MOVE_COST(FROM,TO)	2
+#define REGISTER_MOVE_COST(MODE,FROM,TO)	2
 
 #define MEMORY_MOVE_COST(M,C,I)		4
 
Index: gcc/config/a29k/a29k.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/a29k/a29k.h,v
retrieving revision 1.17
diff -u -p -r1.17 a29k.h
--- gcc/config/a29k/a29k.h 2001/01/01 17:20:09 1.17
+++ gcc/config/a29k/a29k.h 2001/01/01 20:15:03
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler, for AMD Am29000 CPU.
    Copyright (C) 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   2000 Free Software Foundation, Inc.
+   2000, 2001 Free Software Foundation, Inc.
    Contributed by Richard Kenner (kenner@nyu.edu)
 
 This file is part of GNU CC.
@@ -668,7 +668,7 @@ enum reg_class { NO_REGS, LR0_REGS, GENE
    involving a general register is cheap, but moving between the other types
    (even within a class) is two insns.  */
 
-#define REGISTER_MOVE_COST(CLASS1, CLASS2)	\
+#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2)	\
   ((CLASS1) == GENERAL_REGS || (CLASS2) == GENERAL_REGS ? 2 : 4)
 
 /* A C expressions returning the cost of moving data of MODE from a register to
Index: gcc/config/alpha/alpha.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/alpha/alpha.h,v
retrieving revision 1.112
diff -u -p -r1.112 alpha.h
--- gcc/config/alpha/alpha.h 2000/12/01 00:32:12 1.112
+++ gcc/config/alpha/alpha.h 2001/01/01 20:15:07
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler, for DEC Alpha.
    Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000 Free Software Foundation, Inc.
+   2000, 2001 Free Software Foundation, Inc.
    Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
 
 This file is part of GNU CC.
@@ -882,7 +882,7 @@ enum reg_class { NO_REGS, PV_REG, GENERA
    reduce the impact of not being able to allocate a pseudo to a
    hard register.  */
 
-#define REGISTER_MOVE_COST(CLASS1, CLASS2)		\
+#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2)	\
   (((CLASS1) == FLOAT_REGS) == ((CLASS2) == FLOAT_REGS)	\
    ? 2							\
    : TARGET_FIX ? 3 : 4+2*alpha_memory_latency)
Index: gcc/config/arc/arc.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/arc/arc.h,v
retrieving revision 1.24
diff -u -p -r1.24 arc.h
--- gcc/config/arc/arc.h 2000/12/07 01:58:23 1.24
+++ gcc/config/arc/arc.h 2001/01/01 20:15:11
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler, Argonaut ARC cpu.
-   Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000
+   Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001
    Free Software Foundation, Inc.
 
 This file is part of GNU CC.
@@ -1098,7 +1098,7 @@ arc_select_cc_mode (OP, X, Y)
 
 /* Compute extra cost of moving data between one register class
    and another.  */
-#define REGISTER_MOVE_COST(CLASS1, CLASS2) 2
+#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2) 2
 
 /* Compute the cost of moving data between registers and memory.  */
 /* Memory is 3 times as expensive as registers.
Index: gcc/config/arm/arm.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/arm/arm.h,v
retrieving revision 1.93
diff -u -p -r1.93 arm.h
--- gcc/config/arm/arm.h 2000/12/22 18:22:03 1.93
+++ gcc/config/arm/arm.h 2001/01/01 20:15:16
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler, for ARM.
-   Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
-   Free Software Foundation, Inc.
+   Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+   2001 Free Software Foundation, Inc.
    Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
    and Martin Simmons (@harleqn.co.uk).
    More major hacks by Richard Earnshaw (rearnsha@arm.com)
@@ -1312,7 +1312,7 @@ enum reg_class
   ((CLASS) == FPU_REGS ? 1 : NUM_REGS (MODE))
 
 /* Moves between FPU_REGS and GENERAL_REGS are two memory insns.  */
-#define REGISTER_MOVE_COST(FROM, TO)			\
+#define REGISTER_MOVE_COST(MODE, FROM, TO)		\
   (TARGET_ARM ?						\
    ((FROM) == FPU_REGS && (TO) != FPU_REGS ? 20 :	\
     (FROM) != FPU_REGS && (TO) == FPU_REGS ? 20 : 2)	\
Index: gcc/config/avr/avr.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/avr/avr.h,v
retrieving revision 1.16
diff -u -p -r1.16 avr.h
--- gcc/config/avr/avr.h 2000/11/19 07:10:54 1.16
+++ gcc/config/avr/avr.h 2001/01/01 20:15:23
@@ -1,7 +1,7 @@
 /* Definitions of target machine for GNU compiler,
    for ATMEL AVR at90s8515, ATmega103/103L, ATmega603/603L microcontrollers.
 
-   Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
    Contributed by Denis Chertykov (denisc@overta.ru)
 
 This file is part of GNU CC.
@@ -1864,9 +1864,9 @@ do {									    \
    This macro will normally either not be defined or be defined as a
    constant.  */
 
-#define REGISTER_MOVE_COST(FROM, TO) ((FROM) == STACK_REG ? 6 : \
-				      (TO) == STACK_REG ? 12    \
-				      : 2)
+#define REGISTER_MOVE_COST(MODE, FROM, TO) ((FROM) == STACK_REG ? 6 \
+					    : (TO) == STACK_REG ? 12 \
+					    : 2)
 /* A C expression for the cost of moving data from a register in class
    FROM to one in class TO.  The classes are expressed using the
    enumeration values such as `GENERAL_REGS'.  A value of 2 is the
Index: gcc/config/c4x/c4x.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/c4x/c4x.h,v
retrieving revision 1.63
diff -u -p -r1.63 c4x.h
--- gcc/config/c4x/c4x.h 2000/12/17 08:18:35 1.63
+++ gcc/config/c4x/c4x.h 2001/01/01 20:15:28
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler.  TMS320C[34]x
    Copyright (C) 1994, 1995, 1996, 1997, 1998,
-   1999, 2000 Free Software Foundation, Inc.
+   1999, 2000, 2001 Free Software Foundation, Inc.
 
    Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz)
               and Herman Ten Brugge (Haj.Ten.Brugge@net.HCC.nl).
@@ -1889,7 +1889,7 @@ if (REG_P (OP1) && ! REG_P (OP0))			\
 /* Compute extra cost of moving data between one register class
    and another.  */
 
-#define REGISTER_MOVE_COST(FROM, TO)	2
+#define REGISTER_MOVE_COST(MODE, FROM, TO)	2
 
 /* Memory move cost is same as fast register move.  Maybe this should
    be bumped up?.  */
Index: gcc/config/d30v/d30v.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/d30v/d30v.h,v
retrieving revision 1.14
diff -u -p -r1.14 d30v.h
--- gcc/config/d30v/d30v.h 2000/12/19 00:04:42 1.14
+++ gcc/config/d30v/d30v.h 2001/01/01 20:15:42
@@ -1,5 +1,6 @@
 /* Definitions of target machine for Mitsubishi D30V.
-   Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 1999, 2000, 2001
+   Free Software Foundation, Inc.
    Contributed by Cygnus Solutions.
 
    This file is part of GNU CC.
@@ -3766,7 +3767,7 @@ do {									\
    the constraints are met.  You should do this if the `movM' pattern's
    constraints do not allow such copying.  */
 
-#define REGISTER_MOVE_COST(FROM, TO)					\
+#define REGISTER_MOVE_COST(MODE, FROM, TO)				\
   (((FROM) != GPR_REGS && (FROM) != EVEN_REGS				\
    && (TO) != GPR_REGS && (TO) != EVEN_REGS) ? 4 : 2)
 
Index: gcc/config/dsp16xx/dsp16xx.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/dsp16xx/dsp16xx.h,v
retrieving revision 1.19
diff -u -p -r1.19 dsp16xx.h
--- gcc/config/dsp16xx/dsp16xx.h 2000/05/01 17:19:34 1.19
+++ gcc/config/dsp16xx/dsp16xx.h 2001/01/01 20:15:44
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler.  AT&T DSP1600.
-   Copyright (C) 1994, 1995, 1996, 1997, 1998,2000
+   Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001
    Free Software Foundation, Inc.
    Contributed by Michael Collison (collison@world.std.com).
 
@@ -1517,7 +1517,7 @@ extern struct dsp16xx_frame_info current
    class FROM to one in class TO. The classes are expressed using
    the enumeration values such as GENERAL_REGS. A value of 2 is
    the default. */
-#define REGISTER_MOVE_COST(FROM,TO)  dsp16xx_register_move_cost (FROM, TO)
+#define REGISTER_MOVE_COST(MODE,FROM,TO)  dsp16xx_register_move_cost (FROM, TO)
 
 /* A C expression for the cost of moving data of mode MODE between
    a register and memory. A value of 2 is the default. */
Index: gcc/config/h8300/h8300.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/h8300/h8300.h,v
retrieving revision 1.38
diff -u -p -r1.38 h8300.h
--- gcc/config/h8300/h8300.h 2000/12/07 03:14:30 1.38
+++ gcc/config/h8300/h8300.h 2001/01/01 20:15:47
@@ -1,7 +1,7 @@
 /* Definitions of target machine for GNU compiler. 
    Hitachi H8/300 version generating coff 
-   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1996, 1997, 1998, 1999, 2000
-   Free SoftwareFoundation, Inc.
+   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1996, 1997, 1998, 1999,
+   2000, 2001 Free Software Foundation, Inc.
    Contributed by Steve Chamberlain (sac@cygnus.com),
    Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@cygnus.com).
 
@@ -471,7 +471,7 @@ enum reg_class {
    so define REGISTER_MOVE_COST to be > 2 so that reload never
    shortcuts.  */
 
-#define REGISTER_MOVE_COST(CLASS1, CLASS2)  \
+#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2)  \
   (CLASS1 == MAC_REGS || CLASS2 == MAC_REGS ? 6 : 3)
 
 /* Stack layout; function entry, exit and calling.  */
Index: gcc/config/i386/i386.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/i386.h,v
retrieving revision 1.139
diff -u -p -r1.139 i386.h
--- gcc/config/i386/i386.h 2000/12/19 17:41:20 1.139
+++ gcc/config/i386/i386.h 2001/01/01 20:15:52
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler for IA-32.
-   Copyright (C) 1988, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000
-   Free Software Foundation, Inc.
+   Copyright (C) 1988, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+   2001 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -2339,7 +2339,7 @@ while (0)
    arbitary high cost.
  */
 
-#define REGISTER_MOVE_COST(CLASS1, CLASS2)			\
+#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2)		\
   ((FLOAT_CLASS_P (CLASS1) && ! FLOAT_CLASS_P (CLASS2))		\
    ? (MEMORY_MOVE_COST (DFmode, CLASS1, 0)			\
      + MEMORY_MOVE_COST (DFmode, CLASS2, 1))			\
Index: gcc/config/ia64/ia64.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/ia64/ia64.h,v
retrieving revision 1.57
diff -u -p -r1.57 ia64.h
--- gcc/config/ia64/ia64.h 2000/12/21 18:26:07 1.57
+++ gcc/config/ia64/ia64.h 2001/01/01 20:15:58
@@ -1,5 +1,5 @@
 /* Definitions of target machine GNU compiler.  IA-64 version.
-   Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
    Contributed by James E. Wilson <wilson@cygnus.com> and
    		  David Mosberger <davidm@hpl.hp.com>.
 
@@ -1885,7 +1885,7 @@ do {									\
 /* A C expression for the cost of moving data from a register in class FROM to
    one in class TO.  */
 
-#define REGISTER_MOVE_COST(FROM, TO) \
+#define REGISTER_MOVE_COST(MODE, FROM, TO) \
   ia64_register_move_cost((FROM), (TO))
 
 /* A C expression for the cost of moving data of mode M between a
Index: gcc/config/m32r/m32r.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/m32r/m32r.h,v
retrieving revision 1.35
diff -u -p -r1.35 m32r.h
--- gcc/config/m32r/m32r.h 2000/12/19 17:41:20 1.35
+++ gcc/config/m32r/m32r.h 2001/01/01 20:16:02
@@ -1,5 +1,6 @@
 /* Definitions of target machine for GNU compiler, Mitsubishi M32R cpu.
-   Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+   Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -1469,7 +1470,7 @@ do {									\
 
 /* Compute extra cost of moving data between one register class
    and another.  */
-#define REGISTER_MOVE_COST(CLASS1, CLASS2) 2
+#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2) 2
 
 /* Compute the cost of moving data between registers and memory.  */
 /* Memory is 3 times as expensive as registers.
Index: gcc/config/m68hc11/m68hc11.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/m68hc11/m68hc11.h,v
retrieving revision 1.3
diff -u -p -r1.3 m68hc11.h
--- gcc/config/m68hc11/m68hc11.h 2000/09/25 13:22:44 1.3
+++ gcc/config/m68hc11/m68hc11.h 2001/01/01 20:16:06
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler.
    Motorola 68HC11 and 68HC12.
-   Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
    Contributed by Stephane Carrez (stcarrez@worldnet.fr)
 
 This file is part of GNU CC.
@@ -1511,7 +1511,7 @@ extern unsigned char m68hc11_reg_valid_f
 #define ADDRESS_COST(RTX) m68hc11_address_cost (RTX)
 
 /* Move costs between classes of registers */
-#define REGISTER_MOVE_COST(CLASS1, CLASS2)	\
+#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2)	\
     (m68hc11_register_move_cost (CLASS1, CLASS2))
 
 /* Move cost between register and memory.
Index: gcc/config/m68k/m68k.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/m68k/m68k.h,v
retrieving revision 1.47
diff -u -p -r1.47 m68k.h
--- gcc/config/m68k/m68k.h 2000/09/25 13:22:45 1.47
+++ gcc/config/m68k/m68k.h 2001/01/01 20:16:10
@@ -1,6 +1,7 @@
-/* Definitions of target machine for GNU compiler.  Sun 68000/68020 version.
-   Copyright (C) 1987, 1988, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
-   Free Software Foundation, Inc.
+/* Definitions of target machine for GNU compiler.
+   Sun 68000/68020 version.
+   Copyright (C) 1987, 1988, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+   2000, 2001 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -869,7 +870,7 @@ extern enum reg_class regno_reg_class[];
   : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
 
 /* Moves between fp regs and other regs are two insns.  */
-#define REGISTER_MOVE_COST(CLASS1, CLASS2)		\
+#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2)	\
   (((CLASS1) == FP_REGS && (CLASS2) != FP_REGS)	        \
     || ((CLASS2) == FP_REGS && (CLASS1) != FP_REGS)	\
     ? 4 : 2)
@@ -882,7 +883,7 @@ extern enum reg_class regno_reg_class[];
 
 /* Moves between fp regs and other regs are two insns.  */
 /* Likewise for high fpa regs and other regs.  */
-#define REGISTER_MOVE_COST(CLASS1, CLASS2)		\
+#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2)	\
   ((((CLASS1) == FP_REGS && (CLASS2) != FP_REGS)	\
     || ((CLASS2) == FP_REGS && (CLASS1) != FP_REGS)	\
     || ((CLASS1) == FPA_REGS && (CLASS2) != FPA_REGS)	\
Index: gcc/config/mcore/mcore.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mcore/mcore.h,v
retrieving revision 1.4
diff -u -p -r1.4 mcore.h
--- gcc/config/mcore/mcore.h 2000/12/18 23:58:18 1.4
+++ gcc/config/mcore/mcore.h 2001/01/01 20:16:13
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler,
    for Motorola M*CORE Processor.
-   Copyright (C) 1993, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1993, 1999, 2000, 2001 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -1066,7 +1066,7 @@ extern enum reg_class reg_class_from_let
 
 /* Compute extra cost of moving data between one register class
    and another.  All register moves are cheap.  */
-#define REGISTER_MOVE_COST(SRCCLASS, DSTCLASS) 2
+#define REGISTER_MOVE_COST(MODE, SRCCLASS, DSTCLASS) 2
 
 #define WORD_REGISTER_OPERATIONS
 
Index: gcc/config/mips/mips.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mips/mips.h,v
retrieving revision 1.106
diff -u -p -r1.106 mips.h
--- gcc/config/mips/mips.h 2000/11/02 23:29:12 1.106
+++ gcc/config/mips/mips.h 2001/01/01 20:16:21
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler.  MIPS version.
    Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998
-   1999, 2000 Free Software Foundation, Inc.
+   1999, 2000, 2001 Free Software Foundation, Inc.
    Contributed by A. Lichnewsky (lich@inria.inria.fr).
    Changed by Michael Meissner	(meissner@osf.org).
    64 bit r4000 support by Ian Lance Taylor (ian@cygnus.com) and
@@ -3622,7 +3622,7 @@ while (0)
    compare/branch to test the input value to see which instruction we
    need to use.  This gets pretty messy, but it is feasible. */
 
-#define REGISTER_MOVE_COST(FROM, TO)	\
+#define REGISTER_MOVE_COST(MODE, FROM, TO)	\
   ((FROM) == M16_REGS && GR_REG_CLASS_P (TO) ? 2			\
    : (FROM) == M16_NA_REGS && GR_REG_CLASS_P (TO) ? 2			\
    : GR_REG_CLASS_P (FROM) && (TO) == M16_REGS ? 2			\
Index: gcc/config/mn10200/mn10200.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mn10200/mn10200.h,v
retrieving revision 1.23
diff -u -p -r1.23 mn10200.h
--- gcc/config/mn10200/mn10200.h 2000/05/16 18:18:32 1.23
+++ gcc/config/mn10200/mn10200.h 2001/01/01 20:16:24
@@ -1,5 +1,7 @@
-/* Definitions of target machine for GNU compiler. Matsushita MN10200 series
-   Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Definitions of target machine for GNU compiler.
+   Matsushita MN10200 series
+   Copyright (C) 1997, 1998, 1999, 2000, 2001
+   Free Software Foundation, Inc.
    Contributed by Jeff Law (law@cygnus.com).
 
 This file is part of GNU CC.
@@ -781,7 +783,7 @@ struct cum_arg { int nbytes; };
 
 /* Make moves between different classes more expensive than moves
    within the same class.  */
-#define REGISTER_MOVE_COST(CLASS1, CLASS2)  (CLASS1 != CLASS2 ? 4 : 2)
+#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2)  (CLASS1 != CLASS2 ? 4 : 2)
 
 /* Provide the costs of a rtl expression.  This is in the body of a
    switch on CODE. 
Index: gcc/config/mn10300/mn10300.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mn10300/mn10300.h,v
retrieving revision 1.41
diff -u -p -r1.41 mn10300.h
--- gcc/config/mn10300/mn10300.h 2000/10/24 22:45:46 1.41
+++ gcc/config/mn10300/mn10300.h 2001/01/01 20:16:26
@@ -1,5 +1,7 @@
-/* Definitions of target machine for GNU compiler. Matsushita MN10300 series
-   Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Definitions of target machine for GNU compiler.
+   Matsushita MN10300 series
+   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+   Free Software Foundation, Inc.
    Contributed by Jeff Law (law@cygnus.com).
 
 This file is part of GNU CC.
@@ -838,7 +840,7 @@ struct cum_arg {int nbytes; };
   case CONST_DOUBLE:							\
     return 8;
 
-#define REGISTER_MOVE_COST(CLASS1, CLASS2) \
+#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2) \
   ((CLASS1 == CLASS2 && (CLASS1 == ADDRESS_REGS || CLASS1 == DATA_REGS)) ? 2 :\
    ((CLASS1 == ADDRESS_REGS || CLASS1 == DATA_REGS) && \
     (CLASS2 == ADDRESS_REGS || CLASS2 == DATA_REGS)) ? 4 : \
Index: gcc/config/ns32k/ns32k.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/ns32k/ns32k.h,v
retrieving revision 1.17
diff -u -p -r1.17 ns32k.h
--- gcc/config/ns32k/ns32k.h 2000/11/02 23:29:12 1.17
+++ gcc/config/ns32k/ns32k.h 2001/01/01 20:16:29
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler.  NS32000 version.
-   Copyright (C) 1988, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
-   Free Software Foundation, Inc.
+   Copyright (C) 1988, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+   2001 Free Software Foundation, Inc.
    Contributed by Michael Tiemann (tiemann@cygnus.com)
 
 This file is part of GNU CC.
@@ -1477,7 +1477,8 @@ while (0)
   to memory move (default cost 4)
  */
 
-#define REGISTER_MOVE_COST(CLASS1, CLASS2)  register_move_cost(CLASS1, CLASS2)
+#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2) \
+  register_move_cost (CLASS1, CLASS2)
 
 #define OUTPUT_JUMP(NORMAL, NO_OV)  \
 { if (cc_status.flags & CC_NO_OVERFLOW)				\
Index: gcc/config/pa/pa.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/pa/pa.h,v
retrieving revision 1.98
diff -u -p -r1.98 pa.h
--- gcc/config/pa/pa.h 2000/12/11 21:17:34 1.98
+++ gcc/config/pa/pa.h 2001/01/01 20:16:33
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler, for the HP Spectrum.
-   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
-   Free Software Foundation, Inc.
+   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+   2001 Free Software Foundation, Inc.
    Contributed by Michael Tiemann (tiemann@cygnus.com) of Cygnus Support
    and Tim Moore (moore@defmacro.cs.utah.edu) of the Center for
    Software Science at the University of Utah.
@@ -1631,7 +1631,7 @@ while (0)
    expensive because they must go through memory.
 
    Other copies are reasonably cheap.  */
-#define REGISTER_MOVE_COST(CLASS1, CLASS2) \
+#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2) \
  (CLASS1 == SHIFT_REGS ? 0x100					\
   : FP_REG_CLASS_P (CLASS1) && ! FP_REG_CLASS_P (CLASS2) ? 16	\
   : FP_REG_CLASS_P (CLASS2) && ! FP_REG_CLASS_P (CLASS1) ? 16	\
Index: gcc/config/pdp11/pdp11.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/pdp11/pdp11.h,v
retrieving revision 1.22
diff -u -p -r1.22 pdp11.h
--- gcc/config/pdp11/pdp11.h 2000/12/07 01:58:24 1.22
+++ gcc/config/pdp11/pdp11.h 2001/01/01 20:16:36
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler, for the pdp-11
-   Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000
+   Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000, 2001
    Free Software Foundation, Inc.
    Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at).
 
@@ -979,7 +979,8 @@ extern int may_call_alloca;
     return 4;
 
 /* cost of moving one register class to another */
-#define REGISTER_MOVE_COST(CLASS1, CLASS2) register_move_cost(CLASS1, CLASS2)
+#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2) \
+  register_move_cost (CLASS1, CLASS2)
 
 /* Tell emit-rtl.c how to initialize special values on a per-function base.  */
 extern int optimize;
Index: gcc/config/pj/pj.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/pj/pj.h,v
retrieving revision 1.6
diff -u -p -r1.6 pj.h
--- gcc/config/pj/pj.h 2000/12/18 23:58:19 1.6
+++ gcc/config/pj/pj.h 2001/01/01 20:16:38
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler for picoJava
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -1030,7 +1030,7 @@ struct pj_args
 /* Compute extra cost of moving data between one register class and
    another.  */
 
-#define REGISTER_MOVE_COST(SRC_CLASS, DST_CLASS)                \
+#define REGISTER_MOVE_COST(MODE, SRC_CLASS, DST_CLASS)                \
       ((SRC_CLASS == STD_REGS || SRC_CLASS == ARG_REGS)?  2 : 10)
 
 
Index: gcc/config/romp/romp.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/romp/romp.h,v
retrieving revision 1.13
diff -u -p -r1.13 romp.h
--- gcc/config/romp/romp.h 2000/12/07 01:58:24 1.13
+++ gcc/config/romp/romp.h 2001/01/01 20:16:41
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler, for ROMP chip.
-   Copyright (C) 1989, 1991, 1993, 1995, 1996, 1998, 1999, 2000
+   Copyright (C) 1989, 1991, 1993, 1995, 1996, 1998, 1999, 2000, 2001
    Free Software Foundation, Inc.
    Contributed by Richard Kenner (kenner@nyu.edu)
 
@@ -246,7 +246,7 @@ extern int target_flags;
 
    On the ROMP, access to floating-point registers is expensive (even between
    two FP regs.)  */
-#define REGISTER_MOVE_COST(CLASS1, CLASS2)	\
+#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2)	\
   (2 + 10 * ((CLASS1) == FP_REGS) + 10 * (CLASS2 == FP_REGS))
 
 /* Specify the registers used for certain standard purposes.
Index: gcc/config/rs6000/rs6000.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/rs6000.h,v
retrieving revision 1.96
diff -u -p -r1.96 rs6000.h
--- gcc/config/rs6000/rs6000.h 2000/10/17 22:17:34 1.96
+++ gcc/config/rs6000/rs6000.h 2001/01/01 20:16:46
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler, for IBM RS/6000.
    Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000 Free Software Foundation, Inc.
+   2000, 2001 Free Software Foundation, Inc.
    Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
 
 This file is part of GNU CC.
@@ -796,7 +796,7 @@ extern int rs6000_debug_arg;		/* debug a
    On the RS/6000, copying between floating-point and fixed-point
    registers is expensive.  */
 
-#define REGISTER_MOVE_COST(CLASS1, CLASS2)			\
+#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2)		\
   ((CLASS1) == FLOAT_REGS && (CLASS2) == FLOAT_REGS ? 2		\
    : (CLASS1) == FLOAT_REGS && (CLASS2) != FLOAT_REGS ? 10	\
    : (CLASS1) != FLOAT_REGS && (CLASS2) == FLOAT_REGS ? 10	\
Index: gcc/config/sh/sh.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/sh/sh.h,v
retrieving revision 1.91
diff -u -p -r1.91 sh.h
--- gcc/config/sh/sh.h 2000/12/16 19:40:19 1.91
+++ gcc/config/sh/sh.h 2001/01/01 20:16:51
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler for Hitachi Super-H.
-   Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+   Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
    Free Software Foundation, Inc.
    Contributed by Steve Chamberlain (sac@cygnus.com).
    Improved by Jim Wilson (wilson@cygnus.com).
@@ -1817,7 +1817,7 @@ while (0)
    If SECONDARY*_RELOAD_CLASS says something about the src/dst pair,
    it uses this information.  Hence, the general register <-> floating point
    register information here is not used for SFmode.  */
-#define REGISTER_MOVE_COST(SRCCLASS, DSTCLASS) \
+#define REGISTER_MOVE_COST(MODE, SRCCLASS, DSTCLASS) \
   ((((DSTCLASS) == T_REGS) || ((DSTCLASS) == PR_REGS)) ? 10		\
    : ((((DSTCLASS) == FP0_REGS || (DSTCLASS) == FP_REGS || (DSTCLASS) == DF_REGS) \
        && ((SRCCLASS) == GENERAL_REGS || (SRCCLASS) == R0_REGS))	\
Index: gcc/config/sparc/sparc.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/sparc/sparc.h,v
retrieving revision 1.126
diff -u -p -r1.126 sparc.h
--- gcc/config/sparc/sparc.h 2000/12/19 17:41:20 1.126
+++ gcc/config/sparc/sparc.h 2001/01/01 20:16:57
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler, for Sun SPARC.
    Copyright (C) 1987, 1988, 1989, 1992, 1994, 1995, 1996, 1997, 1998, 1999
-   2000 Free Software Foundation, Inc.
+   2000, 2001 Free Software Foundation, Inc.
    Contributed by Michael Tiemann (tiemann@cygnus.com).
    64 bit SPARC V9 support by Michael Tiemann, Jim Wilson, and Doug Evans,
    at Cygnus Support.
@@ -2858,7 +2858,7 @@ do {                                    
 /* Compute extra cost of moving data between one register class
    and another.  */
 #define GENERAL_OR_I64(C) ((C) == GENERAL_REGS || (C) == I64_REGS)
-#define REGISTER_MOVE_COST(CLASS1, CLASS2)			\
+#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2)		\
   (((FP_REG_CLASS_P (CLASS1) && GENERAL_OR_I64 (CLASS2)) \
     || (GENERAL_OR_I64 (CLASS1) && FP_REG_CLASS_P (CLASS2)) \
     || (CLASS1) == FPCC_REGS || (CLASS2) == FPCC_REGS)		\

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

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