From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by sourceware.org (Postfix) with ESMTPS id D6F443858D3C for ; Tue, 19 Apr 2022 23:42:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D6F443858D3C Received: by mail-pl1-x629.google.com with SMTP id d15so170355pll.10 for ; Tue, 19 Apr 2022 16:42:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=aEB3/HxT5ZYqR70LaHQXDw5M1cLF+U0RPw3AV6pO2h8=; b=D0cmi+kxk9Va2FKe9FcY/Ez8YyD8nnXUarVnoIHZHqY4HLJcSqkX+apUEfZDJYQBHS HCD9cS9KsAel3ydoFsUvOd9vzXYhKjkK5rxAjGedqMltMWuwA43SiLR4zEXHz2pNQlxH W2uH10m3Ll6w885eKMKm5ZCM9d2CFursdP/tFWXZUZIIQUnH9OfigVzdVnOrL+mI4xTL XpDIXBHg5ET9YND98B9niVfKy5h448HJGPDOQyUBAOOb4SSrfpYiEBb5FeP3DDeminv8 YeoZfsJEWWQ58IUSKK1NLU13Z1F5ARSvUjy3h8u7KO/beQKFYsH3sJ2G7ghQUxu7Qstm xwRg== X-Gm-Message-State: AOAM531d+CBvOYYYN3G1XdSNzTjZeHn8Lu6wqlqRZmJsDi46A0HhP1rj PCLQhPt2ykefKKNx2+CyunleHdq2ZWStPQJkE1oS0EmGgWM= X-Google-Smtp-Source: ABdhPJw1loIKDCeY9EsXBy5uXmsjlLg+2umxp+IZQqKp76JEQtFP6pYUgRJyva3DrWfPEabnPMeQjVMbZwMwXkb5j5Y= X-Received: by 2002:a17:903:1108:b0:156:73a7:7c1 with SMTP id n8-20020a170903110800b0015673a707c1mr17825731plh.101.1650411766810; Tue, 19 Apr 2022 16:42:46 -0700 (PDT) MIME-Version: 1.0 References: <20220419225550.646821-1-goldstein.w.n@gmail.com> In-Reply-To: From: "H.J. Lu" Date: Tue, 19 Apr 2022 16:42:11 -0700 Message-ID: Subject: Re: [PATCH v1] x86: Fix missing __wmemcmp def for disable-multiarch build To: Noah Goldstein Cc: GNU C Library , "Carlos O'Donell" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3026.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_LOTSOFHASH, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2022 23:42:50 -0000 On Tue, Apr 19, 2022 at 4:40 PM Noah Goldstein wr= ote: > > On Tue, Apr 19, 2022 at 6:36 PM H.J. Lu wrote: > > > > On Tue, Apr 19, 2022 at 3:55 PM Noah Goldstein wrote: > > > > > > commit 8804157ad9da39631703b92315460808eac86b0c > > > Author: Noah Goldstein > > > 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 > > > . */ > > > > > > +#define USE_AS_WMEMCMP 1 > > > #if IS_IN (libc) > > > > Do we need to check "IS_IN (libc)" here? > > I'm not sure. Was essentially copying the existing memcmpeq code > for this: > https://sourceware.org/git/?p=3Dglibc.git;a=3Dblobdiff;f=3Dsysdeps/x86_64= /multiarch/memcmpeq-sse2.S;h=3Dde7f5a7525ab41ea42ea581c6981ced63f8be976;hp= =3Db80a29d4b05bd7401d16afdbeee96403480953d2;hb=3Da5659cf27d3ce6101c1632715d= 18ab6321755340;hpb=3D7a06be051c01b4325927efab5b4e4280bb4a5a42 Can you follow wmemchr-sse2.S instead? > > > > > # 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 > > > . */ > > > > > > -#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. --=20 H.J.