From 102a0743326a03cd1a1202ceda21e175b7d3575c Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Tue, 20 Feb 2024 01:20:52 +0000 Subject: [PATCH] add new system file --- kernel/tools/arch/x86/lib/memset_64.S | 29 +++++++++++++++-------------- 1 files changed, 15 insertions(+), 14 deletions(-) diff --git a/kernel/tools/arch/x86/lib/memset_64.S b/kernel/tools/arch/x86/lib/memset_64.S index f8f3dc0..d624f2b 100644 --- a/kernel/tools/arch/x86/lib/memset_64.S +++ b/kernel/tools/arch/x86/lib/memset_64.S @@ -3,9 +3,8 @@ #include <linux/linkage.h> #include <asm/cpufeatures.h> -#include <asm/alternative-asm.h> - -.weak memset +#include <asm/alternative.h> +#include <asm/export.h> /* * ISO C memset - set a memory block to a byte value. This function uses fast @@ -18,8 +17,8 @@ * * rax original destination */ -ENTRY(memset) -ENTRY(__memset) +SYM_FUNC_START_WEAK(memset) +SYM_FUNC_START(__memset) /* * Some CPUs support enhanced REP MOVSB/STOSB feature. It is recommended * to use it when possible. If not available, use fast string instructions. @@ -41,9 +40,11 @@ movl %edx,%ecx rep stosb movq %r9,%rax - ret -ENDPROC(memset) -ENDPROC(__memset) + RET +SYM_FUNC_END(__memset) +SYM_FUNC_END_ALIAS(memset) +EXPORT_SYMBOL(memset) +EXPORT_SYMBOL(__memset) /* * ISO C memset - set a memory block to a byte value. This function uses @@ -56,16 +57,16 @@ * * rax original destination */ -ENTRY(memset_erms) +SYM_FUNC_START_LOCAL(memset_erms) movq %rdi,%r9 movb %sil,%al movq %rdx,%rcx rep stosb movq %r9,%rax - ret -ENDPROC(memset_erms) + RET +SYM_FUNC_END(memset_erms) -ENTRY(memset_orig) +SYM_FUNC_START_LOCAL(memset_orig) movq %rdi,%r10 /* expand byte value */ @@ -124,7 +125,7 @@ .Lende: movq %r10,%rax - ret + RET .Lbad_alignment: cmpq $7,%rdx @@ -136,4 +137,4 @@ subq %r8,%rdx jmp .Lafter_bad_alignment .Lfinal: -ENDPROC(memset_orig) +SYM_FUNC_END(memset_orig) -- Gitblit v1.6.2