Patchwork [ARM] Hookize OUTPUT_ADDR_CONST_EXTRA

login
register
mail settings
Submitter Anatoly Sokolov
Date Sept. 22, 2010, 4:38 p.m.
Message ID <261758000.20100922203824@post.ru>
Download mbox | patch
Permalink /patch/65435/
State New
Headers show

Comments

Anatoly Sokolov - Sept. 22, 2010, 4:38 p.m.
Hi.

  This patch removes obsolete OUTPUT_ADDR_CONST_EXTRA macro from the ARM back 
end in the GCC and introduces equivalent TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA 
target hook.

  Bootstrapped and regression tested on armv5tel-unknown-linux-gnueabi.

  OK to install?

        * config/arm/arm.h (OUTPUT_ADDR_CONST_EXTRA): Remove.
        * config/arm/arm-protos.h (arm_output_addr_const_extra): Remove.
        * config/arm/arm.c (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
        (arm_output_addr_const_extra): Make static.



Anatoly.
Richard Earnshaw - Sept. 22, 2010, 4:39 p.m.
On Wed, 2010-09-22 at 20:38 +0400, Anatoly Sokolov wrote:
> Hi.
> 
>   This patch removes obsolete OUTPUT_ADDR_CONST_EXTRA macro from the ARM back 
> end in the GCC and introduces equivalent TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA 
> target hook.
> 
>   Bootstrapped and regression tested on armv5tel-unknown-linux-gnueabi.
> 
>   OK to install?
> 
>         * config/arm/arm.h (OUTPUT_ADDR_CONST_EXTRA): Remove.
>         * config/arm/arm-protos.h (arm_output_addr_const_extra): Remove.
>         * config/arm/arm.c (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
>         (arm_output_addr_const_extra): Make static.
> 

OK.

R.

Patch

Index: gcc/config/arm/arm.c
===================================================================
--- gcc/config/arm/arm.c        (revision 164526)
+++ gcc/config/arm/arm.c        (working copy)
@@ -224,6 +224,7 @@ 
 static bool arm_tls_symbol_p (rtx x);
 static int arm_issue_rate (void);
 static void arm_output_dwarf_dtprel (FILE *, int, rtx) ATTRIBUTE_UNUSED;
+static bool arm_output_addr_const_extra (FILE *, rtx);
 static bool arm_allocate_stack_slots_for_args (void);
 static const char *arm_invalid_parameter_type (const_tree t);
 static const char *arm_invalid_return_type (const_tree t);
@@ -309,6 +310,9 @@ 
 #undef TARGET_PRINT_OPERAND_PUNCT_VALID_P
 #define TARGET_PRINT_OPERAND_PUNCT_VALID_P arm_print_operand_punct_valid_p
 
+#undef TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA
+#define TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA arm_output_addr_const_extra
+
 #undef  TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE arm_output_function_prologue
 
@@ -22451,7 +22456,9 @@ 
   fputs ("(tlsldo)", file);
 }
 
-bool
+/* Implement TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA.  */
+
+static bool
 arm_output_addr_const_extra (FILE *fp, rtx x)
 {
   if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_TLS)
Index: gcc/config/arm/arm.h
===================================================================
--- gcc/config/arm/arm.h        (revision 164526)
+++ gcc/config/arm/arm.h        (working copy)
@@ -2419,10 +2419,6 @@ 
          & ~ (unsigned HOST_WIDE_INT) 0xffffffff)              \
        : 0))))
 
-#define OUTPUT_ADDR_CONST_EXTRA(file, x, fail)         \
-  if (arm_output_addr_const_extra (file, x) == FALSE)  \
-    goto fail
-
 /* A C expression whose value is RTL representing the value of the return
    address for the frame COUNT steps up from the current frame.  */
 
Index: gcc/config/arm/arm-protos.h
===================================================================
--- gcc/config/arm/arm-protos.h	(revision 164526)
+++ gcc/config/arm/arm-protos.h	(working copy)
@@ -151,8 +151,6 @@ 
 extern const char *arm_output_sync_insn (rtx, rtx *);
 extern unsigned int arm_sync_loop_insns (rtx , rtx *);
 
-extern bool arm_output_addr_const_extra (FILE *, rtx);
-
 #if defined TREE_CODE
 extern void arm_init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree);
 extern bool arm_pad_arg_upward (enum machine_mode, const_tree);