Hi. This patch removes obsolete PRINT_OPERAND and PRINT_OPERAND_ADDRESS macros from the MOXIE back end in the GCC and introduces equivalent TARGET_PRINT_OPERAND and TARGET_PRINT_OPERAND_ADDRESS target hooks.
Regression tested on moxie-unknown-elf. OK for trunk? Anatoly. 2015-07-26 Anatoly Sokolov <ae...@post.ru> * config/moxie/moxie.h (PRINT_OPERAND, PRINT_OPERAND_ADDRESS): Remove macros. * config/moxie/moxie-protos.h (moxie_print_operand, moxie_print_operand_address): Remove declaration. * config/moxie/moxie.c (TARGET_PRINT_OPERAND, TARGET_PRINT_OPERAND_ADDRESS): Define. (moxie_print_operand, moxie_print_operand_address): Make static. Index: gcc/config/moxie/moxie.c =================================================================== --- gcc/config/moxie/moxie.c (revision 226237) +++ gcc/config/moxie/moxie.c (working copy) @@ -128,7 +128,7 @@ /* The PRINT_OPERAND_ADDRESS worker. */ -void +static void moxie_print_operand_address (FILE *file, rtx x) { switch (GET_CODE (x)) @@ -175,7 +175,7 @@ /* The PRINT_OPERAND worker. */ -void +static void moxie_print_operand (FILE *file, rtx x, int code) { rtx operand = x; @@ -679,6 +679,11 @@ #undef TARGET_OPTION_OVERRIDE #define TARGET_OPTION_OVERRIDE moxie_option_override +#undef TARGET_PRINT_OPERAND +#define TARGET_PRINT_OPERAND moxie_print_operand +#undef TARGET_PRINT_OPERAND_ADDRESS +#define TARGET_PRINT_OPERAND_ADDRESS moxie_print_operand_address + struct gcc_target targetm = TARGET_INITIALIZER; #include "gt-moxie.h" Index: gcc/config/moxie/moxie.h =================================================================== --- gcc/config/moxie/moxie.h (revision 226237) +++ gcc/config/moxie/moxie.h (working copy) @@ -212,12 +212,6 @@ #define ASM_OUTPUT_ALIGN(STREAM,POWER) \ fprintf (STREAM, "\t.p2align\t%d\n", POWER); -/* A C compound statement to output to stdio stream STREAM the - assembler syntax for an instruction operand X. */ -#define PRINT_OPERAND(STREAM, X, CODE) moxie_print_operand (STREAM, X, CODE) - -#define PRINT_OPERAND_ADDRESS(STREAM ,X) moxie_print_operand_address (STREAM, X) - /* Output and Generation of Labels */ #define GLOBAL_ASM_OP "\t.global\t" Index: gcc/config/moxie/moxie-protos.h =================================================================== --- gcc/config/moxie/moxie-protos.h (revision 226237) +++ gcc/config/moxie/moxie-protos.h (working copy) @@ -20,6 +20,4 @@ extern void moxie_expand_prologue (void); extern void moxie_expand_epilogue (void); extern int moxie_initial_elimination_offset (int, int); -extern void moxie_print_operand (FILE *, rtx, int); -extern void moxie_print_operand_address (FILE *, rtx); extern bool moxie_offset_address_p (rtx);