From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x112e.google.com (mail-yw1-x112e.google.com [IPv6:2607:f8b0:4864:20::112e]) by sourceware.org (Postfix) with ESMTPS id 6AFA93857829 for ; Tue, 19 Apr 2022 23:53:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6AFA93857829 Received: by mail-yw1-x112e.google.com with SMTP id 00721157ae682-2f19fdba41fso1721307b3.3 for ; Tue, 19 Apr 2022 16:53:08 -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=c9JCqKgOKtjYqPNAKMDHOdZoGD335UHRDzOjqR5fA4M=; b=HTs0Q9ZQ6HLg0LewlnvHIjM8Usk+0AiKwpDcAtOA6bZJNRc4DWvqI3apePIxRQSX7C Ia3SxADw41LSh6p9/Isix+J3mwcagUwuS3yCDgsoXRYaK9mgiPJYYcwAWmXVzziYOP+W 8N7vF18k0eQ3GJy7GYg0KJxreRLSGsYrqFalk0DKkyZHwH8c6U1Fp2cvlwok93GuQ8PU 4VNNq8SqSKKOzvJJIaAe0iNlr2M/gk2BRrMq4g/9fNqZPXwEujlR+wxPMybheKS/lttf WyT/FWT73QNO+DD6z2k1kkGeeMhIHAakLHhCfF6RmloQz9DhtAlUViW0KptKZcp00GyJ lZoA== X-Gm-Message-State: AOAM530vDR48Y4GTM4BCtJ7OmT17YRcA7GaFr4cq+/LSnv8wdOQKrmE1 AU7j5Pp2zD0NVzI/y7iSjgIxpYQkTqvd8DCI+ID0yjBS X-Google-Smtp-Source: ABdhPJxqQ8+DhGCLVEfur8GxUis0m+58utAJXPfBlBqNUeDyz6WPae4HgYlvhfkyg8QP2yYxf9tzyANGBcS2I9m61PY= X-Received: by 2002:a0d:d44f:0:b0:2f1:63b1:1df2 with SMTP id w76-20020a0dd44f000000b002f163b11df2mr16791260ywd.423.1650412387923; Tue, 19 Apr 2022 16:53:07 -0700 (PDT) MIME-Version: 1.0 References: <20220419225550.646821-1-goldstein.w.n@gmail.com> In-Reply-To: From: Noah Goldstein Date: Tue, 19 Apr 2022 18:52:57 -0500 Message-ID: Subject: Re: [PATCH v1] x86: Fix missing __wmemcmp def for disable-multiarch build To: "H.J. Lu" Cc: GNU C Library , "Carlos O'Donell" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.3 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:53:09 -0000 On Tue, Apr 19, 2022 at 6:42 PM H.J. Lu wrote: > > On Tue, Apr 19, 2022 at 4:40 PM Noah Goldstein = wrote: > > > > 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 b= y > > > > defining __wmemcmp and setting wmemcmp as a weak alias to __wmemcmp= . > > > > > > > > Both multiarch and disable-multiarch builds succeed and full xcheck= s > > > > 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;h= p=3Db80a29d4b05bd7401d16afdbeee96403480953d2;hb=3Da5659cf27d3ce6101c1632715= d18ab6321755340;hpb=3D7a06be051c01b4325927efab5b4e4280bb4a5a42 > > Can you follow wmemchr-sse2.S instead? Fixed in v2. > > > > > > > > # 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. > > > > -- > H.J.