Skip to content

Commit d4712c8

Browse files
authored
Update AArch64 features to Linux 6.10.6 (#359)
1 parent 947192f commit d4712c8

File tree

4 files changed

+102
-1
lines changed

4 files changed

+102
-1
lines changed

include/cpuinfo_aarch64.h

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,31 @@ typedef struct {
192192
int smef16f16 : 1; // FP16 to FP16 outer product.
193193
int mops : 1; // Standardized memory operations.
194194
int hbc : 1; // Hinted conditional branches.
195+
int sveb16b16 : 1; // Non-widening BFloat16 to BFloat16 arithmetic for SVE2
196+
// and SME2.
197+
int lrcpc3 : 1; // Load-Acquire RCpc instructions version 3.
198+
int lse128 : 1; // 128-bit Atomics.
199+
int fpmr : 1; // Floating-point Mode Register.
200+
int lut : 1; // Lookup table instructions with 2-bit and 4-bit indices.
201+
int faminmax : 1; // Maximum and minimum absolute value instructions.
202+
int f8cvt : 1; // FP scaling instructions and FP8 convert instructions.
203+
int f8fma : 1; // FP8 to single-precision and half-precision
204+
// multiply-accumulate instructions.
205+
int f8dp4 : 1; // FP8 to single-precision 4-way dot product FDOT (4-way)
206+
// instructions.
207+
int f8dp2 : 1; // FP8 to half-precision 2-way dot product FDOT (2-way)
208+
// instructions.
209+
int f8e4m3 : 1; // Arm FP8 E4M3 format.
210+
int f8e5m2 : 1; // Arm FP8 E5M2 format.
211+
int smelutv2 : 1; // SME2 lookup table LUTI4 and MOVT instructions.
212+
int smef8f16 : 1; // SME2 F8F16 instructions.
213+
int smef8f32 : 1; // SME2 F8F32 instructions.
214+
int smesf8fma : 1; // SVE2 FP8 to single-precision and half-precision
215+
// multiply-accumulate instructions.
216+
int smesf8dp4 : 1; // SVE2 FP8 to single-precision 4-way dot product FDOT
217+
// (4-way) instructions.
218+
int smesf8dp2 : 1; // SVE2 FP8 to half-precision 2-way dot product FDOT
219+
// (2-way) instructions.
195220

196221
// Make sure to update Aarch64FeaturesEnum below if you add a field here.
197222
} Aarch64Features;
@@ -288,6 +313,24 @@ typedef enum {
288313
AARCH64_SME_F16F16,
289314
AARCH64_MOPS,
290315
AARCH64_HBC,
316+
AARCH64_SVE_B16B16,
317+
AARCH64_LRCPC3,
318+
AARCH64_LSE128,
319+
AARCH64_FPMR,
320+
AARCH64_LUT,
321+
AARCH64_FAMINMAX,
322+
AARCH64_F8CVT,
323+
AARCH64_F8FMA,
324+
AARCH64_F8DP4,
325+
AARCH64_F8DP2,
326+
AARCH64_F8E4M3,
327+
AARCH64_F8E5M2,
328+
AARCH64_SME_LUTV2,
329+
AARCH64_SME_F8F16,
330+
AARCH64_SME_F8F32,
331+
AARCH64_SME_SF8FMA,
332+
AARCH64_SME_SF8DP4,
333+
AARCH64_SME_SF8DP2,
291334
AARCH64_LAST_,
292335
} Aarch64FeaturesEnum;
293336

include/internal/hwcaps.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,24 @@ CPU_FEATURES_START_CPP_NAMESPACE
106106
#define AARCH64_HWCAP2_SME_F16F16 (1UL << 42)
107107
#define AARCH64_HWCAP2_MOPS (1UL << 43)
108108
#define AARCH64_HWCAP2_HBC (1UL << 44)
109+
#define AARCH64_HWCAP2_SVE_B16B16 (1UL << 45)
110+
#define AARCH64_HWCAP2_LRCPC3 (1UL << 46)
111+
#define AARCH64_HWCAP2_LSE128 (1UL << 47)
112+
#define AARCH64_HWCAP2_FPMR (1UL << 48)
113+
#define AARCH64_HWCAP2_LUT (1UL << 49)
114+
#define AARCH64_HWCAP2_FAMINMAX (1UL << 50)
115+
#define AARCH64_HWCAP2_F8CVT (1UL << 51)
116+
#define AARCH64_HWCAP2_F8FMA (1UL << 52)
117+
#define AARCH64_HWCAP2_F8DP4 (1UL << 53)
118+
#define AARCH64_HWCAP2_F8DP2 (1UL << 54)
119+
#define AARCH64_HWCAP2_F8E4M3 (1UL << 55)
120+
#define AARCH64_HWCAP2_F8E5M2 (1UL << 56)
121+
#define AARCH64_HWCAP2_SME_LUTV2 (1UL << 57)
122+
#define AARCH64_HWCAP2_SME_F8F16 (1UL << 58)
123+
#define AARCH64_HWCAP2_SME_F8F32 (1UL << 59)
124+
#define AARCH64_HWCAP2_SME_SF8FMA (1UL << 60)
125+
#define AARCH64_HWCAP2_SME_SF8DP4 (1UL << 61)
126+
#define AARCH64_HWCAP2_SME_SF8DP2 (1UL << 62)
109127

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

src/impl_aarch64__base_implementation.inl

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,29 @@
115115
LINE(AARCH64_SME_F16F16, smef16f16, "smef16f16", 0, \
116116
AARCH64_HWCAP2_SME_F16F16) \
117117
LINE(AARCH64_MOPS, mops, "mops", 0, AARCH64_HWCAP2_MOPS) \
118-
LINE(AARCH64_HBC, hbc, "hbc", 0, AARCH64_HWCAP2_HBC)
118+
LINE(AARCH64_HBC, hbc, "hbc", 0, AARCH64_HWCAP2_HBC) \
119+
LINE(AARCH64_SVE_B16B16, sveb16b16, "sveb16b16", 0, \
120+
AARCH64_HWCAP2_SVE_B16B16) \
121+
LINE(AARCH64_LRCPC3, lrcpc3, "lrcpc3", 0, AARCH64_HWCAP2_LRCPC3) \
122+
LINE(AARCH64_LSE128, lse128, "lse128", 0, AARCH64_HWCAP2_LSE128) \
123+
LINE(AARCH64_FPMR, fpmr, "fpmr", 0, AARCH64_HWCAP2_FPMR) \
124+
LINE(AARCH64_LUT, lut, "lut", 0, AARCH64_HWCAP2_LUT) \
125+
LINE(AARCH64_FAMINMAX, faminmax, "faminmax", 0, AARCH64_HWCAP2_FAMINMAX) \
126+
LINE(AARCH64_F8CVT, f8cvt, "f8cvt", 0, AARCH64_HWCAP2_F8CVT) \
127+
LINE(AARCH64_F8FMA, f8fma, "f8fma", 0, AARCH64_HWCAP2_F8FMA) \
128+
LINE(AARCH64_F8DP4, f8dp4, "f8dp4", 0, AARCH64_HWCAP2_F8DP4) \
129+
LINE(AARCH64_F8DP2, f8dp2, "f8dp2", 0, AARCH64_HWCAP2_F8DP2) \
130+
LINE(AARCH64_F8E4M3, f8e4m3, "f8e4m3", 0, AARCH64_HWCAP2_F8E4M3) \
131+
LINE(AARCH64_F8E5M2, f8e5m2, "f8e5m2", 0, AARCH64_HWCAP2_F8E5M2) \
132+
LINE(AARCH64_SME_LUTV2, smelutv2, "smelutv1", 0, AARCH64_HWCAP2_SME_LUTV2) \
133+
LINE(AARCH64_SME_F8F16, smef8f16, "smef8f16", 0, AARCH64_HWCAP2_SME_F8F16) \
134+
LINE(AARCH64_SME_F8F32, smef8f32, "smef8f32", 0, AARCH64_HWCAP2_SME_F8F32) \
135+
LINE(AARCH64_SME_SF8FMA, smesf8fma, "smesf8fma", 0, \
136+
AARCH64_HWCAP2_SME_SF8FMA) \
137+
LINE(AARCH64_SME_SF8DP4, smesf8dp4, "smesf8dp4", 0, \
138+
AARCH64_HWCAP2_SME_SF8DP4) \
139+
LINE(AARCH64_SME_SF8DP2, smesf8dp2, "smesf8dp2", 0, AARCH64_HWCAP2_SME_SF8DP2)
140+
119141
#define INTROSPECTION_PREFIX Aarch64
120142
#define INTROSPECTION_ENUM_PREFIX AARCH64
121143
#include "define_introspection_and_hwcaps.inl"

test/cpuinfo_aarch64_test.cc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,24 @@ CPU revision : 3)");
312312
EXPECT_FALSE(info.features.smef16f16);
313313
EXPECT_FALSE(info.features.mops);
314314
EXPECT_FALSE(info.features.hbc);
315+
EXPECT_FALSE(info.features.sveb16b16);
316+
EXPECT_FALSE(info.features.lrcpc3);
317+
EXPECT_FALSE(info.features.lse128);
318+
EXPECT_FALSE(info.features.fpmr);
319+
EXPECT_FALSE(info.features.lut);
320+
EXPECT_FALSE(info.features.faminmax);
321+
EXPECT_FALSE(info.features.f8cvt);
322+
EXPECT_FALSE(info.features.f8fma);
323+
EXPECT_FALSE(info.features.f8dp4);
324+
EXPECT_FALSE(info.features.f8dp2);
325+
EXPECT_FALSE(info.features.f8e4m3);
326+
EXPECT_FALSE(info.features.f8e5m2);
327+
EXPECT_FALSE(info.features.smelutv2);
328+
EXPECT_FALSE(info.features.smef8f16);
329+
EXPECT_FALSE(info.features.smef8f32);
330+
EXPECT_FALSE(info.features.smesf8fma);
331+
EXPECT_FALSE(info.features.smesf8dp4);
332+
EXPECT_FALSE(info.features.smesf8dp2);
315333
}
316334
#elif defined(CPU_FEATURES_OS_MACOS)
317335
TEST_F(CpuidAarch64Test, FromDarwinSysctlFromName) {

0 commit comments

Comments
 (0)