From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 66880 invoked by alias); 2 Mar 2015 13:08:51 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 66866 invoked by uid 89); 2 Mar 2015 13:08:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-lb0-f169.google.com Received: from mail-lb0-f169.google.com (HELO mail-lb0-f169.google.com) (209.85.217.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 02 Mar 2015 13:08:48 +0000 Received: by lbiz11 with SMTP id z11so3857283lbi.3 for ; Mon, 02 Mar 2015 05:08:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=VKX0Y33Ft3Wix/c11FO1neXkUtgU1g3PfzH0FkFHnsU=; b=HcKy+gH7tsUbiQ711/cxL33oTNqY2ADjQVBqbqPjce49rTMm9jFMGL3TaUCRmpDBsL ZGVJvPyD9cxQaCcXZlzDFdsNk8+sblU88NHLEESanLZw27g9Q3FlEyzaBGuoEyu1RkS7 LYUumgRiiJguIRASTeObepJu7FMFgqHFVN9DY5gxkYPjVhhS1KTBSmkknEiDpntvXkTF BZkYnp9noMT8Yt8LxK0JZlCwocbGeJqwd4pPvYezfgyelBWwr4kqvCorBcHWgRJ+Yige dT+EM1aZxm8/b1NCHxmskiEaBDRVyt9UhcVMxmfgpMoQIvMY2Bq2Oj2SaijnZnjyrn79 KTOw== X-Gm-Message-State: ALoCoQluiOoIYzOsfXg73ZNf1ybeAbTZDkUT7M5rQfRe+rcMaAG/QZ810HWMOHYQJ6cflt2WQYu1 X-Received: by 10.112.114.230 with SMTP id jj6mr23620844lbb.112.1425301725363; Mon, 02 Mar 2015 05:08:45 -0800 (PST) Received: from [192.168.1.64] (ppp91-76-180-33.pppoe.mtu-net.ru. [91.76.180.33]) by mx.google.com with ESMTPSA id h3sm2522431lam.49.2015.03.02.05.08.44 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Mar 2015 05:08:44 -0800 (PST) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: [PATCH][ARM]Automatically add -mthumb for thumb-only target when mode isn't specified From: Maxim Kuvyrkov In-Reply-To: <000001d0548a$789a1bd0$69ce5370$@arm.com> Date: Mon, 02 Mar 2015 13:08:00 -0000 Cc: gcc-patches@gcc.gnu.org, Ramana Radhakrishnan , Richard Earnshaw Content-Transfer-Encoding: quoted-printable Message-Id: <0E847550-2947-46C3-991C-2720641BC881@linaro.org> References: <000001d0548a$789a1bd0$69ce5370$@arm.com> To: Terry Guo X-SW-Source: 2015-03/txt/msg00057.txt.bz2 > On Mar 2, 2015, at 4:44 AM, Terry Guo wrote: >=20 > Hi there, >=20 > If target mode isn't specified via either gcc configuration option > --with-mode or command line, this patch intends to improve gcc driver to > automatically add option -mthumb for thumb-only target. Tested with gcc > regression test for various arm targets, no regression. Is it OK? >=20 > BR, > Terry >=20 > gcc/ChangeLog: >=20 > 2015-03-02 Terry Guo >=20 > * common/config/arm/arm-common.c (arm_is_target_thumb_only): New > function. > * config/arm/arm-protos.h (FL_ Macros): Move to ... > * config/arm/arm-opts.h (FL_ Macros): ... here. > (struct arm_arch_core_flag): New struct. > (arm_arch_core_flags): New array for arch/core and flag map. > * config/arm/arm.h (MODE_SET_SPEC_FUNCTIONS): Define new SPEC > function. > (EXTRA_SPEC_FUNCTIONS): Include new SPEC function. > (MODE_SET_SPECS): New SPEC. > (DRIVER_SELF_SPECS): Include new SPEC. Did you consider approach of implementing this purely inside cc1 rather tha= n driver? We do not seem to need to pass -mthumb to assembler or linker since those w= ill pick up ARM-ness / Thumb-ness from function annotations. Therefore we = need to handle -marm / -mthumb for cc1 only. What am I missing? Also, what's the significance of moving FL_* flags to arm-opts.h? If you h= ad to separate FL_* definitions from the rest of arm-protos.h, then a new d= edicated file (e.g., arm-fl.h) would be a better choice for new home of FL_= * definitions. Thank you, -- Maxim Kuvyrkov www.linaro.org