From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com [IPv6:2607:f8b0:4864:20::b2e]) by sourceware.org (Postfix) with ESMTPS id 5CD80385841F for ; Fri, 1 Jul 2022 00:01:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5CD80385841F Received: by mail-yb1-xb2e.google.com with SMTP id q132so1194416ybg.10 for ; Thu, 30 Jun 2022 17:01:20 -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=UvWflwljRVb4MBECiKHf3XwzDPyF9T/HB4envwXxGNY=; b=RT5H0yXiWOF6l4aJazKFUcKw+sdxCILiK1RCeSZT+F8rBRMkNtuSJCru79ZA1JJWj4 q40JbbFd1jQMiG2sUNo2ddeTTTmXOsuHtQZELlkOVxHdYFHx95jmUgu2/b/Xgn2Uh6h5 OxAUUJWUKRSTqxyAg5basldNhM2FBblZpS3bZkO/hvQbuw6j+5o4X9D/56gi6keObgM4 QCzR7Bnm5Pcna/qR/IeTqrTdqUIEu55x5/46P0W+8CQZd0u7qDJub+yC2aLaNPRlkNXy PEOAdLsJmZc4X3TL9L7Yn3GzMicuMDz0Cj91k2VKBZ+z2kahSFaGyNxoQR8E00Fgx6I0 c5ww== X-Gm-Message-State: AJIora/mN1LabUAzhwYiDO3drBF5yLyrbse22lz91TRq//5rfAthB2pR y2K0mN83mhAkh3Lnqv58cm9YW0nEXUvJgQAWZhQ= X-Google-Smtp-Source: AGRyM1u3V0Tqgd3TkeiWF7nVT7AZBoLp+jshN0nmd+tiL+zeO1G1PR1wOJuUZPrmSjIeHc4PYFXpVhzKMZ6yapCe7vQ= X-Received: by 2002:a25:a1a1:0:b0:668:b8e6:8012 with SMTP id a30-20020a25a1a1000000b00668b8e68012mr11933742ybi.526.1656633679643; Thu, 30 Jun 2022 17:01:19 -0700 (PDT) MIME-Version: 1.0 References: <20220628152717.17838-1-goldstein.w.n@gmail.com> <20220630201319.3777218-1-goldstein.w.n@gmail.com> In-Reply-To: From: Noah Goldstein Date: Thu, 30 Jun 2022 17:01:09 -0700 Message-ID: Subject: Re: [PATCH v6 1/2] x86: Add comment explaining no Slow_SSE4_2 check in ifunc-sse4_2 To: "H.J. Lu" Cc: GNU C Library , "Carlos O'Donell" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_NUMSUBJECT, 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-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: Fri, 01 Jul 2022 00:01:21 -0000 On Thu, Jun 30, 2022 at 4:20 PM H.J. Lu wrote: > > On Thu, Jun 30, 2022 at 1:13 PM Noah Goldstein wrote: > > > > Just for clarities sake and so that if a future implementation is > > added we remember to add the check. > > --- > > sysdeps/x86_64/multiarch/ifunc-sse4_2.h | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/sysdeps/x86_64/multiarch/ifunc-sse4_2.h b/sysdeps/x86_64/multiarch/ifunc-sse4_2.h > > index ee36525bcf..752798278c 100644 > > --- a/sysdeps/x86_64/multiarch/ifunc-sse4_2.h > > +++ b/sysdeps/x86_64/multiarch/ifunc-sse4_2.h > > @@ -27,6 +27,10 @@ IFUNC_SELECTOR (void) > > { > > const struct cpu_features* cpu_features = __get_cpu_features (); > > > > + /* This function uses slow sse4.2 instructions (pcmpstri) but since > > + there is no other optimized implementation keep using it. If an > > + optimized fallback is added add a X86_ISA_CPU_FEATURE_ARCH_P > > + (cpu_features, Slow_SSE4_2) check. */ > > This function always uses sse4.2 instructions (pcmpstri) since there > is no other optimized implementation. If an ... Is it all sse4.2 instructions that count for Slow_SSE4.2 or other the microcode string ones? > > > if (CPU_FEATURE_USABLE_P (cpu_features, SSE4_2)) > > return OPTIMIZE (sse42); > > > > -- > > 2.34.1 > > > > > -- > H.J.