From: Nathan Froyd Date: Thu, 17 Jun 2010 18:11:45 +0000 (+0000) Subject: frv-protos.h (frv_print_operand): Delete. X-Git-Tag: releases/gcc-4.6.0~6384 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0fb30cb73d96d9ed538bf3ded15e949e59eaf90e;p=thirdparty%2Fgcc.git frv-protos.h (frv_print_operand): Delete. * config/frv/frv-protos.h (frv_print_operand): Delete. (frv_print_operand_address): Delete. * config/frv/frv.h (PRINT_OPERAND): Delete. (PRINT_OPERAND_PUNCT_VALID_P): Delete. (PRINT_OPERAND_ADDRESS): Delete. * config/frv/frv.c (frv_print_operand_address): Make static. (frv_print_operand): Make static. (frv_print_operand_punct_valid_p): New function. (TARGET_PRINT_OPERAND, TARGET_PRINT_OPERAND_ADDRESS): (TARGET_PRINT_OPERAND_ADDRESS): Define. From-SVN: r160937 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2f8c80ceb269..bc42db3638c5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2010-06-17 Nathan Froyd + + * config/frv/frv-protos.h (frv_print_operand): Delete. + (frv_print_operand_address): Delete. + * config/frv/frv.h (PRINT_OPERAND): Delete. + (PRINT_OPERAND_PUNCT_VALID_P): Delete. + (PRINT_OPERAND_ADDRESS): Delete. + * config/frv/frv.c (frv_print_operand_address): Make static. + (frv_print_operand): Make static. + (frv_print_operand_punct_valid_p): New function. + (TARGET_PRINT_OPERAND, TARGET_PRINT_OPERAND_ADDRESS): + (TARGET_PRINT_OPERAND_ADDRESS): Define. + 2010-06-17 Nathan Froyd * tree.h (vec_member): Declare. diff --git a/gcc/config/frv/frv-protos.h b/gcc/config/frv/frv-protos.h index 3c9950d740b7..11612e49825f 100644 --- a/gcc/config/frv/frv-protos.h +++ b/gcc/config/frv/frv-protos.h @@ -73,8 +73,6 @@ extern rtx frv_index_memory (rtx, enum machine_mode, int); extern const char *frv_asm_output_opcode (FILE *, const char *); extern void frv_final_prescan_insn (rtx, rtx *, int); -extern void frv_print_operand (FILE *, rtx, int); -extern void frv_print_operand_address (FILE *, rtx); extern void frv_emit_move (enum machine_mode, rtx, rtx); extern int frv_emit_movsi (rtx, rtx); extern const char *output_move_single (rtx *, rtx); diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c index e72dd2af1f92..057bbdf14525 100644 --- a/gcc/config/frv/frv.c +++ b/gcc/config/frv/frv.c @@ -267,6 +267,9 @@ static bool frv_legitimate_address_p (enum machine_mode, rtx, bool); static int frv_default_flags_for_cpu (void); static int frv_string_begins_with (const_tree, const char *); static FRV_INLINE bool frv_small_data_reloc_p (rtx, int); +static void frv_print_operand (FILE *, rtx, int); +static void frv_print_operand_address (FILE *, rtx); +static bool frv_print_operand_punct_valid_p (unsigned char code); static void frv_print_operand_memory_reference_reg (FILE *, rtx); static void frv_print_operand_memory_reference (FILE *, rtx, int); @@ -396,6 +399,12 @@ static void frv_trampoline_init (rtx, tree, rtx); #endif /* Initialize the GCC target structure. */ +#undef TARGET_PRINT_OPERAND +#define TARGET_PRINT_OPERAND frv_print_operand +#undef TARGET_PRINT_OPERAND_ADDRESS +#define TARGET_PRINT_OPERAND_ADDRESS frv_print_operand_address +#undef TARGET_PRINT_OPERAND_PUNCT_VALID_P +#define TARGET_PRINT_OPERAND_PUNCT_VALID_P frv_print_operand_punct_valid_p #undef TARGET_ASM_FUNCTION_PROLOGUE #define TARGET_ASM_FUNCTION_PROLOGUE frv_function_prologue #undef TARGET_ASM_FUNCTION_EPILOGUE @@ -2562,7 +2571,7 @@ frv_index_memory (rtx memref, enum machine_mode mode, int index) /* Print a memory address as an operand to reference that memory location. */ -void +static void frv_print_operand_address (FILE * stream, rtx x) { if (GET_CODE (x) == MEM) @@ -2795,9 +2804,9 @@ comparison_string (enum rtx_code code, rtx op0) /* Print an operand to an assembler instruction. `%' followed by a letter and a digit says to output an operand in an - alternate fashion. Four letters have standard, built-in meanings described - below. The machine description macro `PRINT_OPERAND' can define additional - letters with nonstandard meanings. + alternate fashion. Four letters have standard, built-in meanings + described below. The hook `TARGET_PRINT_OPERAND' can define + additional letters with nonstandard meanings. `%cDIGIT' can be used to substitute an operand that is a constant value without the syntax that normally indicates an immediate operand. @@ -2818,13 +2827,14 @@ comparison_string (enum rtx_code code, rtx op0) than once in a single template that generates multiple assembler instructions. - `%' followed by a punctuation character specifies a substitution that does - not use an operand. Only one case is standard: `%%' outputs a `%' into the - assembler code. Other nonstandard cases can be defined in the - `PRINT_OPERAND' macro. You must also define which punctuation characters - are valid with the `PRINT_OPERAND_PUNCT_VALID_P' macro. */ + `%' followed by a punctuation character specifies a substitution that + does not use an operand. Only one case is standard: `%%' outputs a + `%' into the assembler code. Other nonstandard cases can be defined + in the `TARGET_PRINT_OPERAND' hook. You must also define which + punctuation characters are valid with the + `TARGET_PRINT_OPERAND_PUNCT_VALID_P' hook. */ -void +static void frv_print_operand (FILE * file, rtx x, int code) { struct frv_unspec unspec; @@ -3115,6 +3125,13 @@ frv_print_operand (FILE * file, rtx x, int code) return; } +static bool +frv_print_operand_punct_valid_p (unsigned char code) +{ + return (code == '.' || code == '#' || code == '@' || code == '~' + || code == '*' || code == '&'); +} + /* A C statement (sans semicolon) for initializing the variable CUM for the state at the beginning of the argument list. The variable has type @@ -3374,11 +3391,11 @@ frv_regno_ok_for_base_p (int regno, int strict_p) legitimate addresses. Normally you would simply recognize any `const' as legitimate. - Usually `PRINT_OPERAND_ADDRESS' is not prepared to handle constant sums that - are not marked with `const'. It assumes that a naked `plus' indicates - indexing. If so, then you *must* reject such naked constant sums as - illegitimate addresses, so that none of them will be given to - `PRINT_OPERAND_ADDRESS'. */ + Usually `TARGET_PRINT_OPERAND_ADDRESS' is not prepared to handle + constant sums that are not marked with `const'. It assumes that a + naked `plus' indicates indexing. If so, then you *must* reject such + naked constant sums as illegitimate addresses, so that none of them + will be given to `TARGET_PRINT_OPERAND_ADDRESS'. */ int frv_legitimate_address_p_1 (enum machine_mode mode, diff --git a/gcc/config/frv/frv.h b/gcc/config/frv/frv.h index d5a7a4a66704..1bf8b6bb080b 100644 --- a/gcc/config/frv/frv.h +++ b/gcc/config/frv/frv.h @@ -2325,52 +2325,6 @@ do { \ #define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS)\ frv_final_prescan_insn (INSN, OPVEC, NOPERANDS) - -/* A C compound statement to output to stdio stream STREAM the assembler syntax - for an instruction operand X. X is an RTL expression. - - CODE is a value that can be used to specify one of several ways of printing - the operand. It is used when identical operands must be printed differently - depending on the context. CODE comes from the `%' specification that was - used to request printing of the operand. If the specification was just - `%DIGIT' then CODE is 0; if the specification was `%LTR DIGIT' then CODE is - the ASCII code for LTR. - - If X is a register, this macro should print the register's name. The names - can be found in an array `reg_names' whose type is `char *[]'. `reg_names' - is initialized from `REGISTER_NAMES'. - - When the machine description has a specification `%PUNCT' (a `%' followed by - a punctuation character), this macro is called with a null pointer for X and - the punctuation character for CODE. */ -#define PRINT_OPERAND(STREAM, X, CODE) frv_print_operand (STREAM, X, CODE) - -/* A C expression which evaluates to true if CODE is a valid punctuation - character for use in the `PRINT_OPERAND' macro. If - `PRINT_OPERAND_PUNCT_VALID_P' is not defined, it means that no punctuation - characters (except for the standard one, `%') are used in this way. */ -/* . == gr0 - # == hint operand -- always zero for now - @ == small data base register (gr16) - ~ == pic register (gr17) - * == temporary integer CCR register (cr3) - & == temporary integer ICC register (icc3) */ -#define PRINT_OPERAND_PUNCT_VALID_P(CODE) \ -((CODE) == '.' || (CODE) == '#' || (CODE) == '@' || (CODE) == '~' \ - || (CODE) == '*' || (CODE) == '&') - -/* A C compound statement to output to stdio stream STREAM the assembler syntax - for an instruction operand that is a memory reference whose address is X. X - is an RTL expression. - - On some machines, the syntax for a symbolic address depends on the section - that the address refers to. On these machines, define the macro - `ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and - then check for it here. - - This declaration must be present. */ -#define PRINT_OPERAND_ADDRESS(STREAM, X) frv_print_operand_address (STREAM, X) - /* If defined, C string expressions to be used for the `%R', `%L', `%U', and `%I' options of `asm_fprintf' (see `final.c'). These are useful when a single `md' file must support multiple assembler formats. In that case, the