From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 70102 invoked by alias); 26 Jun 2017 11:20:57 -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 70086 invoked by uid 89); 26 Jun 2017 11:20:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=Hx-languages-length:2509 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; Mon, 26 Jun 2017 11:20:54 +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 3DD752B; Mon, 26 Jun 2017 04:20:53 -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 35E333F41F; Mon, 26 Jun 2017 04:20:52 -0700 (PDT) Subject: Re: [PATCH, GCC/ARM, Stage 1] Rename FPSCR builtins to correct names To: Christophe Lyon Cc: Kyrill Tkachov , Prakhar Bahuguna , "gcc-patches@gcc.gnu.org" , Richard Earnshaw , Ramana Radhakrishnan References: <20170322104630.z7g7nk6sv2xdzhad@e107464-lin.cambridge.arm.com> <58EB9043.8060104@foss.arm.com> <9982d9c9-ee19-c423-1e47-d0993987d369@foss.arm.com> From: Thomas Preudhomme Message-ID: <68dc50b4-0c2a-d6a1-65d1-8b90894f4fab@foss.arm.com> Date: Mon, 26 Jun 2017 11:20:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg01913.txt.bz2 Hi Christophe, On 23/06/17 20:10, Christophe Lyon wrote: > Hi Thomas, > > On 23 June 2017 at 17:48, Thomas Preudhomme > wrote: >> Hi Kyrill, >> >> >> On 10/04/17 15:01, Kyrill Tkachov wrote: >>> >>> Hi Prakhar, >>> Sorry for the delay, >>> >>> On 22/03/17 10:46, Prakhar Bahuguna wrote: >>>> >>>> The GCC documentation in section 6.60.8 ARM Floating Point Status and >>>> Control >>>> Intrinsics states that the FPSCR register can be read and written to >>>> using the >>>> intrinsics __builtin_arm_get_fpscr and __builtin_arm_set_fpscr. However, >>>> these >>>> are misnamed within GCC itself and these intrinsic names are not >>>> recognised. >>>> This patch corrects the intrinsic names to match the documentation, and >>>> adds >>>> tests to verify these intrinsics generate the correct instructions. >>>> >>>> Testing done: Ran regression tests on arm-none-eabi for Cortex-M4. >>>> >>>> 2017-03-09 Prakhar Bahuguna >>>> >>>> gcc/ChangeLog: >>>> >>>> * gcc/config/arm/arm-builtins.c (arm_init_builtins): Rename >>>> __builtin_arm_ldfscr to __builtin_arm_get_fpscr, and rename >>>> __builtin_arm_stfscr to __builtin_arm_set_fpscr. >>>> * gcc/testsuite/gcc.target/arm/fpscr.c: New file. >>>> >>>> Okay for stage 1? >>> >>> >>> I see that the mistake was in not addressing one of the review comments >>> in: >>> https://gcc.gnu.org/ml/gcc-patches/2014-04/msg01832.html >>> properly in the patch that added these functions :( >>> >>> This is ok for stage 1 if a bootstrap and test on arm-none-linux-gnueabihf >>> works >>> fine >>> I don't think we want to maintain the __builtin_arm_[ld,st]fscr names for >>> backwards compatibility >>> as they were not documented and are __builtin_arm* functions that we don't >>> guarantee to maintain. >> >> >> How about a backport to GCC 5, 6 & 7? The patch applied cleanly on each of >> these versions and the testsuite didn't show any regression for any of the >> backport when run for Cortex-M7. >> > > Three's a problem with GCC-5: > gcc.target/arm/fpscr.c: unknown effective target keyword > `arm_fp_ok' for " dg-require-effective-target 4 arm_fp_ok " > > Indeed arm_fp_ok effective-target does not exist in the gcc-5 branch. Oh no. I remember not seeing anything but I can indeed see this with compare_tests from the sum file I save after each testing. Alright, what is done is done, working on a patch now. Best regards, Thomas