public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Noah Goldstein <nwg@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc] x86: Use `testb` for case-locale check in str{n}casecmp-avx2 Date: Thu, 20 Oct 2022 19:04:05 +0000 (GMT) [thread overview] Message-ID: <20221020190405.688A1384D171@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b6d02d64570e83bedfdb946cb1bdf0c9fd6d3eb0 commit b6d02d64570e83bedfdb946cb1bdf0c9fd6d3eb0 Author: Noah Goldstein <goldstein.w.n@gmail.com> Date: Wed Oct 19 19:13:35 2022 -0700 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: --- 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
reply other threads:[~2022-10-20 19:04 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221020190405.688A1384D171@sourceware.org \ --to=nwg@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).