public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org>
To: cygwin-cvs@sourceware.org
Subject: [newlib-cygwin] Cygwin: x86_64: add wmemset assembler entry point
Date: Mon,  8 Aug 2022 16:17:00 +0000 (GMT)	[thread overview]
Message-ID: <20220808161700.C89593857005@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=188d5f6c9ad5cbbd6f0fcb9aaf15bc9870597910

commit 188d5f6c9ad5cbbd6f0fcb9aaf15bc9870597910
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Mon Aug 8 16:49:52 2022 +0200

    Cygwin: x86_64: add wmemset assembler entry point
    
    So far, wmemset used the C implemantation from newlib.  Let's use
    the optimized assembler code instead.
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

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=libcygwin0.a
 if TARGET_X86_64
 TARGET_FILES= \
 	x86_64/memcpy.s \
-	x86_64/memset.s
+	x86_64/memset.s \
+	x86_64/mcountFunc.S
 endif
 
 LIB_FILES= \
@@ -357,8 +358,7 @@ MALLOC_FILES= \
 GMON_FILES= \
 	gmon.c \
 	mcount.c \
-	profil.c \
-	mcountFunc.S
+	profil.c
 
 GENERATED_FILES= \
 	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


                 reply	other threads:[~2022-08-08 16:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220808161700.C89593857005@sourceware.org \
    --to=corinna@sourceware.org \
    --cc=cygwin-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).