From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 104049 invoked by alias); 1 Sep 2016 12:43:41 -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 104012 invoked by uid 89); 1 Sep 2016 12:43:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=thomas.preudhomme@foss.arm.com, D*foss.arm.com, thomaspreudhommefossarmcom, chip 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, 01 Sep 2016 12:43:28 +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 8B5B6CEB for ; Thu, 1 Sep 2016 05:43:26 -0700 (PDT) Received: from [10.2.206.52] (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3CF8A3F212 for ; Thu, 1 Sep 2016 05:43:26 -0700 (PDT) Subject: [arm-embedded] [PATCH, ARM 7/7] Enable atomics for ARMv8-M Mainline References: <6932846.jufI7oIi7S@e108577-lin> To: gcc-patches@gcc.gnu.org From: Thomas Preudhomme X-Forwarded-Message-Id: <6932846.jufI7oIi7S@e108577-lin> Message-ID: <0310ca5b-05a4-539c-33c8-669d08bb5a5c@foss.arm.com> Date: Thu, 01 Sep 2016 12:43:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <6932846.jufI7oIi7S@e108577-lin> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-09/txt/msg00037.txt.bz2 Hi, We've decided to apply the following patch to ARM/embedded-6-branch. Best regards, Thomas -------- Forwarded Message -------- Subject: Re: [PATCH, ARM 7/7] Enable atomics for ARMv8-M Mainline Date: Thu, 14 Jul 2016 17:34:44 +0100 From: Thomas Preudhomme Organization: ARM To: Kyrill Tkachov CC: Richard Earnshaw , Ramana Radhakrishnan , gcc-patches@gcc.gnu.org On Thursday 14 July 2016 17:23:46 Kyrill Tkachov wrote: > Hi Thomas, > > On 14/07/16 14:37, Thomas Preudhomme wrote: > > Hi Kyrill, > > > > On Thursday 19 May 2016 17:18:29 Kyrill Tkachov wrote: > >> Hi Thomas, > >> > >> On 17/05/16 11:15, Thomas Preudhomme wrote: > >>> Ping? > >>> > >>> *** gcc/ChangeLog *** > >>> > >>> 2015-12-17 Thomas Preud'homme > >>> > >>> * config/arm/arm.h (TARGET_HAVE_LDACQ): Enable for ARMv8-M > >>> Mainline. > >>> > >>> diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h > >>> index > >>> 347b5b0a5cc0bc1e3b5020c8124d968e76ce48a4..e154bd31b8084f9f45ad4409e7b38d > >>> e6 > >>> 52538c51 100644 > >>> --- a/gcc/config/arm/arm.h > >>> +++ b/gcc/config/arm/arm.h > >>> @@ -266,7 +266,7 @@ extern void > >>> (*arm_lang_output_object_attributes_hook) > >>> (void); > >>> > >>> || arm_arch7) && arm_arch_notm) > >>> > >>> /* Nonzero if this chip supports load-acquire and store-release. */ > >>> > >>> -#define TARGET_HAVE_LDACQ (TARGET_ARM_ARCH >= 8 && arm_arch_notm) > >>> +#define TARGET_HAVE_LDACQ (TARGET_ARM_ARCH >= 8 && TARGET_32BIT) > >> > >> So this change is correct because ARMv8-M Mainline uses Thumb2 > >> and is therefore TARGET_32BIT. > >> > >> This is ok but I'd like to see a follow up patch to enable the tests > >> that exercise acquire-release instructions in the arm.exp testsuite > >> for ARMv8-M Mainline so that we can be sure they get proper testsuite > >> coverage. > > > > I've respinned the patch because of the changes to atomic_loaddi output > > template in config/arm/sync.md. This patch now creates a new macro > > TARGET_HAVE_LDACQEXD to guard LDACQEXD and STLEXD instructions that are > > not > > available in ARMv8-M Mainline. It took advantage of the respin to also add > > the tests you were asking for. > > > > ChangeLog entries are as follow: > > > > *** gcc/ChangeLog *** > > > > 2016-07-05 Thomas Preud'homme > > > > * config/arm/arm.h (TARGET_HAVE_LDACQ): Enable for ARMv8-M > > Mainline. > > (TARGET_HAVE_LDACQD): New macro. > > * config/arm/sync.md (atomic_loaddi): Use TARGET_HAVE_LDACQD > > rather > > than TARGET_HAVE_LDACQ. > > (arm_load_acquire_exclusivedi): Likewise. > > (arm_store_release_exclusivedi): Likewise. > > > > *** gcc/testsuite/ChangeLog *** > > > > 2016-07-05 Thomas Preud'homme > > > > * gcc.target/arm/atomic-comp-swap-release-acquire.c: Rename into > > ... > > * gcc.target/arm/atomic-comp-swap-release-acquire-1.c: This. > > * gcc.target/arm/atomic-op-acq_rel.c: Rename into ... > > * gcc.target/arm/atomic-op-acq_rel-1.c: This. > > * gcc.target/arm/atomic-op-acquire.c: Rename into ... > > * gcc.target/arm/atomic-op-acquire-1.c: This. > > * gcc.target/arm/atomic-op-char.c: Rename into ... > > * gcc.target/arm/atomic-op-char-1.c: This. > > * gcc.target/arm/atomic-op-consume.c: Rename into ... > > * gcc.target/arm/atomic-op-consume-1.c: This. > > * gcc.target/arm/atomic-op-int.c: Rename into ... > > * gcc.target/arm/atomic-op-int-1.c: This. > > * gcc.target/arm/atomic-op-relaxed.c: Rename into ... > > * gcc.target/arm/atomic-op-relaxed-1.c: This. > > * gcc.target/arm/atomic-op-release.c: Rename into ... > > * gcc.target/arm/atomic-op-release-1.c: This. > > * gcc.target/arm/atomic-op-seq_cst.c: Rename into ... > > * gcc.target/arm/atomic-op-seq_cst-1.c: This. > > * gcc.target/arm/atomic-op-short.c: Rename into ... > > * gcc.target/arm/atomic-op-short-1.c: This. > > * gcc.target/arm/atomic-comp-swap-release-acquire-2.c: New test. > > * gcc.target/arm/atomic-op-acq_rel-2.c: Likewise. > > * gcc.target/arm/atomic-op-acquire-2.c: Likewise. > > * gcc.target/arm/atomic-op-char-2.c: Likewise. > > * gcc.target/arm/atomic-op-consume-2.c: Likewise. > > * gcc.target/arm/atomic-op-int-2.c: Likewise. > > * gcc.target/arm/atomic-op-relaxed-2.c: Likewise. > > * gcc.target/arm/atomic-op-release-2.c: Likewise. > > * gcc.target/arm/atomic-op-seq_cst-2.c: Likewise. > > * gcc.target/arm/atomic-op-short-2.c: Likewise. > > > > Testsuite shows no regression and atomic tests [1] are passing for ARMv8-M > > Mainline. > > > > [1] gcc.dg/atomic*, g++.dg/ext/atomic*, gcc.target/arm/atomic*, > > gcc.target/arm/sync* and libstdc++-v3/testsuite/29_atomic/* > > Thanks, this is ok if testing on arm-none-linux-gnueabihf is ok. > In particular, please make sure that the tests still pass for an A-profile > target. Oh yes, I forgot to mention that I also tested the same tests for armv8-a without any code generation change for both ARM and Thumb. The whole testsuite shows no regression as well. Best regards, Thomas