x86: Use `testb` for case-locale check in str{n}casecmp-sse2

`testb` saves a bit of code size is the imm-operand can be encoded
1-bytes.

Tested on x86-64.
This commit is contained in:
Noah Goldstein 2022-10-19 19:13:36 -07:00
parent b6d02d6457
commit 7775574ce0
1 changed files with 2 additions and 2 deletions

View File

@ -104,7 +104,7 @@ ENTRY (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
# elif defined USE_AS_STRNCASECMP_L
/* We have to fall back on the C implementation for locales
@ -114,7 +114,7 @@ ENTRY (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