From: Noah Goldstein <goldstein.w.n@gmail.com>
To: libc-alpha@sourceware.org
Cc: goldstein.w.n@gmail.com, hjl.tools@gmail.com, carlos@systemhalted.org
Subject: [PATCH v1 3/4] x86: Use `testb` for case-locale check in str{n}casecmp-sse42
Date: Wed, 19 Oct 2022 19:13:37 -0700 [thread overview]
Message-ID: <20221020021338.3394281-3-goldstein.w.n@gmail.com> (raw)
In-Reply-To: <20221020021338.3394281-1-goldstein.w.n@gmail.com>
`testb` saves a bit of code size is the imm-operand can be encoded
1-bytes.
Tested on x86-64.
---
sysdeps/x86_64/multiarch/strcmp-sse4_2.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sysdeps/x86_64/multiarch/strcmp-sse4_2.S b/sysdeps/x86_64/multiarch/strcmp-sse4_2.S
index dc6fc90e14..6b540ff894 100644
--- a/sysdeps/x86_64/multiarch/strcmp-sse4_2.S
+++ b/sysdeps/x86_64/multiarch/strcmp-sse4_2.S
@@ -119,7 +119,7 @@ STRCMP:
# else
mov (%rdx), %RAX_LP
# endif
- testl $1, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%rax)
+ testb $1, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%rax)
jne __strcasecmp_l_nonascii
# endif
# ifdef USE_AS_STRNCASECMP_L
@@ -130,7 +130,7 @@ STRCMP:
# else
mov (%rcx), %RAX_LP
# endif
- testl $1, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%rax)
+ testb $1, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%rax)
jne __strncasecmp_l_nonascii
# endif
--
2.34.1
next prev parent reply other threads:[~2022-10-20 2:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-20 2:13 [PATCH v1 1/4] x86: Use `testb` for case-locale check in str{n}casecmp-avx2 Noah Goldstein
2022-10-20 2:13 ` [PATCH v1 2/4] x86: Use `testb` for case-locale check in str{n}casecmp-sse2 Noah Goldstein
2022-10-20 17:03 ` H.J. Lu
2022-10-20 2:13 ` Noah Goldstein [this message]
2022-10-20 17:03 ` [PATCH v1 3/4] x86: Use `testb` for case-locale check in str{n}casecmp-sse42 H.J. Lu
2022-10-20 2:13 ` [PATCH v1 4/4] x86: Use `testb` for FSRM check in memmove-vec-unaligned-erms Noah Goldstein
2022-10-20 17:03 ` H.J. Lu
2022-10-20 17:02 ` [PATCH v1 1/4] x86: Use `testb` for case-locale check in str{n}casecmp-avx2 H.J. Lu
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=20221020021338.3394281-3-goldstein.w.n@gmail.com \
--to=goldstein.w.n@gmail.com \
--cc=carlos@systemhalted.org \
--cc=hjl.tools@gmail.com \
--cc=libc-alpha@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).