Various memcpy implementations in tree

Sebastian Huber sebastian.huber at embedded-brains.de
Fri May 10 07:41:51 UTC 2013


On 05/08/2013 07:15 PM, Joel Sherrill wrote:
> Hi
>
> I was poking around and noticed that we have 4 memcpy
> implementations in our tree. Is there opportunity for
> clean up?
>
> ./c/src/lib/libcpu/lm32/shared/misc/memcpy.c
> ./c/src/lib/libcpu/nios2/shared/misc/memcpy.c
> ./c/src/lib/libbsp/powerpc/shared/src/memcpy.c
> ./c/src/lib/libbsp/arm/shared/startup/bsp-start-memcpy.S
>
> The lm32 and nios2 are SIMPLE code and IMO look to
> be candidates for removal.
>
> The PowerPC one looks optimized and I wonder why it
> hasn't been merged into newlib. Does this not map to
> a multilib?

The PowerPC one uses cache operations and thus it is not suitable for Newlib.

>
> The ARM one is also simple code but in asm and based on
> the name, I assume it is only used in start code. But why
> have it
>

The ARM one is used to copy sections from a load area into a runtime area, e.g. 
you can copy the memcpy() code with this function to its runtime destination.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list