提交 aac57f81 编写于 作者: A Andi Kleen 提交者: Linus Torvalds

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: NAndi Kleen <ak@suse.de>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 5b74e3ab
......@@ -29,6 +29,9 @@ return (to);
function. */
#define __HAVE_ARCH_MEMCPY 1
#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || __GNUC__ > 4
extern void *memcpy(void *to, const void *from, size_t len);
#else
extern void *__memcpy(void *to, const void *from, size_t len);
#define memcpy(dst,src,len) \
({ size_t __len = (len); \
......@@ -38,7 +41,7 @@ extern void *__memcpy(void *to, const void *from, size_t len);
else \
__ret = __builtin_memcpy((dst),(src),__len); \
__ret; })
#endif
#define __HAVE_ARCH_MEMSET
void *memset(void *s, int c, size_t n);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册