Commit Graph

555 Commits

Author SHA1 Message Date
Joseph Myers 6a57d93130 Remove __GLIBC_HAVE_LONG_LONG. 2013-01-11 21:13:25 +00:00
H.J. Lu 740b3dbee8 Add --enable-hardcoded-path-in-tests configure option 2013-01-11 07:14:18 -08:00
Joseph Myers fed0faa1c6 Remove __GNUC__ conditions for "long long" from string.h and wchar.h. 2013-01-10 16:44:59 +00:00
Joseph Myers 568035b787 Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
2012-12-27 Bruno Haible 7fffbdfff7 BZ#14317: Optimze __xpg_strerror_r
[BZ #14317]
* string/xpg-strerror.c (__xpg_strerror_r): Optimize, call
strlen only if needed.
2012-12-27 22:37:39 +01:00
Maxim Kuvyrkov 19218757e6 Use memcpy in memmove when possible 2012-11-06 17:47:55 -08:00
Joseph Myers 03ac099f6b Define and use $(run-built-tests). 2012-10-24 00:08:46 +00:00
H.J. Lu 69f07e5fd1 Add string IFUNC tests 2012-10-19 22:10:16 -07:00
H.J. Lu 38c7829650 Add a testcase for BZ #14716 2012-10-19 01:20:12 -07:00
Maxim Kuvyrkov e9f3725206 Fix BZ #14716: memmem crash 2012-10-15 17:22:41 -07:00
Andreas Schwab ca38dc17d8 Avoid PLT references from __get_clockfreq on powerpc 2012-10-12 16:54:06 +02:00
H.J. Lu 11dd4af68c Framework to test IFUNC implementations on target 2012-10-11 16:40:01 -07:00
H.J. Lu 9a387d1f78 Use IFUNC memmove/memset in x86-64 bcopy/bzero
Also add separate tests for bcopy and bzero.
2012-10-11 13:58:16 -07:00
Maxim Kuvyrkov 57e605ba50 Fix BZ #14602: strstr and strcasestr return wrong result. 2012-10-08 20:52:53 -07:00
H.J. Lu 5d41d91a3e Add a strstr test for page boundary 2012-10-06 16:04:56 -07:00
H.J. Lu d7e0dab96d Add a testase for BZ #14602 2012-10-05 13:32:27 -07:00
H.J. Lu 03759f47db Test strcasestr/strchr/strstr under all implementations 2012-10-05 13:32:07 -07:00
Maxim Kuvyrkov bcca089526 Micro-optimize critical path of strstr, strcase and memmem. 2012-08-21 18:07:47 -07:00
Maxim Kuvyrkov 99677e5755 Use pointers for traversing arrays in strstr, strcasestr and memmem. 2012-08-21 18:07:47 -07:00
Maxim Kuvyrkov 400726deef Detect EOL on-the-fly in strstr, strcasestr and memmem. 2012-08-21 18:07:47 -07:00
Maxim Kuvyrkov 20a71f2c8a Optimize first-character loop of strstr, strcasestr and memmem. 2012-08-21 18:07:47 -07:00
Liubov Dmitrieva b3f479a85a Fix segmentation fault in strncasecmp for i686
2012-08-15  Liubov Dmitrieva  <liubov.dmitrieva@gmail.com>

	[BZ #14195]
        * sysdeps/i386/i686/multiarch/strcmp-sssse3.S: Fix
        segmentation fault for a case of two empty input strings.
	* string/test-strncasecmp.c (check1): Renamed to...
	(bz12205): ...this.
	(bz14195): Add new testcase for two empty input strings and N > 0.
	(test_main): Call new testcase, adapt for renamed function.
2012-08-15 21:06:55 +02:00
Roland McGrath be75d75807 Remove local redefinition of MAX macro. 2012-08-15 11:40:41 -07:00
Chung-Lin Tang 36d54b744e Make endian.h usable for assembler 2012-06-15 21:19:12 +02:00
Cyril Hrubis a3aeac403e Add __wur to GNU version of strerror_r.
Not using the result of the GNU strerror_r() is always a mistake.

Moreover this would generate warning if XSI version was expected but GNU
version was used instead (because some random used header defined
_GNU_SOURCE which was Python.h in this case).
2012-06-15 09:09:59 +02:00
H.J. Lu 49bdf4c19d Use RAX_LP/RDX_LP on SAVE_PTR in x86_64 strtok.S 2012-06-14 10:00:28 -07:00
Andreas Schwab 5be8418cb0 Remove use of INTDEF/INTUSE in stdio-common 2012-06-01 01:25:41 +02:00
Andreas Schwab 56d25bb888 Remove use of INTDEF/INTUSE in intl 2012-05-24 23:08:18 +02:00
Andreas Jaeger 1a4b75a190 Fix strspn warning with -Wconversion
[BZ #14083]
Fix warning when using strspn with -Wconversion:
$ gcc -Wconversion -O t.c
t.c: In function ‘main’:
t.c:8:7: warning: conversion to ‘long unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
2012-05-09 16:47:57 +02:00
Marek Polacek 5ac3ea17df Fix attributes for fortify functions. 2012-04-29 15:34:20 +02:00
David S. Miller 50f81fd74b Remove all traces of reg_char.
* sysdeps/generic/memcopy.h (reg_char): Delete.
	* debug/strcat_chk.c: Use char, not reg_char.
	* debug/strcpy_chk.c: Likewise.
	* debug/strncat_chk.c: Likewise.
	* debug/strncpy_chk.c: Likewise.
	* string/memchr.c: Likewise.
	* string/memrchr.c: Likewise.
	* string/rawmemchr.c: Likewise.
	* string/strcat.c: Likewise.
	* string/strchr.c: Likewise.
	* string/strchrnul.c: Likewise.
	* string/strcmp.c: Likewise.
	* string/strcpy.c: Likewise.
	* string/strncat.c: Likewise.
	* string/strncmp.c: Likewise.
	* string/strncpy.c: Likewise.
2012-04-18 16:19:10 -07:00
H.J. Lu f8887d0a5f Add byteswap-16.h for __bswap_16 2012-04-06 15:14:52 -07:00
Andreas Jaeger b1aa60f32d Add __bswap_64 definition for non GCC compilers.
[BZ#13926]
Currently __bswap_64 is not defined at all for non-GCC compilers.
Define it but guard it with __GLIBC_HAVE_LONG_LONG.

endian.h uses __bswap_64, make the functions only available
if __GLIBC_HAVE_LONG_LONG is defined.
2012-04-03 09:13:59 +02:00
Thomas Schwinge 302cadd343 Testsuite #include fixes. 2012-04-02 22:31:32 +02:00
H.J. Lu eb96ffb07d Move stdio-common/_itoa.h to sysdeps/generic 2012-03-20 16:00:23 -07:00
Ulrich Drepper a4300c7a4d Remove distribute variable from Makefiles 2012-03-07 05:17:13 -05:00
Paul Eggert 59ba27a63a Replace FSF snail mail address with URLs. 2012-02-09 23:18:22 +00:00
Joseph Myers c8a89e7dd5 Remove miscellaneous __STDC__ conditionals. 2012-01-30 21:20:32 +00:00
Ulrich Drepper a784e50247 Remove pre-ISO C support
No more __const.
2012-01-07 23:57:22 -05:00
Ulrich Drepper df78418ad7 Fix problem with reuse of test-strcpy for wide char testing 2012-01-07 08:54:34 -05:00
Ulrich Drepper 91e4d56a68 WP fixes 2011-12-17 14:40:33 -05:00
Ulrich Drepper 1d3e4b618a Optimized wcschr and wcscpy for x86-64 and x86-32 2011-12-17 14:39:23 -05:00
Ulrich Drepper a2d18b64ed WP cleanup 2011-12-17 14:27:26 -05:00
Ulrich Drepper df33a8fb1c Fix WP 2011-12-17 14:19:26 -05:00
Ulrich Drepper 5b330a2d90 Add tests for wcsrchr and wcscpy 2011-12-17 14:14:58 -05:00
Andreas Schwab f3a6cc0a56 Fix access after end of search string in regex matcher 2011-11-30 11:03:20 +01:00
Ulrich Drepper 51d91b1895 Add strchrnul performance test 2011-10-29 11:54:15 -04:00
Andreas Schwab 37822576b8 Fix strchr test 2011-10-25 15:25:37 +02:00
Ulrich Drepper 2fa2ae85ca Fix strnlen change 2011-10-23 16:30:40 -04:00
Liubov Dmitrieva fc2ee42abe Add optimized wcslen and strnlen for x86-32 2011-10-23 15:17:23 -04:00
Ulrich Drepper afb05e8157 Fix WS 2011-10-23 14:15:06 -04:00
Liubov Dmitrieva 2d09f82f8a Add wcschr test cases 2011-10-23 14:14:26 -04:00
Liubov Dmitrieva 619fcccaa3 Add wcslen test cases 2011-10-23 14:11:50 -04:00
Ulrich Drepper dc150e52d5 More WS fixes 2011-10-23 13:35:48 -04:00
Liubov Dmitrieva 95584d3b33 Fix signedness in wcscmp comparison 2011-10-23 13:34:15 -04:00
Ulrich Drepper 855d156018 Optimize x86-64 rawmemchr and add test 2011-10-19 22:22:29 -04:00
Liubov Dmitrieva be13f7bff6 Optimized memcmp and wmemcmp for x86-64 and x86-32 2011-10-15 11:10:08 -04:00
Andreas Schwab 5298ffa828 Add memrchr tests 2011-10-13 13:34:41 +02:00
Liubov Dmitrieva 951fbcec70 Optimized memchr, memrchr, rawmemchr for x86-32 2011-10-12 11:42:04 -04:00
Liubov Dmitrieva 42622229a9 delete 4 lines with unused "define" macros in test-memcmp 2011-10-07 11:52:49 -04:00
Denis Zaitceff f3cdd46748 string/strncat.c: fix compilation for some architectures 2011-09-09 12:45:03 -04:00
Ulrich Drepper 762011fe9f Move wide char tests to wcsmbs directory 2011-09-08 18:01:07 -04:00
Liubov Dmitrieva 4badf7e8d7 New comprehensive test for wmemcmp 2011-09-08 17:51:50 -04:00
Roland McGrath 69f6309711 More warning patrol. 2011-08-14 16:42:06 -07:00
Ulrich Drepper 16292eddd7 Provide better output in string tests
If IMPL is called with a macro for the first parameter the macro does not
get expanded before the string is stored in the impl_t data structure.
2011-08-04 17:47:24 -04:00
Ulrich Drepper cb7e923b71 Cleanup wcscmp test addition 2011-08-04 17:43:30 -04:00
Liubov Dmitrieva cff8293390 New comprehensive test for wcscmp 2011-08-04 16:04:15 -04:00
Ulrich Drepper a65c0b7a32 Add more tests for strcat and strncat. 2011-07-21 06:56:25 -04:00
Liubov Dmitrieva 99710781cc Improve 64 bit strcat functions with SSE2/SSSE3 2011-07-19 17:11:54 -04:00
Andreas Schwab e0e7228480 Fix alloca accounting in strxfm 2011-07-19 15:03:57 -04:00
Ulrich Drepper 6f0eec6710 Add string/test-strncat.c 2011-07-06 21:44:29 -04:00
Ulrich Drepper adcd5c15d2 Fix last change
And optimize a bit.
2011-05-21 16:19:06 -04:00
Ulrich Drepper 7ea72f9996 Always fill output buffer in XPG strerror function 2011-05-21 12:11:36 -04:00
Ulrich Drepper 7e4afad5bc Nicer output for negative error numbers in strerror_r 2011-05-21 12:09:23 -04:00
Andreas Schwab 821ae7137b Revert "Fix strncmp page test to limit length to size of object"
This reverts commit e513f34605.
2011-04-07 08:21:00 +02:00
Andreas Schwab e513f34605 Fix strncmp page test to limit length to size of object 2011-04-05 13:45:23 +02:00
Ulrich Drepper 786e84c533 Fix whitespace issue. 2011-03-21 05:38:07 -04:00
H.J. Lu c97a1282a4 Handle page boundaries in x86 SSE4.2 strncmp. 2011-03-21 05:35:38 -04:00
Ulrich Drepper 98727dbea2 Change XPG-compliant strerror_r function to return error code. 2010-12-25 13:56:48 -05:00
Jakub Jelinek 42acbb92c8 Fix -D_FORTIFY_SOURCE memmove and bcop 2010-12-09 10:38:18 -05:00
H.J. Lu 8ca52c6e3b Fix one exit path in x86-64 SSE4.2 str{,n}casecmp. 2010-11-10 03:05:37 -05:00
Ulrich Drepper c54ff5c67e Add missing file. 2010-10-26 00:23:45 -04:00
Andreas Krebbel f09677388a Fix concurrency problem between dl_open and dl_iterate_phdr 2010-10-26 00:23:14 -04:00
Ulrich Drepper 67a67b950b Add test case for strstr problem. 2010-10-06 13:48:51 -04:00
Eric Blake 5fb308bca2 Fix strstr and memmem algorithm. 2010-10-06 13:48:07 -04:00
Ulrich Drepper 45db99c7d0 Fix handling of tail bytes of buffer in SSE2/SSSE3 x86-64 version strn{,case}cmp 2010-10-03 22:10:30 -04:00
Ulrich Drepper e9f82e0d1d Add optimized strncasecmp versions for x86-64. 2010-08-14 22:04:01 -07:00
Ulrich Drepper 42e08a5438 Implement optimized strcaecmp for x86-64. 2010-07-30 00:14:04 -07:00
Ulrich Drepper fe36dd025e Fix tolower operation in strcasestr. 2010-07-30 00:09:07 -07:00
Ulrich Drepper 24fb0f88ed Add optimized x86-64 implementation of strnlen.
While at it, beef up the test suite for strnlen and add performance
tests for it, too.
2010-07-26 08:37:08 -07:00
Ulrich Drepper dbc676d4ff Add performance tests for strstr and strcasestr. 2010-07-23 22:27:53 -07:00
H.J. Lu 6fb8cbcb58 Improve 64bit memcpy/memmove for Atom, Core 2 and Core i7
This patch includes optimized 64bit memcpy/memmove for Atom, Core 2 and
Core i7.  It improves memcpy by up to 3X on Atom, up to 4X on Core 2 and
up to 1X on Core i7.  It also improves memmove by up to 3X on Atom, up to
4X on Core 2 and up to 2X on Core i7.
2010-06-30 08:26:11 -07:00
H.J. Lu 6cc2b8a6df Fix bugs in x86-32 strcmp-sse4.S and strcmp-ssse3.S 2010-04-15 07:49:30 -07:00
H.J. Lu 8863605af9 Test case for last x86 memcmp problem 2010-03-24 12:14:03 -07:00
Ulrich Drepper cd5c5f7051 Relax onditions in strings.h. 2010-01-14 16:16:21 -08:00
Ulrich Drepper 18598ff105 Cleanup strings.h.
Cleanup the strings.h header for XPG7 and update the tests.
2010-01-10 02:08:32 -08:00
Ulrich Drepper f095bb7204 Add support for XPG7 testing.
The header conformance testing code needed extending for XPG7.  This
exposed a few bugs in the headers.  There are more changes to come.
2010-01-09 10:56:41 -08:00
Caolan McNamara 6515a01fc1 Avoid memset warning in one case. 2009-11-10 06:29:13 -08:00
H.J. Lu 2b7a8664fa SSE4.2 strstr/strcasestr for x86-64.
This patch implements SSE4.2 strstr/strcasestr, using Knuth-Morris-Pratt
string searching algorithm.
2009-07-20 21:06:50 -07:00
H.J. Lu ab6a873fe0 SSSE3 strcpy/stpcpy for x86-64
This patch adds SSSE3 strcpy/stpcpy. I got up to 4X speed up on Core 2
and Core i7.  I disabled it on Atom since SSSE3 version is slower for
shorter (<64byte) data.
2009-07-02 03:39:03 -07:00