From patchwork Wed May 20 01:57:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 1293933 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=TB5HKko8; dkim-atps=neutral Received: from sourceware.org (server2.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 (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49RbVv5Z8jz9sTM for ; Wed, 20 May 2020 11:57:57 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 578453851C37; Wed, 20 May 2020 01:57:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 578453851C37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1589939874; bh=gKyfx8hc3e2NeoqXbzluXxd55PeZgWY1G8O6qVjnJq4=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=TB5HKko8c/3dCv1ScqkNm0wNl7ge0My/iqvKSjUbIylU5tLpI8ClIDrvYSIEcB5FI WEAjFkyFgfktyoiElIkgK9A0/wA60qOhYQLMKxkmaR0a3tLdnhieF2F/FLWwla6BeB dngWOe5dKk68O9I/1AlpblHv70DCTXQVXInkmx1o= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by sourceware.org (Postfix) with ESMTPS id C99F83851C37 for ; Wed, 20 May 2020 01:57:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C99F83851C37 Received: by mail-pl1-x644.google.com with SMTP id m7so684984plt.5 for ; Tue, 19 May 2020 18:57:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gKyfx8hc3e2NeoqXbzluXxd55PeZgWY1G8O6qVjnJq4=; b=ih1N7xYaLu45yT0SFBwccslQzzWkdp78s0kELgWZtQHSzhCsVNsiGfA6DK+Zku7Mr7 skZr9cFbHwGGVoddLo1NFapZLB0eFjkVhwb25FRyAJizfSAz1ee35emgUtsQaEUNBw+x TTt8wFdpmD7eGVausIu+iBYXECt4QTaGDyDahrjm7WykzBLjtV0qfgCUV5ietn3efrPU NLmk9zlWGoqgX2UvZwGwpeND1l/+5y9G26VDtetZ2ff3HBsGAnnHatwu2GKhGocUUKOS +vlS0MHcfTp96bMWg3rSDIBiX6D9Icle646RgTW/fyyxG55n6f4bGvIDM240O6KKz+IC W0xQ== X-Gm-Message-State: AOAM532VAL6fgnBPsZcvNUVf8ITh1hPO8RTz3TFBO0mA+L6wN9qKUuaN y40aDlvDs4BKeiWIAlBiKKOC8lP6 X-Google-Smtp-Source: ABdhPJzOuo52rCKI2yXqsn2hgdffEV8Pm0wgSb+cWeKNajVm9p4Q0cKRTunxoNzUT2F6FrOYoAyrZw== X-Received: by 2002:a17:902:103:: with SMTP id 3mr2273487plb.325.1589939870674; Tue, 19 May 2020 18:57:50 -0700 (PDT) Received: from gnu-tools-1.localdomain (c-69-181-90-243.hsd1.ca.comcast.net. [69.181.90.243]) by smtp.gmail.com with ESMTPSA id v22sm633708pfu.172.2020.05.19.18.57.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 18:57:50 -0700 (PDT) Received: from gnu-tools-1.localdomain (localhost [127.0.0.1]) by gnu-tools-1.localdomain (Postfix) with ESMTP id 1F4B01C03B7; Tue, 19 May 2020 18:57:49 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH] x86: Update VPCLMULQDQ check Date: Tue, 19 May 2020 18:57:48 -0700 Message-Id: <20200520015748.5729-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-Spam-Status: No, score=-13.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: "H.J. Lu via Gcc-patches" From: "H.J. Lu" Reply-To: "H.J. Lu" Cc: Uros Bizjak Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Update VPCLMULQDQ check to support processors with AVX version of VPCLMULQDQ. PR target/91695 * config/i386/cpuinfo.c (get_available_features): Fix VPCLMULQDQ check. --- libgcc/config/i386/cpuinfo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c index 26c1bdca361..cf5f0884bb4 100644 --- a/libgcc/config/i386/cpuinfo.c +++ b/libgcc/config/i386/cpuinfo.c @@ -346,6 +346,8 @@ get_available_features (unsigned int ecx, unsigned int edx, { if (ebx & bit_AVX2) set_feature (FEATURE_AVX2); + if (ecx & bit_VPCLMULQDQ) + set_feature (FEATURE_VPCLMULQDQ); } if (ebx & bit_BMI2) set_feature (FEATURE_BMI2); @@ -373,8 +375,6 @@ get_available_features (unsigned int ecx, unsigned int edx, set_feature (FEATURE_AVX512VBMI); if (ecx & bit_AVX512VBMI2) set_feature (FEATURE_AVX512VBMI2); - if (ecx & bit_VPCLMULQDQ) - set_feature (FEATURE_VPCLMULQDQ); if (ecx & bit_AVX512VNNI) set_feature (FEATURE_AVX512VNNI); if (ecx & bit_AVX512BITALG)