From patchwork Wed Sep 22 16:38:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatoly Sokolov X-Patchwork-Id: 65435 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 0310AB70DC for ; Thu, 23 Sep 2010 02:38:07 +1000 (EST) Received: (qmail 12485 invoked by alias); 22 Sep 2010 16:38:01 -0000 Received: (qmail 12240 invoked by uid 22791); 22 Sep 2010 16:37:59 -0000 X-SWARE-Spam-Status: No, hits=1.3 required=5.0 tests=AWL, BAYES_00, KAM_THEBAT, RCVD_IN_DNSWL_NONE, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from contrabass.post.ru (HELO contrabass.post.ru) (85.21.78.5) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 22 Sep 2010 16:37:53 +0000 Received: from corbina.ru (mail.post.ru [195.14.50.16]) by contrabass.post.ru (Postfix) with ESMTP id EAE44B569; Wed, 22 Sep 2010 20:37:49 +0400 (MSD) Received: from [89.178.216.100] (account aesok@post.ru HELO Vista.corbina.ru) by corbina.ru (CommuniGate Pro SMTP 5.1.14) with ESMTPA id 259183802; Wed, 22 Sep 2010 20:37:49 +0400 Date: Wed, 22 Sep 2010 20:38:24 +0400 From: Anatoly Sokolov Message-ID: <261758000.20100922203824@post.ru> To: gcc-patches@gcc.gnu.org CC: nickc@redhat.com, rearnsha@arm.com Subject: [ARM] Hookize OUTPUT_ADDR_CONST_EXTRA MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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. 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);