aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2001-01-01 20:35:36 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2001-01-01 20:35:36 +0000
commitcf01124384cddd2ab5526a356a5ad7628c73f017 (patch)
tree6dfbf9e75a7a04b3792f908d155d1d310cac34a7 /gcc
parente38fe8e0cb53df06102d753bc27124ce5930af3e (diff)
downloadgcc-cf01124384cddd2ab5526a356a5ad7628c73f017.zip
gcc-cf01124384cddd2ab5526a356a5ad7628c73f017.tar.gz
gcc-cf01124384cddd2ab5526a356a5ad7628c73f017.tar.bz2
tm.texi (REGISTER_MOVE_COST): Add a mode argument.
* 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. From-SVN: r38597
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog37
-rw-r--r--gcc/config/1750a/1750a.h4
-rw-r--r--gcc/config/a29k/a29k.h4
-rw-r--r--gcc/config/alpha/alpha.h4
-rw-r--r--gcc/config/arc/arc.h4
-rw-r--r--gcc/config/arm/arm.h6
-rw-r--r--gcc/config/avr/avr.h8
-rw-r--r--gcc/config/c4x/c4x.h4
-rw-r--r--gcc/config/d30v/d30v.h5
-rw-r--r--gcc/config/dsp16xx/dsp16xx.h4
-rw-r--r--gcc/config/h8300/h8300.h6
-rw-r--r--gcc/config/i386/i386.h6
-rw-r--r--gcc/config/ia64/ia64.h4
-rw-r--r--gcc/config/m32r/m32r.h5
-rw-r--r--gcc/config/m68hc11/m68hc11.h4
-rw-r--r--gcc/config/m68k/m68k.h11
-rw-r--r--gcc/config/mcore/mcore.h4
-rw-r--r--gcc/config/mips/mips.h4
-rw-r--r--gcc/config/mn10200/mn10200.h8
-rw-r--r--gcc/config/mn10300/mn10300.h8
-rw-r--r--gcc/config/ns32k/ns32k.h7
-rw-r--r--gcc/config/pa/pa.h6
-rw-r--r--gcc/config/pdp11/pdp11.h5
-rw-r--r--gcc/config/pj/pj.h4
-rw-r--r--gcc/config/romp/romp.h4
-rw-r--r--gcc/config/rs6000/rs6000.h4
-rw-r--r--gcc/config/sh/sh.h4
-rw-r--r--gcc/config/sparc/sparc.h4
28 files changed, 112 insertions, 66 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d3d1c09..ae51434 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,40 @@
+2001-01-01 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.
+
2001-01-01 Bernd Schmidt <bernds@redhat.com>
* alias.c (fixed_scalar_and_varying_struct): Adjust prototype of
diff --git a/gcc/config/1750a/1750a.h b/gcc/config/1750a/1750a.h
index d5ad9d1..94f4262 100644
--- a/gcc/config/1750a/1750a.h
+++ b/gcc/config/1750a/1750a.h
@@ -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, INDEX_REGS, BASE_REGS, ALL_REGS, LIM_REG_CLA
#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
diff --git a/gcc/config/a29k/a29k.h b/gcc/config/a29k/a29k.h
index d998e42..12c6526 100644
--- a/gcc/config/a29k/a29k.h
+++ b/gcc/config/a29k/a29k.h
@@ -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, GENERAL_REGS, BP_REGS, FC_REGS, CR_REGS,
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
diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h
index 8645730..dc2a1ec 100644
--- a/gcc/config/alpha/alpha.h
+++ b/gcc/config/alpha/alpha.h
@@ -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, GENERAL_REGS, FLOAT_REGS, ALL_REGS,
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)
diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h
index de005e6..520266b 100644
--- a/gcc/config/arc/arc.h
+++ b/gcc/config/arc/arc.h
@@ -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.
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 68affb4..6170187 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -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) \
diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h
index 897dffe..4688604 100644
--- a/gcc/config/avr/avr.h
+++ b/gcc/config/avr/avr.h
@@ -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
diff --git a/gcc/config/c4x/c4x.h b/gcc/config/c4x/c4x.h
index c651b38..eec7916 100644
--- a/gcc/config/c4x/c4x.h
+++ b/gcc/config/c4x/c4x.h
@@ -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?. */
diff --git a/gcc/config/d30v/d30v.h b/gcc/config/d30v/d30v.h
index 716b19c..0792b07 100644
--- a/gcc/config/d30v/d30v.h
+++ b/gcc/config/d30v/d30v.h
@@ -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)
diff --git a/gcc/config/dsp16xx/dsp16xx.h b/gcc/config/dsp16xx/dsp16xx.h
index dc3a91a..ccb6378 100644
--- a/gcc/config/dsp16xx/dsp16xx.h
+++ b/gcc/config/dsp16xx/dsp16xx.h
@@ -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_frame_info;
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. */
diff --git a/gcc/config/h8300/h8300.h b/gcc/config/h8300/h8300.h
index 0cc1808..a0862c5 100644
--- a/gcc/config/h8300/h8300.h
+++ b/gcc/config/h8300/h8300.h
@@ -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. */
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index 111ea18..4f59fb8 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -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)) \
diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h
index 424fa77..d959c70 100644
--- a/gcc/config/ia64/ia64.h
+++ b/gcc/config/ia64/ia64.h
@@ -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
diff --git a/gcc/config/m32r/m32r.h b/gcc/config/m32r/m32r.h
index d83e2fe..bdc8eaa 100644
--- a/gcc/config/m32r/m32r.h
+++ b/gcc/config/m32r/m32r.h
@@ -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.
diff --git a/gcc/config/m68hc11/m68hc11.h b/gcc/config/m68hc11/m68hc11.h
index c7f9e34..26ea8aa 100644
--- a/gcc/config/m68hc11/m68hc11.h
+++ b/gcc/config/m68hc11/m68hc11.h
@@ -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_for_index[FIRST_PSEUDO_REGISTER];
#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.
diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h
index 38e3480..c20cba1 100644
--- a/gcc/config/m68k/m68k.h
+++ b/gcc/config/m68k/m68k.h
@@ -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) \
diff --git a/gcc/config/mcore/mcore.h b/gcc/config/mcore/mcore.h
index 8766703..a6eb358 100644
--- a/gcc/config/mcore/mcore.h
+++ b/gcc/config/mcore/mcore.h
@@ -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_letter[];
/* 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
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 5ad35bb..19d4b8f 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -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 \
diff --git a/gcc/config/mn10200/mn10200.h b/gcc/config/mn10200/mn10200.h
index 6df67ba..fe552ce 100644
--- a/gcc/config/mn10200/mn10200.h
+++ b/gcc/config/mn10200/mn10200.h
@@ -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.
diff --git a/gcc/config/mn10300/mn10300.h b/gcc/config/mn10300/mn10300.h
index 2de94f4..e642537 100644
--- a/gcc/config/mn10300/mn10300.h
+++ b/gcc/config/mn10300/mn10300.h
@@ -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 : \
diff --git a/gcc/config/ns32k/ns32k.h b/gcc/config/ns32k/ns32k.h
index d696a5e..150d6ba 100644
--- a/gcc/config/ns32k/ns32k.h
+++ b/gcc/config/ns32k/ns32k.h
@@ -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) \
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
index 027e2df..ad8643c 100644
--- a/gcc/config/pa/pa.h
+++ b/gcc/config/pa/pa.h
@@ -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 \
diff --git a/gcc/config/pdp11/pdp11.h b/gcc/config/pdp11/pdp11.h
index 190a594..39aac2f 100644
--- a/gcc/config/pdp11/pdp11.h
+++ b/gcc/config/pdp11/pdp11.h
@@ -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;
diff --git a/gcc/config/pj/pj.h b/gcc/config/pj/pj.h
index 8624fa2..39f8d79 100644
--- a/gcc/config/pj/pj.h
+++ b/gcc/config/pj/pj.h
@@ -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)
diff --git a/gcc/config/romp/romp.h b/gcc/config/romp/romp.h
index d8784c9..1ba8769 100644
--- a/gcc/config/romp/romp.h
+++ b/gcc/config/romp/romp.h
@@ -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.
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index 3bb567b..170e5a9 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -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 argument handling */
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 \
diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h
index 352d7c5..df377a3 100644
--- a/gcc/config/sh/sh.h
+++ b/gcc/config/sh/sh.h
@@ -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)) \
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h
index 50ab2ab..1ff6d31 100644
--- a/gcc/config/sparc/sparc.h
+++ b/gcc/config/sparc/sparc.h
@@ -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) \