From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 817153854819 for ; Wed, 9 Dec 2020 12:27:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 817153854819 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F000131B; Wed, 9 Dec 2020 04:27:43 -0800 (PST) Received: from [192.168.1.19] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2577C3F718; Wed, 9 Dec 2020 04:27:42 -0800 (PST) Subject: Re: [PATCH] arm: Fix memchr() for Armv8-R To: Sebastian Huber , newlib@sourceware.org References: <20201204074204.31629-1-sebastian.huber@embedded-brains.de> From: Richard Earnshaw Message-ID: Date: Wed, 9 Dec 2020 12:27:42 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3496.9 required=5.0 tests=BAYES_00, BODY_8BITS, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 12:27:45 -0000 On 09/12/2020 12:11, Sebastian Huber wrote: > On 04/12/2020 08:42, Sebastian Huber wrote: > >> The Cortex-R52 processor is an Armv8-R processor with a NEON unit.  This >> fix prevents conflicting architecture profiles A/R errors issued by the >> linker. >> >> Signed-off-by: Sebastian Huber >> --- >>   newlib/libc/machine/arm/memchr.S | 4 ++++ >>   1 file changed, 4 insertions(+) >> >> diff --git a/newlib/libc/machine/arm/memchr.S >> b/newlib/libc/machine/arm/memchr.S >> index 7c22b117e..1a4c6512c 100644 >> --- a/newlib/libc/machine/arm/memchr.S >> +++ b/newlib/libc/machine/arm/memchr.S >> @@ -79,7 +79,11 @@ >>     @ NOTE: This ifdef MUST match the one in memchr-stub.c >>   #if defined (__ARM_NEON__) || defined (__ARM_NEON) >> +#if __ARM_ARCH >= 8 && __ARM_ARCH_PROFILE == 'R' >> +    .arch    armv8-r >> +#else >>       .arch    armv7-a >> +#endif >>       .fpu    neon >>     > > The memchr.S from the ARM optimized routines package has little in > common with the file in Newlib: > > https://github.com/ARM-software/optimized-routines/blob/master/string/arm/memchr.S > > > The Newlib variant uses VFP instructions for example. > > I think this change should be checked in as is. > That probably means the newlib one is out of date and needs to be resynced. R.