From patchwork Thu Jun 30 03:10:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Noah Goldstein X-Patchwork-Id: 1650445 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=feREKDOl; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LYNdH65Ybz9s0r for ; Thu, 30 Jun 2022 13:10:59 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C43B53843883 for ; Thu, 30 Jun 2022 03:10:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C43B53843883 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1656558657; bh=Q4fk77oyZWIjqm5nEjoWrrIuWbIh6DKLCepp2WSZ3N0=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=feREKDOldlZd2LKOGFt6D/04z+CZY/RRvfrsTAGnIG/3T3PM+n0dkKrzc7zcTY0eD KaAC/+20U93qPxd6y7NfK7BrWBRlPaiJwRL5bPfJEzMS6CHVkUku85Psj9yOqXYY20 3/KyK4+q3rsGVuR+Pr73SIcGaDn7Q7QzEShjwmHU= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by sourceware.org (Postfix) with ESMTPS id 05755386C59A for ; Thu, 30 Jun 2022 03:10:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 05755386C59A Received: by mail-pf1-x42a.google.com with SMTP id d17so16836365pfq.9 for ; Wed, 29 Jun 2022 20:10:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Q4fk77oyZWIjqm5nEjoWrrIuWbIh6DKLCepp2WSZ3N0=; b=owbUd9QfFqNX8pljVF5rF0p5Pnp+0Pq6dJVhueE2x2lBxKLvv3aKMlbc61QRQqRV2+ YVChFZ2akIlLjEg0lOgJbqTsP3sl9xyqx4EDpZGZ9T1Hn2UUoKNcbHHWjtMHjof/vkQU 8AiTLEkNmOhf+Jx5hGH8G9qr2leJXA18lVbJEV9bB/naLVRc8MX7zpZlHuVhRPBwpdqK MZy7kETUsFVa7Px/s9yTvci6O3hO0tC5ujom6KfgV/KRJUD3KUbhq4MrLq5YAfsx52h6 oceH7l0n8/X7VkIGyE7I7WGWaEg1mntuyTxQCEBZxNAQzoFNV1Ykf/4qG2t20mtjjdR1 3XOA== X-Gm-Message-State: AJIora8VBlO+F3MS/BjfdyioZIw5M+sA/UzqdC/2NTM1wgsLiEydpZ1u zrHDHV5s7nZgQmPsLRDla6uRs/ISmRw= X-Google-Smtp-Source: AGRyM1vQfyiWiiCDQp1z6mLAjR8tlMRlMtdsq6ktVETBn4WFUbCX9rkgNNV8L6F/sC7f376FeaVvRQ== X-Received: by 2002:a63:6a49:0:b0:3fd:df6d:5ba3 with SMTP id f70-20020a636a49000000b003fddf6d5ba3mr5637089pgc.385.1656558641918; Wed, 29 Jun 2022 20:10:41 -0700 (PDT) Received: from noah-tgl.. ([2600:1010:b00a:11cb:54c6:67b8:c3a4:f835]) by smtp.gmail.com with ESMTPSA id a15-20020a17090a688f00b001eef3f30c74sm453501pjd.48.2022.06.29.20.10.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Jun 2022 20:10:41 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH v5 1/2] x86: Add comment explaining no Slow_SSE4_2 check in ifunc-sse4_2 Date: Wed, 29 Jun 2022 20:10:38 -0700 Message-Id: <20220630031039.3693951-1-goldstein.w.n@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220628152717.17838-1-goldstein.w.n@gmail.com> References: <20220628152717.17838-1-goldstein.w.n@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.9 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-Patchwork-Original-From: Noah Goldstein via Libc-alpha From: Noah Goldstein Reply-To: Noah Goldstein Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" 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..4eb9cca7f0 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. If an + optimized fallback is added add a X86_ISA_CPU_FEATURE_ARCH_P + (cpu_features, Slow_SSE4_2) check. */ if (CPU_FEATURE_USABLE_P (cpu_features, SSE4_2)) return OPTIMIZE (sse42);