hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/tools/arch/x86/lib/memset_64.S
....@@ -3,9 +3,8 @@
33
44 #include <linux/linkage.h>
55 #include <asm/cpufeatures.h>
6
-#include <asm/alternative-asm.h>
7
-
8
-.weak memset
6
+#include <asm/alternative.h>
7
+#include <asm/export.h>
98
109 /*
1110 * ISO C memset - set a memory block to a byte value. This function uses fast
....@@ -18,8 +17,8 @@
1817 *
1918 * rax original destination
2019 */
21
-ENTRY(memset)
22
-ENTRY(__memset)
20
+SYM_FUNC_START_WEAK(memset)
21
+SYM_FUNC_START(__memset)
2322 /*
2423 * Some CPUs support enhanced REP MOVSB/STOSB feature. It is recommended
2524 * to use it when possible. If not available, use fast string instructions.
....@@ -41,9 +40,11 @@
4140 movl %edx,%ecx
4241 rep stosb
4342 movq %r9,%rax
44
- ret
45
-ENDPROC(memset)
46
-ENDPROC(__memset)
43
+ RET
44
+SYM_FUNC_END(__memset)
45
+SYM_FUNC_END_ALIAS(memset)
46
+EXPORT_SYMBOL(memset)
47
+EXPORT_SYMBOL(__memset)
4748
4849 /*
4950 * ISO C memset - set a memory block to a byte value. This function uses
....@@ -56,16 +57,16 @@
5657 *
5758 * rax original destination
5859 */
59
-ENTRY(memset_erms)
60
+SYM_FUNC_START_LOCAL(memset_erms)
6061 movq %rdi,%r9
6162 movb %sil,%al
6263 movq %rdx,%rcx
6364 rep stosb
6465 movq %r9,%rax
65
- ret
66
-ENDPROC(memset_erms)
66
+ RET
67
+SYM_FUNC_END(memset_erms)
6768
68
-ENTRY(memset_orig)
69
+SYM_FUNC_START_LOCAL(memset_orig)
6970 movq %rdi,%r10
7071
7172 /* expand byte value */
....@@ -124,7 +125,7 @@
124125
125126 .Lende:
126127 movq %r10,%rax
127
- ret
128
+ RET
128129
129130 .Lbad_alignment:
130131 cmpq $7,%rdx
....@@ -136,4 +137,4 @@
136137 subq %r8,%rdx
137138 jmp .Lafter_bad_alignment
138139 .Lfinal:
139
-ENDPROC(memset_orig)
140
+SYM_FUNC_END(memset_orig)