From patchwork Wed Sep 29 16:46:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Eager X-Patchwork-Id: 66078 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 DABC7B6F11 for ; Thu, 30 Sep 2010 02:46:33 +1000 (EST) Received: (qmail 8120 invoked by alias); 29 Sep 2010 16:46:30 -0000 Received: (qmail 8102 invoked by uid 22791); 29 Sep 2010 16:46:28 -0000 X-SWARE-Spam-Status: No, hits=0.2 required=5.0 tests=AWL, BAYES_50, RCVD_IN_DNSWL_NONE, TW_MX, TW_XM X-Spam-Check-By: sourceware.org Received: from caibbdcaaaaf.dreamhost.com (HELO spaceymail-a2.g.dreamhost.com) (208.113.200.5) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 29 Sep 2010 16:46:21 +0000 Received: from redwood.eagercon.com (c-67-169-165-157.hsd1.ca.comcast.net [67.169.165.157]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by spaceymail-a2.g.dreamhost.com (Postfix) with ESMTP id 8FA09EE404; Wed, 29 Sep 2010 09:46:18 -0700 (PDT) Message-ID: <4CA36D58.3020400@eagerm.com> Date: Wed, 29 Sep 2010 09:46:16 -0700 From: Michael Eager User-Agent: Thunderbird 2.0.0.23 (X11/20090825) MIME-Version: 1.0 To: "Joseph S. Myers" Cc: gcc-patches@gcc.gnu.org Subject: Re: MicroBlaze port References: <4CA23950.1000108@eagerm.com> In-Reply-To: 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 Thanks for noticing these issues. Joseph S. Myers wrote: > On Tue, 28 Sep 2010, Michael Eager wrote: > >> +extern char call_used_regs[]; > > Does this actually work now that call_used_regs is a macro in > hard-reg-set.h? The macro silently rewrites references to call_used_regs. I've removed the extern. > >> +extern int target_flags; > > This will break when my patch > is in. Don't > explicitly declare any variables from .opt files. Removed extern. >> +/* This table translates options whose names would interfere >> + with normal driver options and adds a 'Z' so that they can get to >> + specs processing without interference. >> + >> + The -xl-* options are deprecated and should be replace with their >> + corresponding equivalent: >> + -xl-mode-executable ==> -mxl-mode-executable >> + -xl-mode-xmdstub ==> -mxl-mode-xmdstub >> + -xl-mode-bootstrap ==> -mxl-mode-bootstrap >> + -xl-mode-novectors ==> -mxl-mode-novectors >> +*/ >> + >> +#define TARGET_OPTION_TRANSLATE_TABLE \ >> + { "-xl-mode-executable", "-Zxl-mode-executable" }, \ >> + { "-xl-mode-xmdstub", "-Zxl-mode-xmdstub" }, \ >> + { "-xl-mode-bootstrap", "-Zxl-mode-bootstrap" }, \ >> + { "-xl-mode-novectors", "-Zxl-mode-novectors" } > > Is it possible for you to use the .opt alias facility instead of > TARGET_OPTION_TRANSLATE_TABLE? If you make something an alias then you > don't need to handle it in specs - you could alias these options directly > to the -m versions, I'd have thought. I'd like to get rid of > TARGET_OPTION_TRANSLATE_TABLE. This is for deprecated options; I've removed it. >> +#undef SWITCH_TAKES_ARG >> +#define SWITCH_TAKES_ARG(CHAR) \ >> + (DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G') > > You're missing two other pieces of -G support: handling it in the > handle_option hook, and use of g.opt in config.gcc. See > and > . Fixed: --- config.gcc-orig 2010-09-29 09:27:56.000000000 -0700 +++ config.gcc 2010-09-29 09:28:22.000000000 -0700 @@ -341,6 +341,7 @@ m68k-*-*) ;; microblaze*-*-*) cpu_type=microblaze + extra_options="${extra_options} g.opt" ;; mips*-*-*) cpu_type=mips --- orig/microblaze.c 2010-09-29 08:39:06.000000000 -0700 +++ microblaze.c 2010-09-29 09:27:39.000000000 -0700 @@ -1279,6 +1279,11 @@ microblaze_handle_option (size_t code, { switch (code) { + case OPT_G: + g_switch_value = value; + g_switch_set = true; + return true; + case OPT_mno_clearbss: flag_zero_initialized_in_bss = 0; warning (0, "-mno-clearbss is deprecated; use -fno-zero-initialized-in-bss");