Skip to content

Commit 104602c

Browse files
authored
Update AArch64 features to Linux 6.6. (#347)
1 parent 8cfb520 commit 104602c

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

include/cpuinfo_aarch64.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@ typedef struct {
190190
int smebi32i32 : 1; // 1-bit binary to 32-bit integer outer product.
191191
int smeb16b16 : 1; // SME2.1 BFloat16 instructions.
192192
int smef16f16 : 1; // FP16 to FP16 outer product.
193+
int mops : 1; // Standardized memory operations.
194+
int hbc : 1; // Hinted conditional branches.
193195

194196
// Make sure to update Aarch64FeaturesEnum below if you add a field here.
195197
} Aarch64Features;
@@ -284,6 +286,8 @@ typedef enum {
284286
AARCH64_SME_BI32I32,
285287
AARCH64_SME_B16B16,
286288
AARCH64_SME_F16F16,
289+
AARCH64_MOPS,
290+
AARCH64_HBC,
287291
AARCH64_LAST_,
288292
} Aarch64FeaturesEnum;
289293

include/internal/hwcaps.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ CPU_FEATURES_START_CPP_NAMESPACE
104104
#define AARCH64_HWCAP2_SME_BI32I32 (1UL << 40)
105105
#define AARCH64_HWCAP2_SME_B16B16 (1UL << 41)
106106
#define AARCH64_HWCAP2_SME_F16F16 (1UL << 42)
107+
#define AARCH64_HWCAP2_MOPS (1UL << 43)
108+
#define AARCH64_HWCAP2_HBC (1UL << 44)
107109

108110
// http://elixir.free-electrons.com/linux/latest/source/arch/arm/include/uapi/asm/hwcap.h
109111
#define ARM_HWCAP_SWP (1UL << 0)

src/impl_aarch64__base_implementation.inl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,10 @@
112112
AARCH64_HWCAP2_SME_BI32I32) \
113113
LINE(AARCH64_SME_B16B16, smeb16b16, "smeb16b16", 0, \
114114
AARCH64_HWCAP2_SME_B16B16) \
115-
LINE(AARCH64_SME_F16F16, smef16f16, "smef16f16", 0, AARCH64_HWCAP2_SME_F16F16)
115+
LINE(AARCH64_SME_F16F16, smef16f16, "smef16f16", 0, \
116+
AARCH64_HWCAP2_SME_F16F16) \
117+
LINE(AARCH64_MOPS, mops, "mops", 0, AARCH64_HWCAP2_MOPS) \
118+
LINE(AARCH64_HBC, hbc, "hbc", 0, AARCH64_HWCAP2_HBC)
116119
#define INTROSPECTION_PREFIX Aarch64
117120
#define INTROSPECTION_ENUM_PREFIX AARCH64
118121
#include "define_introspection_and_hwcaps.inl"

test/cpuinfo_aarch64_test.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,8 @@ CPU revision : 3)");
310310
EXPECT_FALSE(info.features.smebi32i32);
311311
EXPECT_FALSE(info.features.smeb16b16);
312312
EXPECT_FALSE(info.features.smef16f16);
313+
EXPECT_FALSE(info.features.mops);
314+
EXPECT_FALSE(info.features.hbc);
313315
}
314316
#elif defined(CPU_FEATURES_OS_MACOS)
315317
TEST_F(CpuidAarch64Test, FromDarwinSysctlFromName) {

0 commit comments

Comments
 (0)