summary refs log tree commit diff
path: root/sysdeps/x86_64/multiarch
diff options
context:
space:
mode:
authorNoah Goldstein <goldstein.w.n@gmail.com>2022-10-19 19:13:37 -0700
committerNoah Goldstein <goldstein.w.n@gmail.com>2022-10-20 11:29:05 -0700
commitf04f8373ddd71794050b904174fb06967be6393f (patch)
tree000c2792059cc252aa916d89882e846cb8820e67 /sysdeps/x86_64/multiarch
parent7775574ce0527c326eaea78370bc9f49cc4743a6 (diff)
downloadglibc-f04f8373ddd71794050b904174fb06967be6393f.tar.gz
glibc-f04f8373ddd71794050b904174fb06967be6393f.tar.xz
glibc-f04f8373ddd71794050b904174fb06967be6393f.zip
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.
Diffstat (limited to 'sysdeps/x86_64/multiarch')
-rw-r--r--sysdeps/x86_64/multiarch/strcmp-sse4_2.S4
1 files 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