From: Anatoly Sokolov Date: Mon, 1 Aug 2011 19:08:34 +0000 (+0400) Subject: mmix.h (PREFERRED_RELOAD_CLASS, [...]): Remove macro. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0d5e496f46c6bd22709167532f6ca45b6ae98477;p=gcc.git mmix.h (PREFERRED_RELOAD_CLASS, [...]): Remove macro. * 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. From-SVN: r177069 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f098515ac88..3969d4daf6b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2011-08-01 Anatoly Sokolov + + * 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 * mode-switching.c (optimize_mode_switching): Fix bug in MODE_AFTER 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)