Patchwork [MMIX] Hookize PREFERRED_RELOAD_CLASS and PREFERRED_OUTPUT_RELOAD_CLASS

login
register
mail settings
Submitter Anatoly Sokolov
Date Aug. 14, 2011, 5:12 p.m.
Message ID <1345443061.20110814211250@post.ru>
Download mbox | patch
Permalink /patch/109961/
State New
Headers show

Comments

Anatoly Sokolov - Aug. 14, 2011, 5:12 p.m.
Hi.

>   This patch removes obsolete PREFERRED_RELOAD_CLASS and 
> PREFERRED_OUTPUT_RELOAD_CLASS macros from MMIX back end in the GCC and 
> introduces equivalent TARGET_PREFERRED_RELOAD_CLASS and
> TARGET_PREFERRED_OUTPUT_RELOAD_CLASS target hooks.

> --- gcc/config/mmix/mmix.c      (revision 176858)

> +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);

> +#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


  The TARGET_PREFERRED_OUTPUT_RELOAD_CLASS macro incorrectly defined. This 
patch fix it.

  Regression tested on mmix-knuth-mmixware.

  Committed as obvious.

        * config/mmix/mmix.c (TARGET_PREFERRED_OUTPUT_RELOAD_CLASS): Redefine
        as mmix_preferred_output_reload_class.



Anatoly.

Patch

Index: gcc/config/mmix/mmix.c
===================================================================
--- gcc/config/mmix/mmix.c      (revision 177747)
+++ gcc/config/mmix/mmix.c      (working copy)
@@ -260,7 +260,7 @@ 
 #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
+#define TARGET_PREFERRED_OUTPUT_RELOAD_CLASS mmix_preferred_output_reload_class
 
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P    mmix_legitimate_address_p