aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatoly Sokolov <aesok@post.ru>2011-03-08 23:51:11 +0300
committerAnatoly Sokolov <aesok@gcc.gnu.org>2011-03-08 23:51:11 +0300
commitef78aed645ba8b781a9a78412669738dc7871c6a (patch)
tree83329558ce8e006570b0aab88fa167b7dbb53a47
parent5f892aa09229fb2b545b03002266f89bd653d39f (diff)
downloadgcc-ef78aed645ba8b781a9a78412669738dc7871c6a.zip
gcc-ef78aed645ba8b781a9a78412669738dc7871c6a.tar.gz
gcc-ef78aed645ba8b781a9a78412669738dc7871c6a.tar.bz2
mips.h (PREFERRED_RELOAD_CLASS): Remove macro.
* config/mips/mips.h (PREFERRED_RELOAD_CLASS): Remove macro. * config/mips/mips-protos.h (mips_preferred_reload_class): Remove. * config/mips/mips.c (mips_preferred_reload_class): Make static. Change 'rclass' argument and result type to reg_class_t. (TARGET_PREFERRED_RELOAD_CLASS): Define. From-SVN: r170789
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/mips/mips-protos.h3
-rw-r--r--gcc/config/mips/mips.c12
-rw-r--r--gcc/config/mips/mips.h3
4 files changed, 17 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6b1a720..2f6aa62 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2011-03-08 Anatoly Sokolov <aesok@post.ru>
+
+ * config/mips/mips.h (PREFERRED_RELOAD_CLASS): Remove macro.
+ * config/mips/mips-protos.h (mips_preferred_reload_class): Remove.
+ * config/mips/mips.c (mips_preferred_reload_class): Make static.
+ Change 'rclass' argument and result type to reg_class_t.
+ (TARGET_PREFERRED_RELOAD_CLASS): Define.
+
2011-03-08 Georg-Johann Lay <avr@gjlay.de>
* config/avr/avr.h (REGISTER_MOVE_COST, MEMORY_MOVE_COST): Remove.
diff --git a/gcc/config/mips/mips-protos.h b/gcc/config/mips/mips-protos.h
index c00abc2..6114598 100644
--- a/gcc/config/mips/mips-protos.h
+++ b/gcc/config/mips/mips-protos.h
@@ -1,6 +1,6 @@
/* Prototypes of target machine for GNU compiler. MIPS version.
Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
+ 1999, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
Contributed by A. Lichnewsky (lich@inria.inria.fr).
Changed by Michael Meissner (meissner@osf.org).
@@ -283,7 +283,6 @@ extern bool mips_cannot_change_mode_class (enum machine_mode,
enum machine_mode, enum reg_class);
extern bool mips_dangerous_for_la25_p (rtx);
extern bool mips_modes_tieable_p (enum machine_mode, enum machine_mode);
-extern enum reg_class mips_preferred_reload_class (rtx, enum reg_class);
extern enum reg_class mips_secondary_reload_class (enum reg_class,
enum machine_mode,
rtx, bool);
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index a534638..9de479b 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -1,6 +1,7 @@
/* Subroutines used for MIPS code generation.
Copyright (C) 1989, 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+ 2011
Free Software Foundation, Inc.
Contributed by A. Lichnewsky, lich@inria.inria.fr.
Changes by Michael Meissner, meissner@osf.org.
@@ -10804,10 +10805,10 @@ mips_modes_tieable_p (enum machine_mode mode1, enum machine_mode mode2)
&& !mips_mode_ok_for_mov_fmt_p (mode2)));
}
-/* Implement PREFERRED_RELOAD_CLASS. */
+/* Implement TARGET_PREFERRED_RELOAD_CLASS. */
-enum reg_class
-mips_preferred_reload_class (rtx x, enum reg_class rclass)
+static reg_class_t
+mips_preferred_reload_class (rtx x, reg_class_t rclass)
{
if (mips_dangerous_for_la25_p (x) && reg_class_subset_p (LEA_REGS, rclass))
return LEA_REGS;
@@ -16487,6 +16488,9 @@ mips_shift_truncation_mask (enum machine_mode mode)
#undef TARGET_MACHINE_DEPENDENT_REORG
#define TARGET_MACHINE_DEPENDENT_REORG mips_reorg
+#undef TARGET_PREFERRED_RELOAD_CLASS
+#define TARGET_PREFERRED_RELOAD_CLASS mips_preferred_reload_class
+
#undef TARGET_ASM_FILE_START
#define TARGET_ASM_FILE_START mips_file_start
#undef TARGET_ASM_FILE_START_FILE_DIRECTIVE
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 24539c4..9600dcb 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -2028,9 +2028,6 @@ enum reg_class
#define SMALL_INT_UNSIGNED(X) SMALL_OPERAND_UNSIGNED (INTVAL (X))
#define LUI_INT(X) LUI_OPERAND (INTVAL (X))
-#define PREFERRED_RELOAD_CLASS(X,CLASS) \
- mips_preferred_reload_class (X, CLASS)
-
/* The HI and LO registers can only be reloaded via the general
registers. Condition code registers can only be loaded to the
general registers, and from the floating point registers. */