From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26501 invoked by alias); 31 Jul 2002 13:35:25 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 26492 invoked from network); 31 Jul 2002 13:35:22 -0000 Received: from unknown (HELO executor.cambridge.redhat.com) (195.224.55.237) by sources.redhat.com with SMTP; 31 Jul 2002 13:35:22 -0000 Received: from talisman.cambridge.redhat.com (talisman.cambridge.redhat.com [172.16.18.81]) by executor.cambridge.redhat.com (Postfix) with ESMTP id E5FFFABAF8; Wed, 31 Jul 2002 14:35:21 +0100 (BST) Received: (from rsandifo@localhost) by talisman.cambridge.redhat.com (8.11.6/8.11.0) id g6VDZLO12277; Wed, 31 Jul 2002 14:35:21 +0100 X-Authentication-Warning: talisman.cambridge.redhat.com: rsandifo set sender to rsandifo@redhat.com using -f To: Daniel Jacobowitz Cc: gcc-patches@sources.redhat.com, echristo@redhat.com Subject: Re: RFC: New approach to --with-cpu References: <20020730215824.GA21681@nevyn.them.org> <20020731132428.GA28270@nevyn.them.org> From: Richard Sandiford Date: Wed, 31 Jul 2002 06:54:00 -0000 In-Reply-To: <20020731132428.GA28270@nevyn.them.org> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-07/txt/msg01864.txt.bz2 Daniel Jacobowitz writes: > > I suppose you could have: > > > > if (!option_present (*argcp, *argvp, "-march=") > > && (!option_present (*argcp, *argvp, "-mips") > > || option_present (*argcp, *argvp, "-mips16"))) > > add_option (argcp, argvp, "-march=" XSTRING (TARGET_DEFAULT_OPTION_ARCH)); > > > > (since -mips16 shouldn't change the default arch) but maybe > > there needs to be some sort of target macro? > > That doesn't do quite the right thing, if you think about the logic. > It'd have to be "-mips1" or "-mips2" or "-mips3" or "-mips4" or > "-mips5" (?) or "-mips32" or "-mips64". Well, all -mips* options are handled by one entry in TARGET_SWITCHES, so -mips16 overrides a previous -mips3, silly as that might be. I guess to be fully correct, you need to see if the last -mips option is -mips16, in which case you keep the default, or something else, in which case you don't. (half ;-) Richard