From: "H.J. Lu" <hjl.tools@gmail.com>
To: Noah Goldstein <goldstein.w.n@gmail.com>
Cc: GNU C Library <libc-alpha@sourceware.org>,
"Carlos O'Donell" <carlos@systemhalted.org>
Subject: Re: [PATCH v1] x86: Fix missing __wmemcmp def for disable-multiarch build
Date: Tue, 19 Apr 2022 16:36:22 -0700 [thread overview]
Message-ID: <CAMe9rOr6bTmCvG0pFvkThNseEP9e=S15ch9NQJw3CfwUgdPdtw@mail.gmail.com> (raw)
In-Reply-To: <20220419225550.646821-1-goldstein.w.n@gmail.com>
On Tue, Apr 19, 2022 at 3:55 PM Noah Goldstein <goldstein.w.n@gmail.com> wrote:
>
> commit 8804157ad9da39631703b92315460808eac86b0c
> Author: Noah Goldstein <goldstein.w.n@gmail.com>
> Date: Fri Apr 15 12:27:59 2022 -0500
>
> x86: Optimize memcmp SSE2 in memcmp.S
>
> Only defined wmemcmp and missed __wmemcmp. This commit fixes that by
> defining __wmemcmp and setting wmemcmp as a weak alias to __wmemcmp.
>
> Both multiarch and disable-multiarch builds succeed and full xchecks
> pass.
> ---
> sysdeps/x86_64/multiarch/wmemcmp-sse2.S | 8 +++++---
> sysdeps/x86_64/wmemcmp.S | 6 ++++--
> 2 files changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/sysdeps/x86_64/multiarch/wmemcmp-sse2.S b/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
> index 57be1c446e..92d6819cb3 100644
> --- a/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
> +++ b/sysdeps/x86_64/multiarch/wmemcmp-sse2.S
> @@ -16,10 +16,12 @@
> License along with the GNU C Library; if not, see
> <https://www.gnu.org/licenses/>. */
>
> +#define USE_AS_WMEMCMP 1
> #if IS_IN (libc)
Do we need to check "IS_IN (libc)" here?
> # define MEMCMP __wmemcmp_sse2
> +# include "memcmp-sse2.S"
> #else
> -# define MEMCMP wmemcmp
> +# define MEMCMP __wmemcmp
> +# include "../memcmp.S"
> +weak_alias (__wmemcmp, wmemcmp)
> #endif
> -#define USE_AS_WMEMCMP 1
> -#include "memcmp-sse2.S"
> diff --git a/sysdeps/x86_64/wmemcmp.S b/sysdeps/x86_64/wmemcmp.S
> index 032f389158..8bd3cf80db 100644
> --- a/sysdeps/x86_64/wmemcmp.S
> +++ b/sysdeps/x86_64/wmemcmp.S
> @@ -16,6 +16,8 @@
> License along with the GNU C Library; if not, see
> <https://www.gnu.org/licenses/>. */
>
> -#define MEMCMP wmemcmp
> +#define MEMCMP __wmemcmp
> #define USE_AS_WMEMCMP 1
> -#include "multiarch/memcmp-sse2.S"
> +#include "memcmp.S"
> +
> +weak_alias (__wmemcmp, wmemcmp)
> --
> 2.25.1
>
--
H.J.
next prev parent reply other threads:[~2022-04-19 23:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-19 22:55 Noah Goldstein
2022-04-19 23:36 ` H.J. Lu [this message]
2022-04-19 23:39 ` Noah Goldstein
2022-04-19 23:42 ` H.J. Lu
2022-04-19 23:52 ` Noah Goldstein
2022-04-19 23:52 ` [PATCH v2] " Noah Goldstein
2022-04-19 23:56 ` H.J. Lu
2022-04-20 1:19 ` Noah Goldstein
2022-05-12 20:04 ` Sunil Pandey
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='CAMe9rOr6bTmCvG0pFvkThNseEP9e=S15ch9NQJw3CfwUgdPdtw@mail.gmail.com' \
--to=hjl.tools@gmail.com \
--cc=carlos@systemhalted.org \
--cc=goldstein.w.n@gmail.com \
--cc=libc-alpha@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: link
Be 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).