This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PATCH: New comprehensive test for wcscmp
On Tue, Jul 19, 2011 at 04:02, Dmitrieva Liubov
<liubov.dmitrieva@gmail.com> wrote:
> This patch adds string/test-wcscmp.c to test wcscmp. ÂWe will
> contribute optimized wcscmp later.
First of all, it is completely unacceptable that generic code like
that contains x86-specific code. The inline assembly must go.
Second, I think it should be possible to share code between
test-strcmp and test-wcscmp. Define macros like
#ifdef WIDE
#define L(str) L##str
#else
#define L(str) str
#endif
etc. The test-wcscmp.c file should just be
#define WIDE 1
#include "test-strcmp.c"
You have more tests in the wcscmp code and those should also benefit
the strcmp test.