authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2022-11-25 20:09:21+01:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2022-11-28 17:07:34+01:00
loge74b6f0a4bb86d5186ccc47ffd096f2ebfb29bc1
tree09fa6f051f59937ec86d1dbc2e8ccc2657309085
parent29aafdcd5520e15d2d395d616f2aee6ed9ba4648

windows: detect couple more aarch64 CPU features


2 files changed, 13 insertions(+), 0 deletions(-)

lib/std/os/windows.zig+4
...@@ -3838,7 +3838,11 @@ pub const PF = enum(DWORD) {...@@ -3838,7 +3838,11 @@ pub const PF = enum(DWORD) {
3838 AVX512F_INSTRUCTIONS_AVAILABLE = 41,3838 AVX512F_INSTRUCTIONS_AVAILABLE = 41,
38393839
3840 ERMS_AVAILABLE = 42,3840 ERMS_AVAILABLE = 42,
3841
3842 /// This ARM processor implements the ARM v8.2 Dot Product (DP) instructions.
3841 ARM_V82_DP_INSTRUCTIONS_AVAILABLE = 43,3843 ARM_V82_DP_INSTRUCTIONS_AVAILABLE = 43,
3844
3845 /// This ARM processor implements the ARM v8.3 JavaScript conversion (JSCVT) instructions.
3842 ARM_V83_JSCVT_INSTRUCTIONS_AVAILABLE = 44,3846 ARM_V83_JSCVT_INSTRUCTIONS_AVAILABLE = 44,
3843};3847};
38443848
lib/std/zig/system/windows.zig+9
...@@ -61,6 +61,15 @@ fn detectNativeCpuAndFeaturesArm64() Target.Cpu {...@@ -61,6 +61,15 @@ fn detectNativeCpuAndFeaturesArm64() Target.Cpu {
61 if (IsProcessorFeaturePresent(PF.ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE)) {61 if (IsProcessorFeaturePresent(PF.ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE)) {
62 cpu.features.addFeature(@enumToInt(Feature.crypto));62 cpu.features.addFeature(@enumToInt(Feature.crypto));
63 }63 }
64 if (IsProcessorFeaturePresent(PF.ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE)) {
65 cpu.features.addFeature(@enumToInt(Feature.lse));
66 }
67 if (IsProcessorFeaturePresent(PF.ARM_V82_DP_INSTRUCTIONS_AVAILABLE)) {
68 cpu.features.addFeature(@enumToInt(Feature.dotprod));
69 }
70 if (IsProcessorFeaturePresent(PF.ARM_V83_JSCVT_INSTRUCTIONS_AVAILABLE)) {
71 cpu.features.addFeature(@enumToInt(Feature.jsconv));
72 }
6473
65 return cpu;74 return cpu;
66}75}