From patchwork Sat Aug 21 09:08:21 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatoly Sokolov X-Patchwork-Id: 62342 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 1860AB70AF for ; Sat, 21 Aug 2010 19:08:18 +1000 (EST) Received: (qmail 20399 invoked by alias); 21 Aug 2010 09:08:15 -0000 Received: (qmail 20388 invoked by uid 22791); 21 Aug 2010 09:08:14 -0000 X-SWARE-Spam-Status: No, hits=2.1 required=5.0 tests=AWL, BAYES_40, 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; Sat, 21 Aug 2010 09:08:10 +0000 Received: from corbina.ru (mail.post.ru [195.14.50.16]) by contrabass.post.ru (Postfix) with ESMTP id 11B19A25A; Sat, 21 Aug 2010 13:08:07 +0400 (MSD) Received: from [95.26.2.180] (account aesok@post.ru HELO Vista.corbina.ru) by corbina.ru (CommuniGate Pro SMTP 5.1.14) with ESMTPA id 247533333; Sat, 21 Aug 2010 13:08:07 +0400 Date: Sat, 21 Aug 2010 13:08:21 +0400 From: Anatoly Sokolov Message-ID: <1092650816.20100821130821@post.ru> To: gcc-patches@gcc.gnu.org CC: echristo@apple.com, rdsandiford@googlemail.com Subject: [MIPS] Hookize OVERRIDE_OPTIONS 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 obsoleteOVERRIDE_OPTIONS macro from the MIPS back end in the GCC and introduces equivalentTARGET_OPTION_OVERRIDE target hook. Bootstrapped and regression tested on mips64el-unknown-linux-gnu. * config/mips/mips.c (mips_override_options): Rename to... (mips_option_override): ...this. Make static. (TARGET_OPTION_OVERRIDE): Define. * config/mips/mips.h (OVERRIDE_OPTIONS): Remove. * config/mips/mips-protos.h (mips_override_options): Remove. Anatoly. Index: gcc/config/mips/mips-protos.h =================================================================== --- gcc/config/mips/mips-protos.h (revision 163362) +++ gcc/config/mips/mips-protos.h (working copy) @@ -253,7 +253,6 @@ extern bool mips_expand_ins_as_unaligned_store (rtx, rtx, HOST_WIDE_INT, HOST_WIDE_INT); extern bool mips_mem_fits_mode_p (enum machine_mode mode, rtx x); -extern void mips_override_options (void); extern void mips_conditional_register_usage (void); extern void mips_order_regs_for_local_alloc (void); extern HOST_WIDE_INT mips_debugger_offset (rtx, HOST_WIDE_INT); Index: gcc/config/mips/mips.c =================================================================== --- gcc/config/mips/mips.c (revision 163362) +++ gcc/config/mips/mips.c (working copy) @@ -15471,10 +15471,10 @@ } } -/* Implement OVERRIDE_OPTIONS. */ +/* Implement TARGET_OPTION_OVERRIDE. */ -void -mips_override_options (void) +static void +mips_option_override (void) { int i, start, regno, mode; @@ -16346,6 +16346,9 @@ #undef TARGET_ASM_ALIGNED_DI_OP #define TARGET_ASM_ALIGNED_DI_OP "\t.dword\t" +#undef TARGET_OPTION_OVERRIDE +#define TARGET_OPTION_OVERRIDE mips_option_override + #undef TARGET_LEGITIMIZE_ADDRESS #define TARGET_LEGITIMIZE_ADDRESS mips_legitimize_address Index: gcc/config/mips/mips.h =================================================================== --- gcc/config/mips/mips.h (revision 163362) +++ gcc/config/mips/mips.h (working copy) @@ -1073,8 +1073,6 @@ #define SWITCH_TAKES_ARG(CHAR) \ (DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G') -#define OVERRIDE_OPTIONS mips_override_options () - #define CONDITIONAL_REGISTER_USAGE mips_conditional_register_usage () /* Show we can debug even without a frame pointer. */ @@ -1521,7 +1519,7 @@ Regarding coprocessor registers: without evidence to the contrary, it's best to assume that each coprocessor register has a unique - use. This can be overridden, in, e.g., mips_override_options or + use. This can be overridden, in, e.g., mips_option_override or CONDITIONAL_REGISTER_USAGE should the assumption be inappropriate for a particular target. */