From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id C89593857005; Mon, 8 Aug 2022 16:17:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C89593857005 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: x86_64: add wmemset assembler entry point X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/master X-Git-Oldrev: 3e13d935545f31cbd1f4871b84f5d70928c56f42 X-Git-Newrev: 188d5f6c9ad5cbbd6f0fcb9aaf15bc9870597910 Message-Id: <20220808161700.C89593857005@sourceware.org> Date: Mon, 8 Aug 2022 16:17:00 +0000 (GMT) X-BeenThere: cygwin-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Aug 2022 16:17:00 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D188d5f6c9ad= 5cbbd6f0fcb9aaf15bc9870597910 commit 188d5f6c9ad5cbbd6f0fcb9aaf15bc9870597910 Author: Corinna Vinschen Date: Mon Aug 8 16:49:52 2022 +0200 Cygwin: x86_64: add wmemset assembler entry point =20 So far, wmemset used the C implemantation from newlib. Let's use the optimized assembler code instead. =20 Signed-off-by: Corinna Vinschen Diff: --- winsup/cygwin/Makefile.am | 6 +++--- winsup/cygwin/x86_64/memset.s | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/Makefile.am b/winsup/cygwin/Makefile.am index 6838be99a..b8436226b 100644 --- a/winsup/cygwin/Makefile.am +++ b/winsup/cygwin/Makefile.am @@ -56,7 +56,8 @@ TEST_LIB_NAME=3Dlibcygwin0.a if TARGET_X86_64 TARGET_FILES=3D \ x86_64/memcpy.s \ - x86_64/memset.s + x86_64/memset.s \ + x86_64/mcountFunc.S endif =20 LIB_FILES=3D \ @@ -357,8 +358,7 @@ MALLOC_FILES=3D \ GMON_FILES=3D \ gmon.c \ mcount.c \ - profil.c \ - mcountFunc.S + profil.c =20 GENERATED_FILES=3D \ sigfe.s diff --git a/winsup/cygwin/x86_64/memset.s b/winsup/cygwin/x86_64/memset.s index ac73b6ace..d3b95ecd2 100644 --- a/winsup/cygwin/x86_64/memset.s +++ b/winsup/cygwin/x86_64/memset.s @@ -67,3 +67,11 @@ L1: rep movq 16(%rsp),%rdi ret .seh_endproc + + .globl wmemset + .seh_proc wmemset +wmemset: + .seh_endprologue + shlq $1,%r8 /* cnt * sizeof (wchar_t) */ + jmp memset + .seh_endproc