summaryrefslogtreecommitdiff
path: root/gcc/config/mips
diff options
context:
space:
mode:
authoraesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4>2011-03-08 20:51:11 +0000
committeraesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4>2011-03-08 20:51:11 +0000
commit53bb95d96d3a3922bc819a022d77b56196c1c63c (patch)
tree83329558ce8e006570b0aab88fa167b7dbb53a47 /gcc/config/mips
parentdfc1e3e484ed8f33a67a4aa69918cfe92c2fc9a0 (diff)
downloadgcc-53bb95d96d3a3922bc819a022d77b56196c1c63c.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170789 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/mips')
-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
3 files changed, 9 insertions, 9 deletions
diff --git a/gcc/config/mips/mips-protos.h b/gcc/config/mips/mips-protos.h
index c00abc2803d..611459884cb 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 a534638541d..9de479bf5c8 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 24539c4490a..9600dcb28fd 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. */