From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-xe34.google.com (mail-vs1-xe34.google.com [IPv6:2607:f8b0:4864:20::e34]) by sourceware.org (Postfix) with ESMTPS id 588DE3858434; Thu, 12 May 2022 19:25:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 588DE3858434 Received: by mail-vs1-xe34.google.com with SMTP id q2so6255846vsr.5; Thu, 12 May 2022 12:25:14 -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; bh=zzDbOnqORJFg/HzViVb6x3Wm8UPZpJjqDUk5BRG/F+E=; b=tGQX9rN4/Yip9cVGnKFbAeUPt3Vfp0bPeuPpTjdVt0DkhH6k5m82J3xsWwwX3mti8t p5T4Oi+XvqInEyJ1EytHfl7k59lIbF7y+rKsRTwrl8iXsw9Tb6ZvvuLUa4MFwAPaadQK 4/8RqlphU6mr2SyaF9j810anRji7+8iFZoDPBn+otGbb1mpix/cgaIwiewDSf7SqAhbF 27YGjaUB2ow2RgfeGuyq0b0mIJbcRs9as8oR1W66zXAMSiBFOHDjGn953X1nylpkj7WZ rFjuuv5tQRyqXfNoD0FAQhbdOFTr9aZBi5GRJPmHHstMozbROQ8pPYljBmBk9ytMdY8s XwCw== X-Gm-Message-State: AOAM533sD8xoryq6CUMErivhaIgTJyaE8INp3XkvaG0cSc7M0vCYDNvM X0mLP1L2Mf+NnK5ElsQi8FzeqG1yZIkSrZgC8CY= X-Google-Smtp-Source: ABdhPJx6zt6nWj5ElV+mgr3PoEPURUEanCP9SPr+cWxbwhykFTgSX6AR1+deYILngYJBI9cqAS82sLPO4dbIlaDbupM= X-Received: by 2002:a05:6102:3f0f:b0:32a:46dd:a908 with SMTP id k15-20020a0561023f0f00b0032a46dda908mr1019250vsv.48.1652383513739; Thu, 12 May 2022 12:25:13 -0700 (PDT) MIME-Version: 1.0 References: <20220214024623.2620229-1-hjl.tools@gmail.com> In-Reply-To: From: Sunil Pandey Date: Thu, 12 May 2022 12:24:37 -0700 Message-ID: Subject: Re: [PATCH] x86-64: Define __memcmpeq in ld.so To: Noah Goldstein , Libc-stable Mailing List Cc: "H.J. Lu" , GNU C Library Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, HK_RANDOM_ENVFROM, HK_RANDOM_FROM, 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.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-stable@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-stable mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 May 2022 19:25:15 -0000 On Mon, Feb 14, 2022 at 5:20 PM Noah Goldstein via Libc-alpha wrote: > > On Mon, Feb 14, 2022 at 7:50 AM H.J. Lu wrote: > > > > On Mon, Feb 14, 2022 at 1:18 AM Noah Goldstein wrote: > > > > > > On Sun, Feb 13, 2022 at 8:46 PM H.J. Lu wrote: > > > > > > > > Define __memcmpeq in ld.so so that compiler can generate __memcmpeq call > > > > when compiling for ld.so. > > > > --- > > > > sysdeps/x86_64/multiarch/memcmpeq-sse2.S | 4 +++- > > > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/sysdeps/x86_64/multiarch/memcmpeq-sse2.S b/sysdeps/x86_64/multiarch/memcmpeq-sse2.S > > > > index b80a29d4b0..de7f5a7525 100644 > > > > --- a/sysdeps/x86_64/multiarch/memcmpeq-sse2.S > > > > +++ b/sysdeps/x86_64/multiarch/memcmpeq-sse2.S > > > > @@ -16,8 +16,10 @@ > > > > License along with the GNU C Library; if not, see > > > > . */ > > > > > > > > -#ifndef memcmp > > > > +#if IS_IN (libc) > > > > # define memcmp __memcmpeq_sse2 > > > > +#else > > > > +# define memcmp __memcmpeq > > > > #endif > > > > #define USE_AS_MEMCMPEQ 1 > > > > #include "memcmp-sse2.S" > > > > > > How can I test this patch? > > > > Please build this GCC branch: > > > > https://gitlab.com/x86-gcc/gcc/-/commits/users/hjl/memcmpeq/master > > > > and use it to build glibc with > > > > CC="gcc -fextra-libc-function=memcmpeq" > > > > It will call __memcmpeq when possible. > > LGTM. > > > > -- > > H.J. I would like to backport this patch to release branches. Any comments or objections? --Sunil