summaryrefslogtreecommitdiff
path: root/gcc/config/mmix
diff options
context:
space:
mode:
authoraesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-01 19:08:34 +0000
committeraesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-01 19:08:34 +0000
commit27925877eef565b76966cd18f7b9d92d862b6c1d (patch)
treefb51785c70eb40e23b7ae6f367b796421da6a8b3 /gcc/config/mmix
parentaadec354961a3147095f081a784679e45aaa19f4 (diff)
downloadgcc-27925877eef565b76966cd18f7b9d92d862b6c1d.tar.gz
* config/mmix/mmix.h (PREFERRED_RELOAD_CLASS,
PREFERRED_OUTPUT_RELOAD_CLASS): Remove macro. * config/mmix/mmix-protos.h (mmix_preferred_reload_class, mmix_preferred_output_reload_class): Remove. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class): Make static. Change rclass argument and return type to reg_class_t. (TARGET_PREFERRED_RELOAD_CLASS, TARGET_PREFERRED_OUTPUT_RELOAD_CLASS): Define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177069 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/mmix')
-rw-r--r--gcc/config/mmix/mmix-protos.h3
-rw-r--r--gcc/config/mmix/mmix.c20
-rw-r--r--gcc/config/mmix/mmix.h6
3 files changed, 13 insertions, 16 deletions
diff --git a/gcc/config/mmix/mmix-protos.h b/gcc/config/mmix/mmix-protos.h
index eefea46c66f..a6faf6e1494 100644
--- a/gcc/config/mmix/mmix-protos.h
+++ b/gcc/config/mmix/mmix-protos.h
@@ -59,9 +59,6 @@ extern void mmix_asm_declare_register_global
(FILE *, tree, int, const char *);
extern void mmix_asm_output_addr_diff_elt (FILE *, rtx, int, int);
extern void mmix_asm_output_addr_vec_elt (FILE *, int);
-extern enum reg_class mmix_preferred_reload_class (rtx, enum reg_class);
-extern enum reg_class mmix_preferred_output_reload_class
- (rtx, enum reg_class);
extern enum reg_class mmix_secondary_reload_class
(enum reg_class, enum machine_mode, rtx, int);
extern int mmix_const_ok_for_letter_p (HOST_WIDE_INT, int);
diff --git a/gcc/config/mmix/mmix.c b/gcc/config/mmix/mmix.c
index f65d5ee9bbe..e6cebce010e 100644
--- a/gcc/config/mmix/mmix.c
+++ b/gcc/config/mmix/mmix.c
@@ -129,6 +129,8 @@ static void mmix_emit_sp_add (HOST_WIDE_INT offset);
static void mmix_target_asm_function_prologue (FILE *, HOST_WIDE_INT);
static void mmix_target_asm_function_end_prologue (FILE *);
static void mmix_target_asm_function_epilogue (FILE *, HOST_WIDE_INT);
+static reg_class_t mmix_preferred_reload_class (rtx, reg_class_t);
+static reg_class_t mmix_preferred_output_reload_class (rtx, reg_class_t);
static bool mmix_legitimate_address_p (enum machine_mode, rtx, bool);
static bool mmix_legitimate_constant_p (enum machine_mode, rtx);
static void mmix_reorg (void);
@@ -250,6 +252,11 @@ static void mmix_conditional_register_usage (void);
#undef TARGET_CALLEE_COPIES
#define TARGET_CALLEE_COPIES hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true
+#undef TARGET_PREFERRED_RELOAD_CLASS
+#define TARGET_PREFERRED_RELOAD_CLASS mmix_preferred_reload_class
+#undef TARGET_PREFERRED_OUTPUT_RELOAD_CLASS
+#define TARGET_PREFERRED_OUTPUT_RELOAD_CLASS mmix_preferred_reload_class
+
#undef TARGET_LEGITIMATE_ADDRESS_P
#define TARGET_LEGITIMATE_ADDRESS_P mmix_legitimate_address_p
#undef TARGET_LEGITIMATE_CONSTANT_P
@@ -409,23 +416,22 @@ mmix_local_regno (int regno)
return regno <= MMIX_LAST_STACK_REGISTER_REGNUM && !call_used_regs[regno];
}
-/* PREFERRED_RELOAD_CLASS.
+/* TARGET_PREFERRED_RELOAD_CLASS.
We need to extend the reload class of REMAINDER_REG and HIMULT_REG. */
-enum reg_class
-mmix_preferred_reload_class (rtx x ATTRIBUTE_UNUSED, enum reg_class rclass)
+static reg_class_t
+mmix_preferred_reload_class (rtx x, reg_class_t rclass)
{
/* FIXME: Revisit. */
return GET_CODE (x) == MOD && GET_MODE (x) == DImode
? REMAINDER_REG : rclass;
}
-/* PREFERRED_OUTPUT_RELOAD_CLASS.
+/* TARGET_PREFERRED_OUTPUT_RELOAD_CLASS.
We need to extend the reload class of REMAINDER_REG and HIMULT_REG. */
-enum reg_class
-mmix_preferred_output_reload_class (rtx x ATTRIBUTE_UNUSED,
- enum reg_class rclass)
+static reg_class_t
+mmix_preferred_output_reload_class (rtx x, reg_class_t rclass)
{
/* FIXME: Revisit. */
return GET_CODE (x) == MOD && GET_MODE (x) == DImode
diff --git a/gcc/config/mmix/mmix.h b/gcc/config/mmix/mmix.h
index 37c5c708bd0..dbcaa255f25 100644
--- a/gcc/config/mmix/mmix.h
+++ b/gcc/config/mmix/mmix.h
@@ -452,12 +452,6 @@ enum reg_class
#define REGNO_OK_FOR_INDEX_P(REGNO) REGNO_OK_FOR_BASE_P (REGNO)
-#define PREFERRED_RELOAD_CLASS(X, CLASS) \
- mmix_preferred_reload_class (X, CLASS)
-
-#define PREFERRED_OUTPUT_RELOAD_CLASS(X, CLASS) \
- mmix_preferred_output_reload_class (X, CLASS)
-
#define SECONDARY_INPUT_RELOAD_CLASS(CLASS, MODE, X) \
mmix_secondary_reload_class (CLASS, MODE, X, 1)