Message ID | 4F05EF6A.7070603@post.ru |
---|---|
State | New |
Headers | show |
Hi. Ping patch: http://gcc.gnu.org/ml/gcc-patches/2012-01/msg00261.html > > This patch removes obsolete PREFERRED_RELOAD_CLASS macro from the SCORE > back end in the GCC and introduces equivalent > TARGET_PREFERRED_RELOAD_CLASS target hook. > > Untested. > > OK to install? > > * config/score/score.h (PREFERRED_RELOAD_CLASS): Remove. > * config/score/score-protos.h (score_preferred_reload_class): Remove. > * config/score/score.c (TARGET_PREFERRED_RELOAD_CLASS: Define. > (score_preferred_reload_class): Make static. Change return and > 'rclass' argument type to reg_class_t. > Anatoly.
I missed this mail, I will check it soon. Thanks --liqin 在 2012年4月3日 上午2:51,Anatoly Sokolov <aesok@post.ru> 写道: > Hi. > > Ping patch: http://gcc.gnu.org/ml/gcc-patches/2012-01/msg00261.html > > >> >> This patch removes obsolete PREFERRED_RELOAD_CLASS macro from the SCORE >> back end in the GCC and introduces equivalent TARGET_PREFERRED_RELOAD_CLASS >> target hook. >> >> Untested. >> >> OK to install? >> >> * config/score/score.h (PREFERRED_RELOAD_CLASS): Remove. >> * config/score/score-protos.h (score_preferred_reload_class): Remove. >> * config/score/score.c (TARGET_PREFERRED_RELOAD_CLASS: Define. >> (score_preferred_reload_class): Make static. Change return and >> 'rclass' argument type to reg_class_t. >> > > Anatoly.
在 2012年4月3日 上午2:51,Anatoly Sokolov <aesok@post.ru> 写道: > Hi. > > Ping patch: http://gcc.gnu.org/ml/gcc-patches/2012-01/msg00261.html >> >> This patch removes obsolete PREFERRED_RELOAD_CLASS macro from the SCORE >> back end in the GCC and introduces equivalent TARGET_PREFERRED_RELOAD_CLASS >> target hook. >> >> Untested. >> >> OK to install? >> >> * config/score/score.h (PREFERRED_RELOAD_CLASS): Remove. >> * config/score/score-protos.h (score_preferred_reload_class): Remove. >> * config/score/score.c (TARGET_PREFERRED_RELOAD_CLASS: Define. >> (score_preferred_reload_class): Make static. Change return and >> 'rclass' argument type to reg_class_t. >> > Anatoly. It's OK to install, Thanks. --liqin
Index: gcc/config/score/score.h =================================================================== --- gcc/config/score/score.h (revision 182917) +++ gcc/config/score/score.h (working copy) @@ -405,9 +405,6 @@ extern enum reg_class score_char_to_clas #define REGNO_OK_FOR_INDEX_P(NUM) 0 -#define PREFERRED_RELOAD_CLASS(X, CLASS) \ - score_preferred_reload_class (X, CLASS) - /* If we need to load shorts byte-at-a-time, then we need a scratch. */ #define SECONDARY_INPUT_RELOAD_CLASS(CLASS, MODE, X) \ score_secondary_reload_class (CLASS, MODE, X) Index: gcc/config/score/score-protos.h =================================================================== --- gcc/config/score/score-protos.h (revision 182917) +++ gcc/config/score/score-protos.h (working copy) @@ -57,8 +57,6 @@ extern enum reg_class score_secondary_re rtx x); extern rtx score_function_value (const_tree valtype, const_tree func, enum machine_mode mode); -extern enum reg_class score_preferred_reload_class (rtx x, - enum reg_class rclass); extern HOST_WIDE_INT score_initial_elimination_offset (int from, int to); extern void score_print_operand (FILE *file, rtx op, int letter); extern void score_print_operand_address (FILE *file, rtx addr); Index: gcc/config/score/score.c =================================================================== --- gcc/config/score/score.c (revision 182917) +++ gcc/config/score/score.c (working copy) @@ -125,6 +125,9 @@ struct extern_list *extern_head = 0; #undef TARGET_LEGITIMIZE_ADDRESS #define TARGET_LEGITIMIZE_ADDRESS score_legitimize_address +#undef TARGET_PREFERRED_RELOAD_CLASS +#define TARGET_PREFERRED_RELOAD_CLASS score_preferred_reload_class + #undef TARGET_SCHED_ISSUE_RATE #define TARGET_SCHED_ISSUE_RATE score_issue_rate @@ -793,9 +796,9 @@ score_reg_class (int regno) return NO_REGS; } -/* Implement PREFERRED_RELOAD_CLASS macro. */ -enum reg_class -score_preferred_reload_class (rtx x ATTRIBUTE_UNUSED, enum reg_class rclass) +/* Implement TARGET_PREFERRED_RELOAD_CLASS hook. */ +static reg_class_t +score_preferred_reload_class (rtx x ATTRIBUTE_UNUSED, reg_class_t rclass) { if (reg_class_subset_p (G16_REGS, rclass)) return G16_REGS;