From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) by sourceware.org (Postfix) with ESMTPS id 16CC03858D3C for ; Tue, 19 Apr 2022 23:40:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 16CC03858D3C Received: by mail-yb1-xb2f.google.com with SMTP id x200so33811643ybe.13 for ; Tue, 19 Apr 2022 16:40:11 -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=dlSno6zWu0iMQVju4WmSRbcRGy6XaOt8wyc0+bjDyAs=; b=1nCzdJ7KMlkWtWwbEQ28NH/GYcS/M/bvLJPILGOybMkpm3MgbezaXwNUcgjavfi3IP eL03Mg0TzmPNMA0wAEW50K7RRei/lVgthSCKPBrUtydpwM4mz9UZx3e7d9W7+swsJHHq FjOJ5/T7DVh0PnR8pKY9V4ypSIYi5v8v7jCfCPV/JFvH+U/0QAzBleIVYtzJifeAKHUj eWIgRYOcckrq6JnbQSD0ult9FBCuD0TH77jCyz0QCjqFYmksznRCDUvmazjmagaBU7LF /rlFU8WgM/y8vxRQP+RJpo/CO/3ZOspCLBOZUeygiAH0V3VH8oyaHH3EukFz6Ps8wDeL pklg== X-Gm-Message-State: AOAM531FqPtygCUrpRmCEd7CDsREgAXOPAyTU3OCllkn8QF5zG5eLxgx ooskPqgkhLwOSbBd83XR4Wbt0AvUjlb5ZjIDRx2g21jEuds= X-Google-Smtp-Source: ABdhPJzATmQNz1esvQ24x3EAwKCKAER4Ef1IAMHKVWWKFG0+oEF9LEZbQGVAZj+IBl+W4ugNpR5liwTtBc3lWxTrhQM= X-Received: by 2002:a25:35d5:0:b0:632:c30d:cc0f with SMTP id c204-20020a2535d5000000b00632c30dcc0fmr18101428yba.43.1650411610468; Tue, 19 Apr 2022 16:40:10 -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:39:59 -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:40:12 -0000 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/m= ultiarch/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/m= ultiarch/memcmpeq-sse2.S;h=3Dde7f5a7525ab41ea42ea581c6981ced63f8be976;hp=3D= b80a29d4b05bd7401d16afdbeee96403480953d2;hb=3Da5659cf27d3ce6101c1632715d18a= b6321755340;hpb=3D7a06be051c01b4325927efab5b4e4280bb4a5a42 > > > # 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.