From: Noah Goldstein Date: Thu, 20 Oct 2022 02:13:35 +0000 (-0700) Subject: x86: Use `testb` for case-locale check in str{n}casecmp-avx2 X-Git-Tag: glibc-2.37~235 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b6d02d64570e83bedfdb946cb1bdf0c9fd6d3eb0;p=thirdparty%2Fglibc.git x86: Use `testb` for case-locale check in str{n}casecmp-avx2 `testb` saves a bit of code size is the imm-operand can be encoded 1-bytes. Tested on x86-64. --- diff --git a/sysdeps/x86_64/multiarch/strcmp-avx2.S b/sysdeps/x86_64/multiarch/strcmp-avx2.S index 4c01d664e87..a24f886a278 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