From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb32.google.com (mail-yb1-xb32.google.com [IPv6:2607:f8b0:4864:20::b32]) by sourceware.org (Postfix) with ESMTPS id 03B9A3858436 for ; Fri, 1 Jul 2022 00:01:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 03B9A3858436 Received: by mail-yb1-xb32.google.com with SMTP id v38so1260376ybi.3 for ; Thu, 30 Jun 2022 17:01:40 -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=4tGLy8pgBKbuY4i/cvcNx+hzJ6jvqB17iQpN2SYPDBg=; b=xb1ZDRwDWag95hX262UUrU2+jHyXyqwvPiO9jQ8OORafcGrI5FMVMyWWIMR4++DhMg pNwS1Vc+Ny0xrsz6P8X3XX5XaWk5TbFdIiUtmF3oSqUU6sn9AoPbBnkWfTA1OBaezk3B jk2H96U4DTiUKHI6rymUiHHbdovhiaWuOoYl6+oH5iNv0nutyhPSniN5VIIYvxsSrhpe 50FvUwI9nePuxHX+T67/IowGXDyiOOH3rwsEzN8xvJXwj23liYaorNmNV63rmVXKOSdW idQla1AHA4dbk3EFQx6UnYoOFJnV8oY5FvT7Hv6KZNjdqSfDvjmFIW6f7IqkQmbG6AcP Loog== X-Gm-Message-State: AJIora+SIOqQBMRjf2XLA1JGtjOZoYIa2N2a/ea+Fil50wONfMp5ooZ4 0WZa+18gZZhy6IqCmcXzdWTO/naDKxVhT36Jaup4ZY0JXHI= X-Google-Smtp-Source: AGRyM1uP0Y4XsgIKFYZ8OvJZkONagaF+3ZX7b09yIoRg7a2SD8L8q0Bc/l9rNy9J/XXTeIECmxbYjhJHFmmzTZChAYU= X-Received: by 2002:a25:b806:0:b0:663:d35d:8b8a with SMTP id v6-20020a25b806000000b00663d35d8b8amr12516831ybj.69.1656633700316; Thu, 30 Jun 2022 17:01:40 -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:29 -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.4 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:42 -0000 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* > > > > > if (CPU_FEATURE_USABLE_P (cpu_features, SSE4_2)) > > > return OPTIMIZE (sse42); > > > > > > -- > > > 2.34.1 > > > > > > > > > -- > > H.J.