From patchwork Sun Oct 2 17:36:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatoly Sokolov X-Patchwork-Id: 117354 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 8AD851007D6 for ; Mon, 3 Oct 2011 04:37:08 +1100 (EST) Received: (qmail 28715 invoked by alias); 2 Oct 2011 17:37:06 -0000 Received: (qmail 28580 invoked by uid 22791); 2 Oct 2011 17:37:05 -0000 X-SWARE-Spam-Status: No, hits=1.5 required=5.0 tests=AWL, BAYES_00, KAM_THEBAT, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from contrabass.post.ru (HELO contrabass.corbina.net) (85.21.78.5) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 02 Oct 2011 17:36:50 +0000 Received: from corbina.ru (violin.corbina.net [195.14.50.30]) by contrabass.corbina.net (Postfix) with ESMTP id C8652CC1FB; Sun, 2 Oct 2011 21:36:47 +0400 (MSD) Received: from [95.27.253.147] (account aesok@post.ru HELO Vista.beeline) by fe1-mc.corbina.ru (CommuniGate Pro SMTP 5.4.0) with ESMTPA id 37463280; Sun, 02 Oct 2011 21:36:47 +0400 Date: Sun, 2 Oct 2011 21:36:50 +0400 From: Anatoly Sokolov Message-ID: <12310290790.20111002213650@post.ru> To: gcc-patches CC: hp@axis.com Subject: [CRIS] 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 CRIS back end in the GCC and introduces equivalent TARGET_OUTPUT_ADDR_CONST_EXTRA target hook. Regression tested on cris-axis-elf. OK to install? * config/cris/m32c.c (cris_output_addr_const_extra): Make static. (TARGET_OUTPUT_ADDR_CONST_EXTRA): Define. * config/cris/cris.h (OUTPUT_ADDR_CONST_EXTRA): Remove. * config/cris/cris-protos.h (cris_output_addr_const_extra): Remove. Anatoly. Index: gcc/config/cris/cris.c =================================================================== --- gcc/config/cris/cris.c (revision 179412) +++ gcc/config/cris/cris.c (working copy) @@ -113,6 +113,8 @@ static bool cris_print_operand_punct_valid_p (unsigned char code); +static bool cris_output_addr_const_extra (FILE *, rtx); + static void cris_conditional_register_usage (void); static void cris_asm_output_mi_thunk @@ -179,6 +181,8 @@ #define TARGET_PRINT_OPERAND_ADDRESS cris_print_operand_address #undef TARGET_PRINT_OPERAND_PUNCT_VALID_P #define TARGET_PRINT_OPERAND_PUNCT_VALID_P cris_print_operand_punct_valid_p +#undef TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA +#define TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA cris_output_addr_const_extra #undef TARGET_CONDITIONAL_REGISTER_USAGE #define TARGET_CONDITIONAL_REGISTER_USAGE cris_conditional_register_usage @@ -3608,9 +3614,9 @@ assemble_name (file, buf); } -/* Worker function for OUTPUT_ADDR_CONST_EXTRA. */ +/* Worker function for TARGET_OUTPUT_ADDR_CONST_EXTRA. */ -bool +static bool cris_output_addr_const_extra (FILE *file, rtx xconst) { switch (GET_CODE (xconst)) Index: gcc/config/cris/cris.h =================================================================== --- gcc/config/cris/cris.h (revision 179412) +++ gcc/config/cris/cris.h (working copy) @@ -1097,9 +1097,6 @@ /* Node: Data Output */ -#define OUTPUT_ADDR_CONST_EXTRA(STREAM, X, FAIL) \ - do { if (!cris_output_addr_const_extra (STREAM, X)) goto FAIL; } while (0) - #define IS_ASM_LOGICAL_LINE_SEPARATOR(C, STR) (C) == '@' /* Node: Uninitialized Data */ Index: gcc/config/cris/cris-protos.h =================================================================== --- gcc/config/cris/cris-protos.h (revision 179412) +++ gcc/config/cris/cris-protos.h (working copy) @@ -38,7 +38,6 @@ extern bool cris_store_multiple_op_p (rtx); extern bool cris_movem_load_rest_p (rtx, int); extern void cris_asm_output_symbol_ref (FILE *, rtx); -extern bool cris_output_addr_const_extra (FILE *, rtx); extern int cris_cfun_uses_pic_table (void); extern void cris_asm_output_case_end (FILE *, int, rtx); extern rtx cris_gen_movem_load (rtx, rtx, int);