Hi. This patch removes obsolete OUTPUT_ADDR_CONST_EXTRA macro from the M68K back end in the GCC and introduces equivalent TARGET_OUTPUT_ADDR_CONST_EXTRA target hook.
Compiled without error. Not tested. OK to install? * config/m68k/m68k.c (m68k_output_addr_const_extra): Make static. (TARGET_OUTPUT_ADDR_CONST_EXTRA): Define. * config/m68k/m68k.h (OUTPUT_ADDR_CONST_EXTRA): Remove. * config/m68k/m68k-protos.h (m68k_output_addr_const_extra): Remove. Index: gcc/config/m68k/m68k-protos.h =================================================================== --- gcc/config/m68k/m68k-protos.h (revision 179412) +++ gcc/config/m68k/m68k-protos.h (working copy) @@ -51,7 +51,6 @@ extern int standard_68881_constant_p (rtx); extern void print_operand_address (FILE *, rtx); extern void print_operand (FILE *, rtx, int); -extern bool m68k_output_addr_const_extra (FILE *, rtx); extern void notice_update_cc (rtx, rtx); extern bool m68k_legitimate_base_reg_p (rtx, bool); extern bool m68k_legitimate_index_reg_p (rtx, bool); Index: gcc/config/m68k/m68k.c =================================================================== --- gcc/config/m68k/m68k.c (revision 179412) +++ gcc/config/m68k/m68k.c (working copy) @@ -163,6 +163,7 @@ static rtx m68k_function_arg (cumulative_args_t, enum machine_mode, const_tree, bool); static bool m68k_cannot_force_const_mem (enum machine_mode mode, rtx x); +static bool m68k_output_addr_const_extra (FILE *, rtx); /* Initialize the GCC target structure. */ @@ -297,6 +298,9 @@ #undef TARGET_LEGITIMATE_CONSTANT_P #define TARGET_LEGITIMATE_CONSTANT_P m68k_legitimate_constant_p +#undef TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA +#define TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA m68k_output_addr_const_extra + static const struct attribute_spec m68k_attribute_table[] = { /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler, @@ -4540,9 +4544,9 @@ } } -/* m68k implementation of OUTPUT_ADDR_CONST_EXTRA. */ +/* m68k implementation of TARGET_OUTPUT_ADDR_CONST_EXTRA. */ -bool +static bool m68k_output_addr_const_extra (FILE *file, rtx x) { if (GET_CODE (x) == UNSPEC) Index: gcc/config/m68k/m68k.h =================================================================== --- gcc/config/m68k/m68k.h (revision 179412) +++ gcc/config/m68k/m68k.h (working copy) @@ -935,12 +935,6 @@ #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR) -#define OUTPUT_ADDR_CONST_EXTRA(FILE, X, FAIL) \ -do { \ - if (! m68k_output_addr_const_extra (FILE, (X))) \ - goto FAIL; \ -} while (0); - #include "config/m68k/m68k-opts.h" enum fpu_type Anatoly.