From patchwork Tue Oct 23 18:09:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gunther Nikl X-Patchwork-Id: 193553 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 E24D32C0147 for ; Wed, 24 Oct 2012 05:09:57 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1351620598; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: Content-Type:Content-Transfer-Encoding:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=VyqOKS0qnwEP9CsMQFU9lOaoiGU=; b=OpGUOrtCe/sSFlA Jo20aeKvUvrSS2HCoOnYVgE4pFcCa8Wm81UHwtmB3ie8FlsS93Hnchp4wLPwqP89 fxY76+nEKNrOLxxlMpI2adk/0ChmvRjmGcb7p29sew1HuqKU96rgLsAAEi+NbAE3 alOdyFKpIPWR3K0/z99PQvPBBCDE= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:Content-Type:Content-Transfer-Encoding:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=cBvpYRA73SIs1LSUMPOFb6sg+c7u9K/+1MpaAoobkVYAIhnfiLb4S0aA3gB1Ew wj75EkD5K+ao9PJQ4Jsinlipokp6DbHPadhhP1E+cOp598gSAN47JpB4O1vq7lpX OxAH88j6wX2ORTeBNOyEIevp9fahstSyvVS2GlL9YxilI=; Received: (qmail 19999 invoked by alias); 23 Oct 2012 18:09:51 -0000 Received: (qmail 19989 invoked by uid 22791); 23 Oct 2012 18:09:49 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from kirk.baltic.net (HELO kirk.baltic.net) (193.189.247.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 23 Oct 2012 18:09:40 +0000 Received: (qmail 5815 invoked by uid 89); 23 Oct 2012 18:09:38 -0000 Received: from p548bd7dc.dip.t-dialin.net (HELO sirius.local) (84.139.215.220) by with (DHE-RSA-AES256-SHA encrypted) SMTP; 23 Oct 2012 18:09:38 -0000 Message-ID: <5086DD70.3010603@users.sourceforge.net> Date: Tue, 23 Oct 2012 20:09:52 +0200 From: Gunther Nikl User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.24) Gecko/20100317 SeaMonkey/1.1.19 NOT FireFox/2.0 MIME-Version: 1.0 To: "Joseph S. Myers" CC: Andreas Schwab , gcc-patches@gcc.gnu.org Subject: [m68k] Fix option handling for -m68020-40 and -m68020-60 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 Hello, While working with GCC 4.7, I noticed that the -m68020-40 and -m68020-60 options are broken. This bug was introduced in May 2011 with the patch at . The code in m68k_option_override to set cpu and tune doesn't trigger when using -m68020-40 and -m68020-60 since global_options_set is not touched by the evaluation code for -m68020-40 and -m68020-60 in m68k_handle_option. This patch was tested by checking the -dM output of a patched cc1 for the present __mc680X0__ macros. Regards, Gunther Nikl -- cut -- 2012-10-23 Gunther Nikl * common/config/m68k/m68k-common.c (m68k_handle_option): Set gcc_options fields of opts_set for -m68020-40 and -m68020-60. -- cut -- -- cut -- Index: common/config/m68k/m68k-common.c =================================================================== --- common/config/m68k/m68k-common.c (revision 192718) +++ common/config/m68k/m68k-common.c (working copy) @@ -33,7 +33,7 @@ static bool m68k_handle_option (struct gcc_options *opts, - struct gcc_options *opts_set ATTRIBUTE_UNUSED, + struct gcc_options *opts_set, const struct cl_decoded_option *decoded, location_t loc) { @@ -45,12 +45,16 @@ { case OPT_m68020_40: opts->x_m68k_tune_option = u68020_40; + opts_set->x_m68k_tune_option = (uarch_type) 1; opts->x_m68k_cpu_option = m68020; + opts_set->x_m68k_cpu_option = (target_device) 1; return true; case OPT_m68020_60: opts->x_m68k_tune_option = u68020_60; + opts_set->x_m68k_tune_option = (uarch_type) 1; opts->x_m68k_cpu_option = m68020; + opts_set->x_m68k_cpu_option = (target_device) 1; return true; case OPT_mshared_library_id_: