From: Anatoly Sokolov Date: Mon, 25 Jul 2011 17:46:07 +0000 (+0400) Subject: m32c.h (PRINT_OPERAND, [...]): Remove macro. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4645179ecbbb77cff99c473e8f679f8cba8efdb6;p=gcc.git m32c.h (PRINT_OPERAND, [...]): Remove macro. * config/m32c/m32c.h (PRINT_OPERAND, PRINT_OPERAND_ADDRESS, PRINT_OPERAND_PUNCT_VALID_P): Remove macro. * config/m32c/m32c-protos.h (m32c_print_operand_punct_valid_p, m32c_print_operand, m32c_print_operand_address): Remove. * config/m32c/m32c.c (m32c_print_operand_punct_valid_p): Make static. Change return type to bool. Change argument type to bool. (m32c_print_operand, m32c_print_operand_address): Make static. (TARGET_PRINT_OPERAND, TARGET_PRINT_OPERAND_ADDRESS, TARGET_PRINT_OPERAND_PUNCT_VALID_P): Define. From-SVN: r176763 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8ffc8f10660..6e16c954935 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2011-07-25 Anatoly Sokolov + + * config/m32c/m32c.h (PRINT_OPERAND, PRINT_OPERAND_ADDRESS, + PRINT_OPERAND_PUNCT_VALID_P): Remove macro. + * config/m32c/m32c-protos.h (m32c_print_operand_punct_valid_p, + m32c_print_operand, m32c_print_operand_address): Remove. + * config/m32c/m32c.c (m32c_print_operand_punct_valid_p): Make static. + Change return type to bool. Change argument type to bool. + (m32c_print_operand, m32c_print_operand_address): Make static. + (TARGET_PRINT_OPERAND, TARGET_PRINT_OPERAND_ADDRESS, + TARGET_PRINT_OPERAND_PUNCT_VALID_P): Define. + 2011-07-25 Rainer Orth * doc/sourcebuild.texi (Effective-Target Keywords, Environment diff --git a/gcc/config/m32c/m32c-protos.h b/gcc/config/m32c/m32c-protos.h index 6c88a1dc9bc..e858e150a06 100644 --- a/gcc/config/m32c/m32c-protos.h +++ b/gcc/config/m32c/m32c-protos.h @@ -33,7 +33,6 @@ void m32c_init_expanders (void); int m32c_initial_elimination_offset (int, int); void m32c_output_reg_pop (FILE *, int); void m32c_output_reg_push (FILE *, int); -int m32c_print_operand_punct_valid_p (int); unsigned int m32c_push_rounding (int); int m32c_reg_class_from_constraint (char, const char *); void m32c_register_pragmas (void); @@ -71,8 +70,6 @@ int m32c_preferred_output_reload_class (rtx, int); int m32c_preferred_reload_class (rtx, int); int m32c_prepare_move (rtx *, enum machine_mode); int m32c_prepare_shift (rtx *, int, int); -void m32c_print_operand (FILE *, rtx, int); -void m32c_print_operand_address (FILE *, rtx); int m32c_reg_ok_for_base_p (rtx, int); enum reg_class m32c_regno_reg_class (int); rtx m32c_return_addr_rtx (int); diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c index 0336d0ea587..7c359c9ac03 100644 --- a/gcc/config/m32c/m32c.c +++ b/gcc/config/m32c/m32c.c @@ -2644,8 +2644,12 @@ static char const *pushm_regs[] = { "fb", "sb", "a1", "a0", "r3", "r2", "r1", "r0" }; -/* Implements PRINT_OPERAND. */ -void +/* Implements TARGET_PRINT_OPERAND. */ + +#undef TARGET_PRINT_OPERAND +#define TARGET_PRINT_OPERAND m32c_print_operand + +static void m32c_print_operand (FILE * file, rtx x, int code) { int i, j, b; @@ -2998,18 +3002,28 @@ m32c_print_operand (FILE * file, rtx x, int code) return; } -/* Implements PRINT_OPERAND_PUNCT_VALID_P. See m32c_print_operand - above for descriptions of what these do. */ -int -m32c_print_operand_punct_valid_p (int c) +/* Implements TARGET_PRINT_OPERAND_PUNCT_VALID_P. + + See m32c_print_operand above for descriptions of what these do. */ + +#undef TARGET_PRINT_OPERAND_PUNCT_VALID_P +#define TARGET_PRINT_OPERAND_PUNCT_VALID_P m32c_print_operand_punct_valid_p + +static bool +m32c_print_operand_punct_valid_p (unsigned char c) { if (c == '&' || c == '!') - return 1; - return 0; + return true; + + return false; } -/* Implements PRINT_OPERAND_ADDRESS. Nothing unusual here. */ -void +/* Implements TARGET_PRINT_OPERAND_ADDRESS. Nothing unusual here. */ + +#undef TARGET_PRINT_OPERAND_ADDRESS +#define TARGET_PRINT_OPERAND_ADDRESS m32c_print_operand_address + +static void m32c_print_operand_address (FILE * stream, rtx address) { if (GET_CODE (address) == MEM) diff --git a/gcc/config/m32c/m32c.h b/gcc/config/m32c/m32c.h index 1a44b1b156d..e7b388b6f00 100644 --- a/gcc/config/m32c/m32c.h +++ b/gcc/config/m32c/m32c.h @@ -620,10 +620,6 @@ typedef struct m32c_cumulative_args {"a0a1", 4}, \ {"r0r2r1r3", 0} } -#define PRINT_OPERAND(S,X,C) m32c_print_operand (S, X, C) -#define PRINT_OPERAND_PUNCT_VALID_P(C) m32c_print_operand_punct_valid_p (C) -#define PRINT_OPERAND_ADDRESS(S,X) m32c_print_operand_address (S, X) - #undef USER_LABEL_PREFIX #define USER_LABEL_PREFIX "_"