+2011-08-01 Anatoly Sokolov <aesok@post.ru>
+
+ * 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.
+
2011-08-01 Joern Rennecke <joern.rennecke@embecosm.com>
* mode-switching.c (optimize_mode_switching): Fix bug in MODE_AFTER
(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);
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);
#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
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
#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)