aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2022-11-25 20:09:21 +0100
committerJakub Konka <kubkon@jakubkonka.com>2022-11-28 17:07:34 +0100
commite74b6f0a4bb86d5186ccc47ffd096f2ebfb29bc1 (patch)
tree09fa6f051f59937ec86d1dbc2e8ccc2657309085 /lib
parent29aafdcd5520e15d2d395d616f2aee6ed9ba4648 (diff)
downloadzig-e74b6f0a4bb86d5186ccc47ffd096f2ebfb29bc1.tar.gz
zig-e74b6f0a4bb86d5186ccc47ffd096f2ebfb29bc1.zip
windows: detect couple more aarch64 CPU features
Diffstat (limited to 'lib')
-rw-r--r--lib/std/os/windows.zig4
-rw-r--r--lib/std/zig/system/windows.zig9
2 files changed, 13 insertions, 0 deletions
diff --git a/lib/std/os/windows.zig b/lib/std/os/windows.zig
index 5308a6fae2..b6d61e324e 100644
--- a/lib/std/os/windows.zig
+++ b/lib/std/os/windows.zig
@@ -3838,7 +3838,11 @@ pub const PF = enum(DWORD) {
AVX512F_INSTRUCTIONS_AVAILABLE = 41,
ERMS_AVAILABLE = 42,
+
+ /// This ARM processor implements the ARM v8.2 Dot Product (DP) instructions.
ARM_V82_DP_INSTRUCTIONS_AVAILABLE = 43,
+
+ /// This ARM processor implements the ARM v8.3 JavaScript conversion (JSCVT) instructions.
ARM_V83_JSCVT_INSTRUCTIONS_AVAILABLE = 44,
};
diff --git a/lib/std/zig/system/windows.zig b/lib/std/zig/system/windows.zig
index eb62068120..569daf0a30 100644
--- a/lib/std/zig/system/windows.zig
+++ b/lib/std/zig/system/windows.zig
@@ -61,6 +61,15 @@ fn detectNativeCpuAndFeaturesArm64() Target.Cpu {
if (IsProcessorFeaturePresent(PF.ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE)) {
cpu.features.addFeature(@enumToInt(Feature.crypto));
}
+ if (IsProcessorFeaturePresent(PF.ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE)) {
+ cpu.features.addFeature(@enumToInt(Feature.lse));
+ }
+ if (IsProcessorFeaturePresent(PF.ARM_V82_DP_INSTRUCTIONS_AVAILABLE)) {
+ cpu.features.addFeature(@enumToInt(Feature.dotprod));
+ }
+ if (IsProcessorFeaturePresent(PF.ARM_V83_JSCVT_INSTRUCTIONS_AVAILABLE)) {
+ cpu.features.addFeature(@enumToInt(Feature.jsconv));
+ }
return cpu;
}