This is the mail archive of the
mailing list for the newlib project.
Re: [patch] ARM: Memcpy for armv7m/armv7em
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Joey Ye <joey dot ye at arm dot com>
- Cc: "newlib at sourceware dot org" <newlib at sourceware dot org>
- Date: Mon, 03 Jun 2013 15:04:19 +0100
- Subject: Re: [patch] ARM: Memcpy for armv7m/armv7em
- References: <000001ce6020$a6b25c90$f41715b0$ at arm dot com>
On 03/06/13 07:07, Joey Ye wrote:
> Memcpy in assembly tuned for ARM Cortex-M3/Cortex-M4, with tremendous
> speed-up comparing to C implementation. For aligned copy it is 45% faster in
> average. For unaligned copy it is up to 8x faster.
> Tested on Cortex-M3/Cortex-M4 boards and qemu. No regression.
> OK to newlib trunk?
> 2013-06-03 Joey Ye <email@example.com>
> memcpy for armv7m/armv7em.
> * libc/machine/arm/Makefile.in: Add dependence.
> * newlib/libc/machine/arm/memcpy-stub.c: Exclude armv7-m/armv7e-m.
> * newlib/libc/machine/arm/memcpy.S: Include architecture specific
> implementations. Original file renamed to ...
> * newlib/libc/machine/arm/memcpy-armv7a.S: ... this. Remove architecture
> * newlib/libc/machine/arm/memcpy-armv7m.S: New.
Makefile.in is a generated file, built from Makefile.am; so I've updated the
patch and committed it. ChangeLog tweaked to:
* libc/machine/arm/Makefile.am (MEMCPY_DEP): New define.
($(lpfx)memcpy.o, $(lpfx)memcpy.obj): Depend on MEMCPY_DEP.
* libc/machine/arm/Makefile.in: Regenerated.
* newlib/libc/machine/arm/memcpy-stub.c: Exclude armv7-m/armv7e-m.
* newlib/libc/machine/arm/memcpy-armv7m.S: New.
* newlib/libc/machine/arm/memcpy.S: Replace with wrapper code. Old
code moved to ...
* newlib/libc/machine/arm/memcpy-armv7a.S: ... here. Remove
redundant architecture check.