summaryrefslogtreecommitdiffstats
path: root/libc/string
Commit message (Collapse)AuthorAgeFilesLines
* sh: update the memcpy adding a new loop with aggressive prefetchingSalvatore Cro2010-09-151-21/+107
| | | | | | | | | | | | | | | | After exploring different prefetch distance-degree combinations in this new update of the memcpy function, a new loop has been added for moving many cache lines with an aggressive prefetching schema. Prefetch has been removed when move few cache line aligned blocks. As final result, this memcpy gives us the same performances for small sizes (we already had!) and better numbers for big copies. In case of SH4-300 CPU Series, benchmarks show a gain of ~20% for sizes from 4KiB to 256KiB. In case of the SH4-200, there is a gain of ~40% for sizes bigger than 32KiB. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* sh: move data without fetching cache block within the memsetSalvatore Cro2010-09-151-28/+34
| | | | | | | | | | | | | | | | | | | | | | | With this patch the movca.l instruction is used within the memset. The current memset implementation only uses the FPU and there is an real gain for all the sizes. Adding the movca.l instruction numbers always are better than the generic code. There is a big gain for size greater than 64 KiB but number are worst for 4-32KiB sizes compared with the implementation without movca.l. Time Memory Bandwidth (Mbytes) ------------------------------------------------- Generic SH4 SH4 (FPU) (FPU+movca.l) ------------------------------------------------- 512 1143 1998 1596 1 KiB 1273 2567 1915 2 KiB 1350 2993 2128 4-32KiB 1391 3262 2252 64KiB-16MiB 170 186 *830* Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* use uniform form of C99 keywordsBernhard Reutner-Fischer2010-06-241-10/+10
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* sh4: Fixes for SH-4 without an FPUCarmelo Amoroso2010-06-143-3/+7
| | | | | | | | This patch disables SH-4 optimizations that rely on the FPU when building for variants that don't have an FPU, such as SH-4AL. Signed-off-by: Andrew Stubbs <ams@codesourcery.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* strverscmp: I forgot to export itDenys Vlasenko2010-06-041-0/+1
| | | | | | | | | | | Result was: strverscmp.o: 000000ec T __GI_strverscmp i.e. no plain "strverscmp"! Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Merge commit 'origin/master' into nptlAustin Foxley2010-04-021-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile.in extra/Configs/Config.in libc/sysdeps/linux/common/bits/kernel-features.h libc/sysdeps/linux/common/poll.c libc/sysdeps/linux/common/sysdep.h libc/sysdeps/linux/sh/sysdep.h Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * prettify make cleanBernhard Reutner-Fischer2010-03-251-2/+2
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * libc_sh: Update memcpy to use the ENTRY macroCarmelo Amoroso2010-02-101-8/+3
| | | | | | | | | | | | Use the ENTRY macro now available through the sysdep.h header Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* | Merge commit 'origin/master' into nptlAustin Foxley2009-12-194-1/+7
|\| | | | | | | | | | | | | | | Conflicts: libc/signal/sigpause.c libc/string/x86_64/memset.S Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * x86_64: fix multiple definition of chk functionsAustin Foxley2009-12-194-1/+7
| | | | | | | | | | | | also enable __chk_fail and only try to call it when SSP is on Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * build: Get rids of PIC macro using compiler flag __PIC__ insteadCarmelo Amoroso2009-12-162-3/+3
| | | | | | | | | | | | | | Based on Peter Mazinger's comments on a recent commit, I decided to get rids of all occurrences of PIC changing them to __PIC__ Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
| * sh: fix endianess and optimise the SH4 memcpyGiuseppe Cavallaro2009-12-141-2/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the big-endian code and adds a new optimization only for little endian mode. This optimization is based on prefetching and 64bit data transfer via FPU. Tests shows that ---------------------------------------- Memory bandwidth | Gain | sh4-300 | sh4-200 ---------------------------------------- 512 bytes to 16KiB | ~20% | ~25% from 32KiB to 16MiB | ~190% | ~5% ---------------------------------------- Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* | build: Get rids of PIC macro using compiler flag __PIC__ insteadCarmelo Amoroso2009-12-162-3/+3
| | | | | | | | | | | | | | Based on Peter Mazinger's comments on a recent commit, I decided to get rids of all occurrences of PIC changing them to __PIC__ Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* | sh: Add new optimisation to the SH4 memcpyAustin Foxley2009-11-228-11/+553
|/ | | | | | | | | | | | | | | | | | | This optimization is based on prefetching and 64bit data transfer via FPU (only for the little endianess) Tests shows that: ---------------------------------------- Memory bandwidth | Gain | sh4-300 | sh4-200 ---------------------------------------- 512 bytes to 16KiB | ~20% | ~25% from 32KiB to 16MiB | ~190% | ~5% ---------------------------------------- Signed-off-by: Austin Foxley <austinf@cetoncorp.com> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* drop __BCC__ cruft from string codeMike Frysinger2009-10-1014-131/+11
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* remove a few more empty #if/#endif pairsDenys Vlasenko2009-09-192-7/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* convert // comments to /**/; remove empty #if/#endif pairs. no code changesDenys Vlasenko2009-09-189-16/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* trim Experimentally off and uncommented hiddenBernhard Reutner-Fischer2009-09-1863-128/+0
| | | | | | | | sed -i -e '/Experimentally off - /d' $(grep -rl "Experimentally off - " *) sed -i -e '/^\/\*[[:space:]]*libc_hidden_proto(/d' $(grep -rl "libc_hidden_proto" *) should be a nop Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* strsignal.c: whitespace fixes, no code changes (verified with objdump)Denys Vlasenko2009-09-091-21/+17
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* support building out-of-treeBernhard Reutner-Fischer2009-08-171-0/+2
| | | | | | Handle O= Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libc/string/i386/string.h: fix -O0 build failureDenys Vlasenko2009-07-211-0/+22
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* relocate i386 string.h to i386-specific dirMike Frysinger2009-07-201-0/+316
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sh: Fix up optimized SH-4 memcpy on big endian.Giuseppe Cavallaro2009-07-141-12/+12
| | | | | | | | | | Signed-off-by: Hideo Saito <saito@densan.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> See Linux Kernel commit: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e08b954c9a140f2062649faec72514eb505f18c3 Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* Correct ARM memcpy comments.Joseph Myers2009-07-011-1/+2
| | | | | | | | The comments on register usage in ARM memcpy had dest and src the wrong way round; this patch (originally from Mark Shinwell) corrects this and adds a note on the return value. Signed-off-by: Joseph Myers <joseph@codesourcery.com>
* Fix Thumb-2 memcpy.Joseph Myers2009-06-301-1/+1
| | | | | | | | | When an IT block was changed from having two instructions to having one, the IT instruction at the start of the block was not updated, causing memcpy to fail to assemble for Thumb-2; this patch makes the obvious fix. Signed-off-by: Joseph Myers <joseph@codesourcery.com>
* libc/string/i386/memset.c: memset 1 byte at a time is a bit grossDenis Vlasenko2009-04-231-9/+56
|
* - fix link failures coming from recently added, misplaced strverscmp.Bernhard Reutner-Fischer2009-02-131-0/+0
|
* forgot to add libc/string/generic/strverscmp.cDenis Vlasenko2009-02-081-0/+117
|
* *: remove __UCLIBC_CURLOCALE_DATA, __UCLIBC_CURLOCALE_DATA.xDenis Vlasenko2009-01-211-1/+1
| | | | | | | | | | | | | | | | | | | is always equivalent to __UCLIBC_CURLOCALE->x. remove typedef __uclibc_locale_t, it used only in a few places, it is lees confusing to use struct __uclibc_locale_struct everywhere. xlocale.h: hide __global_locale back under _LIBC, bug 53 is wrong in claiming it should be exported. Also hide under _LIBC: extern __locale_t __curlocale_var; extern __locale_t __curlocale(void); extern __locale_t __curlocale_set(__locale_t newloc); # define __UCLIBC_CURLOCALE # define __XL_NPP(N) # define __LOCALE_PARAM # define __LOCALE_ARG # define __LOCALE_PTR
* - expand SUSv3_LEGACYBernhard Reutner-Fischer2008-12-291-1/+1
| | | | - SUSv4_LEGACY part #1 (non-networking)
* libc/string/i386/rawmemchr.c: i386 version, adapted from strlen()Denis Vlasenko2008-12-202-9/+33
| | | | | | | | | libc/string/i386/strlen.c: small optimization, same code size) text data bss dec hex filename - 240449 1759 11960 254168 3e0d8 lib/libuClibc-0.9.30-svn.so + 240339 1759 11960 254058 3e06a lib/libuClibc-0.9.30-svn.so
* string/i386/strncpy.c: fixlet for testing codeDenis Vlasenko2008-12-202-1/+48
| | | | | | | | | string/i386/strchrnul.c: new function, adapted from strchr.c text data bss dec hex filename - 240604 1759 11960 254323 3e173 lib/libuClibc-0.9.30-svn.so + 240449 1759 11960 254168 3e0d8 lib/libuClibc-0.9.30-svn.so
* string/i386/strncpy: faster i386 version (same code size), testing codeDenis Vlasenko2008-12-206-28/+47
| | | | | string/i386/*: formatiing and commentary tidying up
* strchr: a bit faster version for i386 (same code size)Denis Vlasenko2008-12-191-15/+17
|
* memmove: smaller one for i386, with added testing, and withDenis Vlasenko2008-12-191-20/+32
| | | | | | | | | added check for src == dest. run tested. text data bss dec hex filename - 39 0 0 39 27 libc/string/i386/memmove.os + 37 0 0 37 25 libc/string/i386/memmove.os
* strncat: shorter version for i386, add small embedded testDenis Vlasenko2008-12-194-55/+106
| | | | | | | | | | | | memchr: add small embedded test strnlen: make small embedded test easier to use strncmp: reformat assembly to make it readable, no code changes (verified with objdump) text data bss dec hex filename - 46 0 0 46 2e libc/string/i386/strncat.os + 39 0 0 39 27 libc/string/i386/strncat.os
* string/i386: smaller, and hopefully easier to read, strnlen().Denis Vlasenko2008-12-191-16/+31
| | | | | | | text data bss dec hex filename - 25 0 0 25 19 libc/string/i386/strnlen.os + 24 0 0 24 18 libc/string/i386/strnlen.os
* fix for build failures resulting from "string ops for i386" changeDenis Vlasenko2008-12-172-1/+2
|
* since gcc -Os hates us and does not inline string ops,Denis Vlasenko2008-12-179-9/+9
| | | | | | | | | | implement inline versions of some of them. Enable only those which result roughly in the same code size as using out-or-line versions. None of this affects users, installed headers won't have any trace of it.
* memchr: smaller i386 versionDenis Vlasenko2008-12-172-26/+34
| | | | | | | | | | | strrchr: smaller i386 version text data bss dec hex filename - 33 0 0 33 21 libc/string/i386/memchr.o + 28 0 0 28 1c libc/string/i386/memchr.o - 31 0 0 31 1f libc/string/i386/strrchr.o + 26 0 0 26 1a libc/string/i386/strrchr.o
* Remove the rest of "bounded pointers" scaffolding. gcc website says"Denis Vlasenko2008-12-135-139/+3
| | | | | | "Bounds Checking Projects... This project has been abandoned" for four years at least.
* string/generic/memcmp.c: remove some really paranoid guardsDenis Vlasenko2008-12-131-15/+2
| | | | | for ancient compilers. none of other string/*.c files have them.
* *: remove vestiges of gcc's "bounded pointers" feature,Denis Vlasenko2008-12-121-18/+9
| | | | | | it is dead (not supported by gcc) for years. (more of it remains in multiple copies of sigaction.c)
* smaller memcpyDenis Vlasenko2008-12-091-14/+15
| | | | | | | text data bss dec hex filename - 39 0 0 39 27 libc/string/i386/memcpy.os + 35 0 0 35 23 libc/string/i386/memcpy.os
* Go deeper while cleaning string directory to removeCarmelo Amoroso2008-12-041-1/+1
| | | | | | TARGET_SUBARCH implementation too. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* libc/string: need additional work to remove libc_hidden_proto's properlyDenis Vlasenko2008-11-2613-37/+16
|
* Make wcsxfrm visible also when LOCALE support is disabled.Carmelo Amoroso2008-11-251-0/+1
| | | | Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
* Last portion of libc_hidden_proto removal.Denis Vlasenko2008-11-208-23/+23
| | | | | Appears to build fine (several .configs tried)
* next portion of libc_hidden_proto removalDenis Vlasenko2008-11-203-3/+3
|
* libc_hidden_proto removal, a few more functionsDenis Vlasenko2008-11-184-5/+5
|