From patchwork Thu Dec 15 16:05:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Richard Earnshaw \(lists\)" X-Patchwork-Id: 88177 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp879855qgi; Thu, 15 Dec 2016 08:06:57 -0800 (PST) X-Received: by 10.98.133.207 with SMTP id m76mr3065218pfk.102.1481818017016; Thu, 15 Dec 2016 08:06:57 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id n62si3123950pfk.105.2016.12.15.08.06.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Dec 2016 08:06:57 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-444519-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-444519-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-444519-patch=linaro.org@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:references:message-id:date:mime-version:in-reply-to :content-type; q=dns; s=default; b=rTFDeRwChgDbxCNFk2lV3qmUnyBeM jCXckrR432oIgOjqAVWD/XMtFvdf4JeF2rNN6N3dDEIZs0QjU2HS/4Lee7fFU5G2 /GbJFryVYVDr/HusOGDiJIwhWVX+jKJW3buJURL6qrylPKOMe/jDk2qKmtjahtYA 1GW1ii4HNSEe9M= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:references:message-id:date:mime-version:in-reply-to :content-type; s=default; bh=tSggJ5Iq4kIXL0lsE8RdptY/Zf0=; b=XzG WoZqGql9/bchWWXFmCzLPtlyBsnc4+bfvZrFKE+3dN7BWE7A11efmMxIB3k8IY8K VHt4Ip412T+1df+iZpxrco/zaJCn3OzstLZHf/Sk9eQ7p+To5TOcU9BsKpzUmgg1 3KsqRtIkaHNRR9R5hlcC3ZGdYpVUk5dFHD0gU8Gg= Received: (qmail 31645 invoked by alias); 15 Dec 2016 16:05:57 -0000 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 Received: (qmail 31582 invoked by uid 89); 15 Dec 2016 16:05:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.0 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 15 Dec 2016 16:05:55 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C9E081516; Thu, 15 Dec 2016 08:05:53 -0800 (PST) Received: from e105689-lin.cambridge.arm.com (e105689-lin.cambridge.arm.com [10.2.207.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7BDD33F445 for ; Thu, 15 Dec 2016 08:05:53 -0800 (PST) From: "Richard Earnshaw (lists)" Subject: [PATCH 05/21] [arm] Reduce usage of arm_selected_cpu. To: gcc-patches@gcc.gnu.org References: Message-ID: <7968a4f7-d185-18d1-d923-21c475c4265c@arm.com> Date: Thu, 15 Dec 2016 16:05:52 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Make more use of the new data structure for initializing existing variables. * arm.c (arm_option_override): Use arm_active_target as source of information for arm_base_arch and arm_arch_name. * (arm_file_start): Use arm_active_target for core name. --- gcc/config/arm/arm.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index a4d370c..3806226 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -3276,9 +3276,9 @@ arm_option_override (void) SUBTARGET_OVERRIDE_OPTIONS; #endif - sprintf (arm_arch_name, "__ARM_ARCH_%s__", arm_selected_cpu->arch); + sprintf (arm_arch_name, "__ARM_ARCH_%s__", arm_active_target.arch_pp_name); insn_flags = arm_selected_cpu->flags; - arm_base_arch = arm_selected_cpu->base_arch; + arm_base_arch = arm_active_target.base_arch; arm_tune = arm_active_target.tune_core; tune_flags = arm_active_target.tune_flags; @@ -26012,12 +26012,13 @@ arm_file_start (void) arm_active_target.arch_name); } } - else if (strncmp (arm_selected_cpu->name, "generic", 7) == 0) - asm_fprintf (asm_out_file, "\t.arch %s\n", arm_selected_cpu->name + 8); + else if (strncmp (arm_active_target.core_name, "generic", 7) == 0) + asm_fprintf (asm_out_file, "\t.arch %s\n", + arm_active_target.core_name + 8); else { const char* truncated_name - = arm_rewrite_selected_cpu (arm_selected_cpu->name); + = arm_rewrite_selected_cpu (arm_active_target.core_name); asm_fprintf (asm_out_file, "\t.cpu %s\n", truncated_name); }