]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
frv-protos.h (frv_print_operand): Delete.
authorNathan Froyd <froydnj@codesourcery.com>
Thu, 17 Jun 2010 18:11:45 +0000 (18:11 +0000)
committerNathan Froyd <froydnj@gcc.gnu.org>
Thu, 17 Jun 2010 18:11:45 +0000 (18:11 +0000)
* 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

gcc/ChangeLog
gcc/config/frv/frv-protos.h
gcc/config/frv/frv.c
gcc/config/frv/frv.h

index 2f8c80ceb269245787fb7b18571a3b4fe5595395..bc42db3638c52325edda3f8515c19ca48a2c543b 100644 (file)
@@ -1,3 +1,16 @@
+2010-06-17  Nathan Froyd  <froydnj@codesourcery.com>
+
+       * 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  <froydnj@codesourcery.com>
 
        * tree.h (vec_member): Declare.
index 3c9950d740b7698af880d9e29a7baad1b4a7e504..11612e49825f602e69a15373fdcbaaee8d51d5be 100644 (file)
@@ -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);
index e72dd2af1f9212d262307e30646548cf1520d0f1..057bbdf14525f621983ed48ca08c4c91c933cf31 100644 (file)
@@ -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
 \f
 /* 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)
 
 \f
 /* 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 == '&');
+}
+
 \f
 /* 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,
index d5a7a4a6670476b478d0af7dff890c781d5ca002..1bf8b6bb080b30aac6a856cb3b7d7839fc5c2209 100644 (file)
@@ -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