From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id 592F23857702 for ; Wed, 5 Apr 2023 16:21:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 592F23857702 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x630.google.com with SMTP id o11so34922755ple.1 for ; Wed, 05 Apr 2023 09:21:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680711711; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=t/P0FINHzL1PdMEePqmXVrev/gy+15LNgqHGXEsgDtE=; b=S16Y2Lf4Fh6dke1YQ/uCF9va9BwHvOJrComKvPM2OUK2P3rayQwjJa2dfHKeDzXDpJ i6z9F2cLq9CjK7lJJj2mfHkCQV0Ms3M3xuC6Tv2wEVBRQVZzC6hpJRUgWJqMTJSs3x8U R8NygiKRuVfSg/5aHYpNCKAC8KYOFtOq8g4sLVw+362I6eZcnm9ENio2cJCmMujXfJ0w N29sIWAOwaGFX+aGFTe6UR1zSghquazvbD7nSTNV80XXiK1beXekqijVc6BLefpVQfKO WI2dKp083FAUqDDJCLNcJvVjBvlOAV8BUqnpW3Orprr1ssz9ULWT7mXig0djkoI80oe/ s/2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680711711; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=t/P0FINHzL1PdMEePqmXVrev/gy+15LNgqHGXEsgDtE=; b=t17KKCchYehTH0nVblKPLDQ1ybWkwBG+iqEzIos0hxgYQNr/XtM1BTFqSHPHBQaqSx 47A27pTz6ZyOTA6pswxR7HZCa9QR2QqawjJlf3q2yVsU1FWS0vJFy2Cg372MMKtwLPbV 2vbRUJe+I+60d5vEb39phTvaBNjiTTVIfMMrngrlYPzvpPwonDWzqYAmKk2nGo8JT0rr gxCHcekzPBL7Ka0WgH5DAhlP3yAu5lA6+jvYezh7rwm3s4b3cNZJ7YtMDeE2naiin9NJ uMwCjnxJqVHFQxN8yeC7KcCqOSVl7HKsHRAqv0xToQo52zwwjOIaqrd8LO5Gtbm/Sf4J 04IA== X-Gm-Message-State: AAQBX9dOvC81BLgs5MXoWN0ICnIHgWnf4xIEoNxowU1SC3jORf5MKb4+ HOJ8ffQhTLB0MikUC+fvS0s/k0zddcY= X-Google-Smtp-Source: AKy350Zige2Wv+t4MkfqsxXrZDFeBeF7LFy0NfZRWmYd0GaE7vM2uJoGAiivRS/TuKJoJfRoEQYi8w== X-Received: by 2002:a17:90b:4d90:b0:23d:3c7b:8684 with SMTP id oj16-20020a17090b4d9000b0023d3c7b8684mr7470203pjb.41.1680711710832; Wed, 05 Apr 2023 09:21:50 -0700 (PDT) Received: from gnu-cfl-3.localdomain ([172.59.161.240]) by smtp.gmail.com with ESMTPSA id lx7-20020a17090b4b0700b00240404fe949sm1582063pjb.40.2023.04.05.09.21.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 09:21:48 -0700 (PDT) Received: from gnu-cfl-3.. (localhost [IPv6:::1]) by gnu-cfl-3.localdomain (Postfix) with ESMTP id E3456740143 for ; Wed, 5 Apr 2023 09:21:44 -0700 (PDT) From: "H.J. Lu" To: libc-alpha@sourceware.org Subject: [PATCH 11/19] : Add ArchPerfmonExt support Date: Wed, 5 Apr 2023 09:21:36 -0700 Message-Id: <20230405162144.984598-12-hjl.tools@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230405162144.984598-1-hjl.tools@gmail.com> References: <20230405162144.984598-1-hjl.tools@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3025.6 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.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Add Architectural Performance Monitoring Extended Leaf (EAX = 23H) support to . --- manual/platform.texi | 4 ++++ sysdeps/x86/bits/platform/x86.h | 1 + sysdeps/x86/tst-get-cpu-features.c | 1 + 3 files changed, 6 insertions(+) diff --git a/manual/platform.texi b/manual/platform.texi index e4d2c00886..ecee3a7b39 100644 --- a/manual/platform.texi +++ b/manual/platform.texi @@ -206,6 +206,10 @@ The supported processor features are: @item @code{ARCH_CAPABILITIES} -- IA32_ARCH_CAPABILITIES MSR. +@item +@code{ArchPerfmonExt} -- Architectural Performance Monitoring Extended +Leaf (EAX = 23H). + @item @code{AVX} -- The AVX instruction extensions. diff --git a/sysdeps/x86/bits/platform/x86.h b/sysdeps/x86/bits/platform/x86.h index 0187964aba..74b7f951e1 100644 --- a/sysdeps/x86/bits/platform/x86.h +++ b/sysdeps/x86/bits/platform/x86.h @@ -293,6 +293,7 @@ enum x86_cpu_AVX512_BF16 = x86_cpu_index_7_ecx_1_eax + 5, x86_cpu_LASS = x86_cpu_index_7_ecx_1_eax + 6, x86_cpu_CMPCCXADD = x86_cpu_index_7_ecx_1_eax + 7, + x86_cpu_ArchPerfmonExt = x86_cpu_index_7_ecx_1_eax + 8, x86_cpu_FZLRM = x86_cpu_index_7_ecx_1_eax + 10, x86_cpu_FSRS = x86_cpu_index_7_ecx_1_eax + 11, x86_cpu_FSRCS = x86_cpu_index_7_ecx_1_eax + 12, diff --git a/sysdeps/x86/tst-get-cpu-features.c b/sysdeps/x86/tst-get-cpu-features.c index d8bc92560f..329d4aafb4 100644 --- a/sysdeps/x86/tst-get-cpu-features.c +++ b/sysdeps/x86/tst-get-cpu-features.c @@ -205,6 +205,7 @@ do_test (void) CHECK_CPU_FEATURE_PRESENT (AVX512_BF16); CHECK_CPU_FEATURE_PRESENT (LASS); CHECK_CPU_FEATURE_PRESENT (CMPCCXADD); + CHECK_CPU_FEATURE_PRESENT (ArchPerfmonExt); CHECK_CPU_FEATURE_PRESENT (FZLRM); CHECK_CPU_FEATURE_PRESENT (FSRS); CHECK_CPU_FEATURE_PRESENT (FSRCS); -- 2.39.2