public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] x86: Use `testb` for case-locale check in str{n}casecmp-sse42
@ 2022-10-20 19:04 Noah Goldstein
0 siblings, 0 replies; only message in thread
From: Noah Goldstein @ 2022-10-20 19:04 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f04f8373ddd71794050b904174fb06967be6393f
commit f04f8373ddd71794050b904174fb06967be6393f
Author: Noah Goldstein <goldstein.w.n@gmail.com>
Date: Wed Oct 19 19:13:37 2022 -0700
x86: Use `testb` for case-locale check in str{n}casecmp-sse42
`testb` saves a bit of code size is the imm-operand can be encoded
1-bytes.
Tested on x86-64.
Diff:
---
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-10-20 19:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-20 19:04 [glibc] x86: Use `testb` for case-locale check in str{n}casecmp-sse42 Noah Goldstein
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).