diff mbox

Remove OUTPUT_ADDR_CONST_EXTRA macro

Message ID 1792396390.20111006012836@post.ru
State New
Headers show

Commit Message

Anatoly Sokolov Oct. 5, 2011, 9:28 p.m. UTC
Hi.

  No one back end does not use OUTPUT_ADDR_CONST_EXTRA macro now, this patch 
remove it. The TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA target hook should be use 
instead.

  The patch has been bootstrapped on and regression tested on
x86_64-unknown-linux-gnu for c and c++.

  This patch is pre-approved and should be committed within a week if no
objections.

        * system.h (OUTPUT_ADDR_CONST_EXTRA): Poison.
        * doc/tm.texi.in (OUTPUT_ADDR_CONST_EXTRA): Remove documentation.
        * doc/tm.texi: Regenerate.
        * target.def (output_addr_const_extra): Use
        hook_bool_FILEptr_rtx_false.
        * targhooks.c (default_asm_output_addr_const_extra): Remove.
        * targhooks.h (default_asm_output_addr_const_extra): Remove.
        * hooks.c (hook_bool_FILEptr_rtx_false): New functions.
        * hooks.h (hook_bool_FILEptr_rtx_false): Declare.




Anatoly.

Comments

Richard Henderson Oct. 5, 2011, 11:05 p.m. UTC | #1
On 10/05/2011 02:28 PM, Anatoly Sokolov wrote:
>         * system.h (OUTPUT_ADDR_CONST_EXTRA): Poison.
>         * doc/tm.texi.in (OUTPUT_ADDR_CONST_EXTRA): Remove documentation.
>         * doc/tm.texi: Regenerate.
>         * target.def (output_addr_const_extra): Use
>         hook_bool_FILEptr_rtx_false.
>         * targhooks.c (default_asm_output_addr_const_extra): Remove.
>         * targhooks.h (default_asm_output_addr_const_extra): Remove.
>         * hooks.c (hook_bool_FILEptr_rtx_false): New functions.
>         * hooks.h (hook_bool_FILEptr_rtx_false): Declare.

Ok.


r~
diff mbox

Patch

Index: gcc/doc/tm.texi
===================================================================
--- gcc/doc/tm.texi     (revision 179476)
+++ gcc/doc/tm.texi     (working copy)
@@ -7530,18 +7530,6 @@ 
 return @code{true}.
 @end deftypefn
 
-@defmac OUTPUT_ADDR_CONST_EXTRA (@var{stream}, @var{x}, @var{fail})
-A C statement to recognize @var{rtx} patterns that
-@code{output_addr_const} can't deal with, and output assembly code to
-@var{stream} corresponding to the pattern @var{x}.  This may be used to
-allow machine-dependent @code{UNSPEC}s to appear within constants.
-
-If @code{OUTPUT_ADDR_CONST_EXTRA} fails to recognize a pattern, it must
-@code{goto fail}, so that a standard error message is printed.  If it
-prints an error message itself, by calling, for example,
-@code{output_operand_lossage}, it may just complete normally.
-@end defmac
-
 @defmac ASM_OUTPUT_ASCII (@var{stream}, @var{ptr}, @var{len})
 A C statement to output to the stdio stream @var{stream} an assembler
 instruction to assemble a string constant containing the @var{len}
Index: gcc/doc/tm.texi.in
===================================================================
--- gcc/doc/tm.texi.in  (revision 179476)
+++ gcc/doc/tm.texi.in  (working copy)
@@ -7446,18 +7446,6 @@ 
 return @code{true}.
 @end deftypefn
 
-@defmac OUTPUT_ADDR_CONST_EXTRA (@var{stream}, @var{x}, @var{fail})
-A C statement to recognize @var{rtx} patterns that
-@code{output_addr_const} can't deal with, and output assembly code to
-@var{stream} corresponding to the pattern @var{x}.  This may be used to
-allow machine-dependent @code{UNSPEC}s to appear within constants.
-
-If @code{OUTPUT_ADDR_CONST_EXTRA} fails to recognize a pattern, it must
-@code{goto fail}, so that a standard error message is printed.  If it
-prints an error message itself, by calling, for example,
-@code{output_operand_lossage}, it may just complete normally.
-@end defmac
-
 @defmac ASM_OUTPUT_ASCII (@var{stream}, @var{ptr}, @var{len})
 A C statement to output to the stdio stream @var{stream} an assembler
 instruction to assemble a string constant containing the @var{len}
Index: gcc/targhooks.c
===================================================================
--- gcc/targhooks.c     (revision 179476)
+++ gcc/targhooks.c     (working copy)
@@ -371,21 +371,6 @@ 
   return get_identifier (stripped);
 }
 
-/* The default implementation of TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA.  */
-
-bool
-default_asm_output_addr_const_extra (FILE *file ATTRIBUTE_UNUSED,
-                                    rtx x ATTRIBUTE_UNUSED)
-{
-#ifdef OUTPUT_ADDR_CONST_EXTRA
-  OUTPUT_ADDR_CONST_EXTRA (file, x, fail);
-  return true;
-
-fail:
-#endif
-  return false;
-}
-
 /* True if MODE is valid for the target.  By "valid", we mean able to
    be manipulated in non-trivial ways.  In particular, this means all
    the arithmetic is supported.
Index: gcc/targhooks.h
===================================================================
--- gcc/targhooks.h     (revision 179476)
+++ gcc/targhooks.h     (working copy)
@@ -67,8 +67,6 @@ 
 extern bool default_print_operand_punct_valid_p (unsigned char);
 extern tree default_mangle_assembler_name (const char *);
 
-extern bool default_asm_output_addr_const_extra (FILE *, rtx);
-
 extern bool default_scalar_mode_supported_p (enum machine_mode);
 extern bool targhook_words_big_endian (void);
 extern bool targhook_float_words_big_endian (void);
Index: gcc/hooks.c
===================================================================
--- gcc/hooks.c	(revision 179476)
+++ gcc/hooks.c	(working copy)
@@ -132,6 +132,14 @@ 
 {
 }
 
+/* Generic hook that takes (FILE *, rtx) and returns false.  */
+bool
+hook_bool_FILEptr_rtx_false (FILE *a ATTRIBUTE_UNUSED,
+                            rtx b ATTRIBUTE_UNUSED)
+{
+  return false;
+}
+
 /* Used for the TARGET_ASM_CAN_OUTPUT_MI_THUNK hook.  */
 bool
 hook_bool_const_tree_hwi_hwi_const_tree_false (const_tree a ATTRIBUTE_UNUSED,
Index: gcc/hooks.h
===================================================================
--- gcc/hooks.h	(revision 179476)
+++ gcc/hooks.h	(working copy)
@@ -63,6 +63,7 @@ 
 extern void hook_void_constcharptr (const char *);
 extern void hook_void_rtx_int (rtx, int);
 extern void hook_void_FILEptr_constcharptr (FILE *, const char *);
+extern bool hook_bool_FILEptr_rtx_false (FILE *, rtx);
 extern void hook_void_tree (tree);
 extern void hook_void_tree_treeptr (tree, tree *);
 extern void hook_void_int_int (int, int);
Index: gcc/target.def
===================================================================
--- gcc/target.def      (revision 179476)
+++ gcc/target.def      (working copy)
@@ -456,7 +456,7 @@ 
 (output_addr_const_extra,
  "",
  bool, (FILE *file, rtx x),
- default_asm_output_addr_const_extra)
+ hook_bool_FILEptr_rtx_false)
 
 /* ??? The TARGET_PRINT_OPERAND* hooks are part of the asm_out struct,
    even though that is not reflected in the macro name to override their