From patchwork Fri May 11 09:32:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Richard Earnshaw \(lists\)" X-Patchwork-Id: 135512 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp627447lji; Fri, 11 May 2018 02:32:47 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrrb33cXPUNAYuKZDWTiMc0tEqjBEn0/ZV14vt34F7lNvJARh7EjqPBODbpa0TUwVfrSKo2 X-Received: by 2002:a62:9c93:: with SMTP id u19-v6mr4817723pfk.74.1526031167500; Fri, 11 May 2018 02:32:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526031167; cv=none; d=google.com; s=arc-20160816; b=qS9PU4uirT9m1yuZ6DjOzn3O9QBRDtdLtJq0daOPH9XmuxGiq6rMrUqfcZtEwXLSdH Ttbvwjjr+snv8gBxbNgLFPXQl0WFNSlaKvKRjo2qkSLfXnAudZNtwnUDwWvxHWxOdYw5 gFxawpL2jxvPeQZTcx8vto+tHOxvo+SQ2GWgXPrEqDXuj5/Krxw9L77kgOb9jRoZKsrB VQWRMKUc3jN4JFt4UwV+MzS7PeIos3zwjGihlKBSJfvwP3GU2+rnmQsJwpwqXOMGmgDW 3F4BE1rhLcCGVYG210ZUZDX7jPrb1Hy+2svXaPXmqqPefwA2hk9EFMaChBWsS1MnVs4S FPwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:date:message-id:openpgp:subject:from:to :delivered-to:sender:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature:arc-authentication-results; bh=gqg+NRQJoHqLn+mUIGEQ0IqpEH6xInRjbD02gAsX440=; b=E4zUJJAtsjUp5+knsSvG5TWEHCwKjSUWAdNGvLpgqA9I7v0i6t09/S5YNstv76T9Uh Yucw2R6/KheS8MVQMNZRH0thjzgIjs9W+LoRIG2yFvrjkYf8lGApThOIT64uuyKUCzQV UHT0tMlXcJPz/Yl+JLDpKBJbEoMJiLV9jqKbIqM2FHdEIEyENUxxt3f9d+lddpL/zWA1 B7EsdNXdpAlBZ/rh7JZ5iuIWhSHRJsGqNnaq60bHErQzCiyq3FwzyORDfsZHn49qsXAl TIeHNPx5pmOjWH+V6B2KP93xQnLuCC13Mvv6a3mGv68mPQ7CLP2wIcMBjnRCU7cXsQ3y Vsnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=KNB0zBKI; spf=pass (google.com: domain of gcc-patches-return-477570-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-477570-patch=linaro.org@gcc.gnu.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id n13-v6si2282778pgd.541.2018.05.11.02.32.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 May 2018 02:32:47 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-477570-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 header.s=default header.b=KNB0zBKI; spf=pass (google.com: domain of gcc-patches-return-477570-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-477570-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:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=UT0Wje2BH90UrVjv8M1AHSktYEiTf0DPRfhcJ6nxGiq64DEcHx yWnbzTCR20e6IILLAs3noCMC4Ov9A9MzJhz5WwlLA2ByqyeNsqn2A0gGCM8Q6gDx XHYligs2L3Oh343X1A/zeMEc1fYrxOwdnnBD+MU5LuQkf8Fql4aZER2PU= 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:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=C8U2dpOePUU4E/xT7PKZ2fiFkFg=; b=KNB0zBKISUAib4rfQgJL cwdMMrsycol/swdNgCDVfm1IoZDcsTSlCCHrmwHLQKbkubFWep8ChAR8UPU0sGNL OmOFxiuGAqWM868KSrFKmcAOkaL3dSadD0WknoUEN3ojHCQWZnHh3jtfBb/aBXTE hWMJx9Oi4g7X6vVSO7QMr5k= Received: (qmail 89968 invoked by alias); 11 May 2018 09:32:36 -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 89949 invoked by uid 89); 11 May 2018 09:32:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: foss.arm.com Received: from usa-sjc-mx-foss1.foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 11 May 2018 09:32:32 +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 379001596; Fri, 11 May 2018 02:32:31 -0700 (PDT) Received: from e120077-lin.cambridge.arm.com (e120077-lin.cambridge.arm.com [10.2.206.67]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AFAC93F73E; Fri, 11 May 2018 02:32:30 -0700 (PDT) To: gcc-patches From: "Richard Earnshaw (lists)" Subject: [arm] PR target/85606 prefer armv6s-m for armv6-m parts Openpgp: preference=signencrypt Message-ID: Date: Fri, 11 May 2018 10:32:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 When Arm introduced ARMv6-M there were two variants, ARMv6-M and ARMv6S-M. The two differed only in support for the SVC instruction. Later on SVC was then made a mandatory part of ARMv6-M and the ARMv6S-M name was dropped. GCC and GAS, however still recognize both names and at least some versions of GAS still distinguish between the two. To address this, this patch changes the architecture for the ARMv6-m cortex parts (m0, m0plus, m1 and the variants will small multiply units) to use the ARMv6S-M name in conjunction with the assembler. This avoids problems with them rejecting code that was previously accepted with older versions of GCC where we did not pass an explicit architecture string through to the compiler when using -mcpu on the command line. 2018-05-11 Richard Earnshaw PR target/85606 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now equivalent. (cortex-m0): Use armv6s-m isa. (cortex-m0plus): Likewise. (cortex-m1): Likewise. (cortex-m0.small-multiply): Likewise. (cortex-m0plus.small-multiply): Likewise. (cortex-m1.small-multiply): Likewise. Applied to trunk and gcc-8 branch. R. diff --git a/gcc/config/arm/arm-cpus.in b/gcc/config/arm/arm-cpus.in index cc08f5a..fce30e4 100644 --- a/gcc/config/arm/arm-cpus.in +++ b/gcc/config/arm/arm-cpus.in @@ -446,6 +446,8 @@ begin arch armv6-m isa ARMv6m end arch armv6-m +# This is now equivalent to armv6-m, but we keep it because some +# versions of GAS still distinguish between the two. begin arch armv6s-m tune for cortex-m1 base 6M @@ -1168,21 +1170,21 @@ end cpu arm1156t2f-s begin cpu cortex-m1 cname cortexm1 tune flags LDSCHED - architecture armv6-m + architecture armv6s-m costs v6m end cpu cortex-m1 begin cpu cortex-m0 cname cortexm0 tune flags LDSCHED - architecture armv6-m + architecture armv6s-m costs v6m end cpu cortex-m0 begin cpu cortex-m0plus cname cortexm0plus tune flags LDSCHED - architecture armv6-m + architecture armv6s-m costs v6m end cpu cortex-m0plus @@ -1192,7 +1194,7 @@ begin cpu cortex-m1.small-multiply cname cortexm1smallmultiply tune for cortex-m1 tune flags LDSCHED SMALLMUL - architecture armv6-m + architecture armv6s-m costs v6m end cpu cortex-m1.small-multiply @@ -1200,7 +1202,7 @@ begin cpu cortex-m0.small-multiply cname cortexm0smallmultiply tune for cortex-m0 tune flags LDSCHED SMALLMUL - architecture armv6-m + architecture armv6s-m costs v6m end cpu cortex-m0.small-multiply @@ -1208,7 +1210,7 @@ begin cpu cortex-m0plus.small-multiply cname cortexm0plussmallmultiply tune for cortex-m0plus tune flags LDSCHED SMALLMUL - architecture armv6-m + architecture armv6s-m costs v6m end cpu cortex-m0plus.small-multiply