From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by sourceware.org (Postfix) with ESMTPS id 3DBB73858C74 for ; Fri, 1 Jul 2022 22:39:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3DBB73858C74 Received: by mail-pl1-x636.google.com with SMTP id x20so3618459plx.6 for ; Fri, 01 Jul 2022 15:39:00 -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=S6VE4iLZ5lWnpIEinXh4GTZHLKxwzDRSkupsIaNNZx0=; b=BoLEpALTD9P3Mj868aeHm2tw9pf3ZUU4Hipe0sTh9njdJ7PqmER0ffYwk12al0CDnK pV06qItjN7FH/QS98TPORHzoHh7uOoT58rzi/TvxnJFasUDQdAVOFv/AbmY3pRn6KnZX hLWXHZH8EpsD33MztS6Y5fhwaQxSHt/XlDGD7MxdxgINq3uq05EXpJxWo0BIKhK+FDTG xuRExJZEmcjxdLXCFfuZUOUUGTjZfy3tcnlB9xVwTUMNBel/W0rnJ9uKMPxi/m8OoQ+x vN8m8sMIYoYmB9D2LMg8xbzWLcj/xE4qya9q5cfrQwAW2R4E8yfJkP/UTAI6f0H+SPyL w1dQ== X-Gm-Message-State: AJIora9EOL4X7EQ0B+BByD8RVY4dUsM+XnwJOqT7JDpvfD8lL7W68IqL D7cH3/ws9VUO1Nxm0LWsZqwlRNQgjE8Gudne8Zk= X-Google-Smtp-Source: AGRyM1sG/FCAKV/rTzhrI2anPYCznVztnvIPvKrA6J9X/3x0INfQSKvAgrZnFawrUVl0Pq91G7fqSoou9Uxa0XAb4+8= X-Received: by 2002:a17:902:a502:b0:15e:c251:b769 with SMTP id s2-20020a170902a50200b0015ec251b769mr22358695plq.115.1656715138998; Fri, 01 Jul 2022 15:38:58 -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: "H.J. Lu" Date: Fri, 1 Jul 2022 15:38:23 -0700 Message-ID: Subject: Re: [PATCH v6 1/2] x86: Add comment explaining no Slow_SSE4_2 check in ifunc-sse4_2 To: Noah Goldstein Cc: GNU C Library , "Carlos O'Donell" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3024.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 22:39:03 -0000 On Thu, Jun 30, 2022 at 5:01 PM Noah Goldstein wrote: > > On Thu, Jun 30, 2022 at 5:01 PM Noah Goldstein wrote: > > > > 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? > other->only* No. Only the string instructions are slow. > > > > > > > if (CPU_FEATURE_USABLE_P (cpu_features, SSE4_2)) > > > > return OPTIMIZE (sse42); > > > > > > > > -- > > > > 2.34.1 > > > > > > > > > > > > > -- > > > H.J. -- H.J.