From 01e83ff2d5fed202e66ed1d8b9d12e6f5fdca5e4 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Mon, 9 Nov 2015 22:53:31 +0000 Subject: [PATCH] visium.h (PRINT_OPERAND): Delete. * config/visium/visium.h (PRINT_OPERAND): Delete. (PRINT_OPERAND_PUNCT_VALID_P): Likewise. (PRINT_OPERAND_ADDRESS): Likewise. * config/visium/visium.c (TARGET_PRINT_OPERAND_PUNCT_VALID_P): Define to... (visium_print_operand_punct_valid_p): ...this. New function. (TARGET_PRINT_OPERAND): Define to... (print_operand): Rename to... (visium_print_operand): ...this. (TARGET_PRINT_OPERAND_ADDRESS): Define to... (visium_output_address): Rename to... (visium_print_operand_address): ...this. (print_operand_address): Delete. From-SVN: r230060 --- gcc/ChangeLog | 16 ++++++++++++ gcc/config/visium/visium.c | 50 ++++++++++++++++++++++---------------- gcc/config/visium/visium.h | 43 -------------------------------- 3 files changed, 45 insertions(+), 64 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3c764de4a89..622f8602baf 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,19 @@ +2015-11-09 Eric Botcazou + + * config/visium/visium.h (PRINT_OPERAND): Delete. + (PRINT_OPERAND_PUNCT_VALID_P): Likewise. + (PRINT_OPERAND_ADDRESS): Likewise. + * config/visium/visium.c (TARGET_PRINT_OPERAND_PUNCT_VALID_P): Define + to... + (visium_print_operand_punct_valid_p): ...this. New function. + (TARGET_PRINT_OPERAND): Define to... + (print_operand): Rename to... + (visium_print_operand): ...this. + (TARGET_PRINT_OPERAND_ADDRESS): Define to... + (visium_output_address): Rename to... + (visium_print_operand_address): ...this. + (print_operand_address): Delete. + 2015-11-09 Eric Botcazou PR middle-end/68259 diff --git a/gcc/config/visium/visium.c b/gcc/config/visium/visium.c index d1b580ebc44..0bf275c454a 100644 --- a/gcc/config/visium/visium.c +++ b/gcc/config/visium/visium.c @@ -99,7 +99,6 @@ int visium_indent_opcode = 0; given how unlikely it is to have a long branch in a leaf function. */ static unsigned int long_branch_regnum = 31; -static void visium_output_address (FILE *, enum machine_mode, rtx); static tree visium_handle_interrupt_attr (tree *, tree, tree, int, bool *); static inline bool current_function_saves_fp (void); static inline bool current_function_saves_lr (void); @@ -157,6 +156,10 @@ static bool visium_legitimate_constant_p (enum machine_mode, rtx); static bool visium_legitimate_address_p (enum machine_mode, rtx, bool); +static bool visium_print_operand_punct_valid_p (unsigned char); +static void visium_print_operand (FILE *, rtx, int); +static void visium_print_operand_address (FILE *, machine_mode, rtx); + static void visium_conditional_register_usage (void); static rtx visium_legitimize_address (rtx, rtx, enum machine_mode); @@ -227,6 +230,13 @@ static unsigned int visium_reorg (void); #undef TARGET_LEGITIMATE_ADDRESS_P #define TARGET_LEGITIMATE_ADDRESS_P visium_legitimate_address_p +#undef TARGET_PRINT_OPERAND_PUNCT_VALID_P +#define TARGET_PRINT_OPERAND_PUNCT_VALID_P visium_print_operand_punct_valid_p +#undef TARGET_PRINT_OPERAND +#define TARGET_PRINT_OPERAND visium_print_operand +#undef TARGET_PRINT_OPERAND_ADDRESS +#define TARGET_PRINT_OPERAND_ADDRESS visium_print_operand_address + #undef TARGET_ATTRIBUTE_TABLE #define TARGET_ATTRIBUTE_TABLE visium_attribute_table @@ -3038,12 +3048,19 @@ output_cbranch (rtx label, enum rtx_code code, enum machine_mode cc_mode, return output_branch (label, cond, insn); } -/* Helper function for PRINT_OPERAND (STREAM, X, CODE). Output to stdio - stream FILE the assembler syntax for an instruction operand OP subject - to the modifier LETTER. */ +/* Implement TARGET_PRINT_OPERAND_PUNCT_VALID_P. */ -void -print_operand (FILE *file, rtx op, int letter) +static bool +visium_print_operand_punct_valid_p (unsigned char code) +{ + return code == '#'; +} + +/* Implement TARGET_PRINT_OPERAND. Output to stdio stream FILE the assembler + syntax for an instruction operand OP subject to the modifier LETTER. */ + +static void +visium_print_operand (FILE *file, rtx op, int letter) { switch (letter) { @@ -3104,7 +3121,7 @@ print_operand (FILE *file, rtx op, int letter) break; case MEM: - visium_output_address (file, GET_MODE (op), XEXP (op, 0)); + visium_print_operand_address (file, GET_MODE (op), XEXP (op, 0)); break; case CONST_INT: @@ -3116,7 +3133,7 @@ print_operand (FILE *file, rtx op, int letter) break; case HIGH: - print_operand (file, XEXP (op, 1), letter); + visium_print_operand (file, XEXP (op, 1), letter); break; default: @@ -3124,11 +3141,12 @@ print_operand (FILE *file, rtx op, int letter) } } -/* Output to stdio stream FILE the assembler syntax for an instruction operand - that is a memory reference in MODE and whose address is ADDR. */ +/* Implement TARGET_PRINT_OPERAND_ADDRESS. Output to stdio stream FILE the + assembler syntax for an instruction operand that is a memory reference + whose address is ADDR. */ static void -visium_output_address (FILE *file, enum machine_mode mode, rtx addr) +visium_print_operand_address (FILE *file, enum machine_mode mode, rtx addr) { switch (GET_CODE (addr)) { @@ -3205,16 +3223,6 @@ visium_output_address (FILE *file, enum machine_mode mode, rtx addr) } } -/* Helper function for PRINT_OPERAND_ADDRESS (STREAM, X). Output to stdio - stream FILE the assembler syntax for an instruction operand that is a - memory reference whose address is ADDR. */ - -void -print_operand_address (FILE *file, rtx addr) -{ - visium_output_address (file, QImode, addr); -} - /* The Visium stack frames look like: Before call After call diff --git a/gcc/config/visium/visium.h b/gcc/config/visium/visium.h index c5b65b4be34..9b92a74380b 100644 --- a/gcc/config/visium/visium.h +++ b/gcc/config/visium/visium.h @@ -1477,49 +1477,6 @@ do \ #define ADDITIONAL_REGISTER_NAMES \ {{"r22", HARD_FRAME_POINTER_REGNUM}, {"r23", STACK_POINTER_REGNUM}} -/* `PRINT_OPERAND (STREAM, X, CODE)' - - 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) print_operand (STREAM, X, CODE) - -/* `PRINT_OPERAND_PUNCT_VALID_P (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 */ -#define PRINT_OPERAND_PUNCT_VALID_P(CODE) ((CODE) == '#') - -/* `PRINT_OPERAND_ADDRESS (STREAM, X)' - - 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. */ -#define PRINT_OPERAND_ADDRESS(STREAM, ADDR) \ - print_operand_address (STREAM, ADDR) - /* `REGISTER_PREFIX' `LOCAL_LABEL_PREFIX' `USER_LABEL_PREFIX' -- 2.30.2