[ARM] Reorganize memcpy selection.

Marcus Shawcroft marcus.shawcroft@arm.com
Thu Nov 5 11:15:00 GMT 2015


Following up on Richard's comments in 
https://sourceware.org/ml/newlib/2015/msg00739.html this is the first of 
a series of patches to clean up the auto configury mechanism used to 
select different implementations of common functions for various 
architecture versions.

There are three functions with special handling in Makefile.am, this 
patch addresses only memcpy, following patches will address memchr and 
strlen in a similar fashion.

The approach here is to remove the selection of memcpy within automake 
and instead use complimentary logic in memcpy-stub.c and memcpy.S to 
choose between the generic memcpy.c implemenation or one of the 
architecture specific memcpy*.S implemenations.

If this patch is taken I'll followup with equivalent rework for memchr 
and strlen.

Regressed for armv7-a armv5 armv8-a, correct selection of memcpy 
implementation by manual inspection of a test program built for these 
three architectures.

OK ?


/Marcus


2015-11-05  Marcus Shawcroft  <marcus.shawcroft@arm.com>

        * libc/machine/arm/Makefile.am: Drop MEMCPY_SRC and MEMCPY_OBJ.
        * libc/machine/arm/Makefile.in: Regenerate.
        * libc/machine/arm/memcpy-stub.c: New.
        * libc/machine/arm/memcpy.c: Adjust copyright year.  Adjust
          comments.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-ARM-Reorganize-memcpy-selection.patch
Type: text/x-patch
Size: 12566 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20151105/1dba6ea4/attachment.bin>


More information about the Newlib mailing list