@@ -14,8 +14,6 @@
* to a jmp to memcpy_erms which does the REP; MOVSB mem copy.
*/
-.weak memcpy
-
/*
* memcpy - Copy a memory block.
*
@@ -28,7 +26,9 @@
* rax original destination
*/
ENTRY(__memcpy)
-ENTRY(memcpy)
+.weak memcpy
+.p2align 4, 0x90
+memcpy:
ALTERNATIVE_2 "jmp memcpy_orig", "", X86_FEATURE_REP_GOOD, \
"jmp memcpy_erms", X86_FEATURE_ERMS
@@ -25,8 +25,8 @@
* rax: dest
*/
.weak memmove
-
-ENTRY(memmove)
+.p2align 4, 0x90
+memmove:
ENTRY(__memmove)
/* Handle more 32 bytes in loop */
@@ -6,8 +6,6 @@
#include <asm/alternative-asm.h>
#include <asm/export.h>
-.weak memset
-
/*
* ISO C memset - set a memory block to a byte value. This function uses fast
* string to get better performance than the original function. The code is
@@ -19,7 +17,9 @@
*
* rax original destination
*/
-ENTRY(memset)
+.weak memset
+.p2align 4, 0x90
+memset:
ENTRY(__memset)
/*
* Some CPUs support enhanced REP MOVSB/STOSB feature. It is recommended