diff options
author | Andi Kleen <ak@suse.de> | 2007-07-21 11:09:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-21 21:37:08 -0400 |
commit | aac57f81eb16d56afb5bd5a31ff325b5d1615580 (patch) | |
tree | 105a7918021cfbe5272654786ba24c142f141a83 /include/asm-x86_64/string.h | |
parent | 5b74e3abb3e9bd8a2f52a7b653941e3686c5df1a (diff) |
x86_64: Always use builtin memcpy on gcc 4.3
Jan asked to always use the builtin memcpy on gcc 4.3 mainline because
it should generate better code than the old macro. Let's try it.
Cc: Jan Hubicka <jh@suse.cz>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-x86_64/string.h')
-rw-r--r-- | include/asm-x86_64/string.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/asm-x86_64/string.h b/include/asm-x86_64/string.h index 9505d9f4bead..e583da7918fb 100644 --- a/include/asm-x86_64/string.h +++ b/include/asm-x86_64/string.h | |||
@@ -29,6 +29,9 @@ return (to); | |||
29 | function. */ | 29 | function. */ |
30 | 30 | ||
31 | #define __HAVE_ARCH_MEMCPY 1 | 31 | #define __HAVE_ARCH_MEMCPY 1 |
32 | #if (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || __GNUC__ > 4 | ||
33 | extern void *memcpy(void *to, const void *from, size_t len); | ||
34 | #else | ||
32 | extern void *__memcpy(void *to, const void *from, size_t len); | 35 | extern void *__memcpy(void *to, const void *from, size_t len); |
33 | #define memcpy(dst,src,len) \ | 36 | #define memcpy(dst,src,len) \ |
34 | ({ size_t __len = (len); \ | 37 | ({ size_t __len = (len); \ |
@@ -38,7 +41,7 @@ extern void *__memcpy(void *to, const void *from, size_t len); | |||
38 | else \ | 41 | else \ |
39 | __ret = __builtin_memcpy((dst),(src),__len); \ | 42 | __ret = __builtin_memcpy((dst),(src),__len); \ |
40 | __ret; }) | 43 | __ret; }) |
41 | 44 | #endif | |
42 | 45 | ||
43 | #define __HAVE_ARCH_MEMSET | 46 | #define __HAVE_ARCH_MEMSET |
44 | void *memset(void *s, int c, size_t n); | 47 | void *memset(void *s, int c, size_t n); |