[PATCH] arm: Fix memchr() for Armv8-R
Sebastian Huber
sebastian.huber@embedded-brains.de
Wed Dec 9 12:11:06 GMT 2020
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 <sebastian.huber@embedded-brains.de>
> ---
> 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.
--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax: +49-89-18 94 741 - 08
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
More information about the Newlib
mailing list