]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Define _HAVE_STRING_ARCH_mempcpy to 1 for x86
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 8 Mar 2016 18:57:31 +0000 (10:57 -0800)
committerMike Frysinger <vapier@gentoo.org>
Sat, 12 Mar 2016 16:38:39 +0000 (11:38 -0500)
Since x86 has an optimized mempcpy and GCC can inline mempcpy on x86,
define _HAVE_STRING_ARCH_mempcpy to 1 for x86.

[BZ #19759]
* sysdeps/x86/bits/string.h (_HAVE_STRING_ARCH_mempcpy): New.

(cherry picked from commit 2b35e48c0c547b3f6f81996ce7ad7d67e24c7329)
(cherry picked from commit b4456470a64a1e4e466a98dca3b51bf63fb5a13c)

sysdeps/x86/bits/string.h

index e4e019f1fca7b96ade08acf661b7846dbb45837f..8dfce052a67cecdacacee8a9527498b896816578 100644 (file)
@@ -23,6 +23,9 @@
 /* Use the unaligned string inline ABI.  */
 #define _STRING_INLINE_unaligned 1
 
+/* Don't inline mempcpy into memcpy as x86 has an optimized mempcpy.  */
+#define _HAVE_STRING_ARCH_mempcpy 1
+
 /* Enable inline functions only for i486 or better when compiling for
    ia32.  */
 #if !defined __x86_64__ && (defined __i486__ || defined __pentium__          \