public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v1 1/4] x86: Use `testb` for case-locale check in str{n}casecmp-avx2
@ 2022-10-20  2:13 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
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Noah Goldstein @ 2022-10-20  2:13 UTC (permalink / raw)
  To: libc-alpha; +Cc: goldstein.w.n, hjl.tools, carlos

`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-avx2.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysdeps/x86_64/multiarch/strcmp-avx2.S b/sysdeps/x86_64/multiarch/strcmp-avx2.S
index 4c01d664e8..a24f886a27 100644
--- a/sysdeps/x86_64/multiarch/strcmp-avx2.S
+++ b/sysdeps/x86_64/multiarch/strcmp-avx2.S
@@ -214,7 +214,7 @@ STRCMP:
 #  else
 	mov	(%LOCALE_REG), %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
 	leaq	_nl_C_LC_CTYPE_tolower + 128 * 4(%rip), TOLOWER_BASE
 # endif
-- 
2.34.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-10-20 17:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH v1 3/4] x86: Use `testb` for case-locale check in str{n}casecmp-sse42 Noah Goldstein
2022-10-20 17:03   ` 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

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).