[RFC-PATCH] x86: really use __builtin_memcmp on x86_32

Harvey Harrison
2008-11-10T06:12:36Z

Impact: prevent generic code from overriding __builtin_memcmp

lib/string.c was using a generic implementation of memcmp
because __HAVE_ARCH_MEMCMP was not defined and it was then doing
#undef memcmp and defining a generic version.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
arch/x86/include/asm/string_32.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/include/asm/string_32.h b/arch/x86/include/asm/string_32.h
index c86f452..b671baf 100644
--- a/arch/x86/include/asm/string_32.h
+++ b/arch/x86/include/asm/string_32.h
@@ -195,6 +195,7 @@ static inline void *__memcpy3d(void *to, const void *from, size_t len)
#define __HAVE_ARCH_MEMMOVE
void *memmove(void *dest, const void *src, size_t n);

+#define __HAVE_ARCH_MEMCMP
#define memcmp __builtin_memcmp

#define __HAVE_ARCH_MEMCHR
--
1.6.0.3.866.gc189b