about summary refs log tree commit diff stats
path: root/src/os/hostext_wine.c
diff options
context:
space:
mode:
authorYang Liu <liuyang22@iscas.ac.cn>2025-06-16 20:05:38 +0800
committerGitHub <noreply@github.com>2025-06-16 14:05:38 +0200
commitae0c91dce0671c176321fc72bfa69f1731d4aa2e (patch)
treeb9f65e3e7c2966c74f2bb4a89ae873484bd80ba4 /src/os/hostext_wine.c
parentab6deeb319cf4389f0cfd555c8aa922300065ee6 (diff)
downloadbox64-ae0c91dce0671c176321fc72bfa69f1731d4aa2e.tar.gz
box64-ae0c91dce0671c176321fc72bfa69f1731d4aa2e.zip
[WOW64] Refactored host extention detection and added preliminary support for WowBox64 (#2752)
Diffstat (limited to 'src/os/hostext_wine.c')
-rw-r--r--src/os/hostext_wine.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/os/hostext_wine.c b/src/os/hostext_wine.c
new file mode 100644
index 00000000..3b6d5663
--- /dev/null
+++ b/src/os/hostext_wine.c
@@ -0,0 +1,20 @@
+#include <winternl.h>
+
+#include "debug.h"
+#include "wine/compiler.h"
+#include "wine/debug.h"
+
+int DetectHostCpuFeatures(void)
+{
+    cpuext.asimd = 1;
+    if (IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE))
+        cpuext.aes = cpuext.sha1 = cpuext.sha2 = cpuext.pmull = 1;
+    if (IsProcessorFeaturePresent(PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE))
+        cpuext.crc32 = 1;
+    if (IsProcessorFeaturePresent(PF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE))
+        cpuext.atomics = 1;
+
+    // TODO
+    cpuext.uscat = cpuext.flagm = cpuext.flagm2 = cpuext.frintts = cpuext.afp = cpuext.rndr = 0;
+    return 1;
+}