diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2014-09-05 17:26:42 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2014-09-05 17:26:42 +0000 |
commit | c8a01afd974007a09f64a1830056ed11d5ebeec8 (patch) | |
tree | f8af7d69f1de51ec860b4a0d14682c7c107f2bb9 /newlib/libc/machine/arm/strcmp.S | |
parent | bea3ef947a51f735d0cebb3099a5a34f44c1dd30 (diff) | |
download | cygnal-c8a01afd974007a09f64a1830056ed11d5ebeec8.tar.gz cygnal-c8a01afd974007a09f64a1830056ed11d5ebeec8.tar.bz2 cygnal-c8a01afd974007a09f64a1830056ed11d5ebeec8.zip |
2014-09-05 Hale Wang <hale.wang@arm.com>
* libc/machine/arm/memchr.S: Clean up the wrapper.
* libc/machine/arm/memcpy.S: Likewise.
* libc/machine/arm/memchr-stub.c: Delete this redundant file.
* libc/machine/arm/memcpy-stub.c: Likewise.
* libc/machine/arm/strcmp.S: Add speed-preferred wrapper.
* libc/machine/arm/strlen.S: Likewise.
* libc/machine/arm/Makefile.am: Add dependencies.
* libc/machine/arm/Makefile.in: Regenerated.
* libc/machine/arm/configure.in: Add dependencies.
* libc/machine/arm/configure: Regenerated.
Diffstat (limited to 'newlib/libc/machine/arm/strcmp.S')
-rw-r--r-- | newlib/libc/machine/arm/strcmp.S | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/newlib/libc/machine/arm/strcmp.S b/newlib/libc/machine/arm/strcmp.S index 1742322ee..fecfdfd52 100644 --- a/newlib/libc/machine/arm/strcmp.S +++ b/newlib/libc/machine/arm/strcmp.S @@ -64,8 +64,27 @@ || (__ARM_ARCH == 6 && __ARM_ARCH_PROFILE == 'M') # if defined (__thumb__) && !defined (__thumb2__) -/* Thumb1 only variant. */ -# include "strcmp-armv4t.S" +/* Thumb1 only variant. If size is preferred, use strcmp-armv4t.S. + If speed is preferred, the strcmp function in ../../string/strcmp.c + will be used. */ + +# if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) +# include "strcmp-armv4t.S" +# else + /* Leave this field blank. So the strcmp() is not defined, and this will + automatically pull in the default C definition of strcmp() from + ../../string/strcmp.c. No need to include this file explicitely. + The lib_a-strcmp.o will not be generated, so it won't replace the + default lib_a-strcmp.o which is generated by ../../string/strcmp.c. + See the commands in configure.in and Makefile.am for more details. + + However, if we need to rewrite this function to be more efficient, + we can add the corresponding assembly code into this field and + change the commands in configure.in and Makefile.am to allow the + corresponding lib_a-strcmp.o to be generated. + */ +# endif + # else # include "strcmp-arm-tiny.S" # endif |