about summary refs log tree commit diff stats
path: root/wow64
diff options
context:
space:
mode:
authorYang Liu <liuyang22@iscas.ac.cn>2025-04-10 20:09:23 +0800
committerGitHub <noreply@github.com>2025-04-10 14:09:23 +0200
commit0bb41a73c27df807ba8fcaa205612be7b3a1ac95 (patch)
treee789a5ff074bae6d492c6ea19f824cdecc7e3d37 /wow64
parentf9f082ee53ae0ab8e12b0c1bf1de339af8b92282 (diff)
downloadbox64-0bb41a73c27df807ba8fcaa205612be7b3a1ac95.tar.gz
box64-0bb41a73c27df807ba8fcaa205612be7b3a1ac95.zip
[WOW64] More tweaks towards PE build (#2519)
Diffstat (limited to 'wow64')
-rw-r--r--wow64/CMakeLists.txt5
-rw-r--r--wow64/wowbox64.c30
2 files changed, 34 insertions, 1 deletions
diff --git a/wow64/CMakeLists.txt b/wow64/CMakeLists.txt
index d64a2c96..729706fb 100644
--- a/wow64/CMakeLists.txt
+++ b/wow64/CMakeLists.txt
@@ -25,13 +25,16 @@ set_source_files_properties(${DYNAREC_ASM_SRC} PROPERTIES COMPILE_OPTIONS "-mcpu
 
 set(BOX64CPU_SRC
     "${BOX64_ROOT}/src/custommem.c"
+    "${BOX64_ROOT}/src/dynarec/arm64/dynarec_arm64_jmpnext.c"
+    "${BOX64_ROOT}/src/emu/x87emu_private.c"
     "${BOX64_ROOT}/src/dynarec/dynablock.c"
+    "${BOX64_ROOT}/src/dynarec/dynarec_native_functions.c"
     "${BOX64_ROOT}/src/dynarec/dynarec_native.c"
     "${BOX64_ROOT}/src/os/backtrace.c"
     "${BOX64_ROOT}/src/os/os_wine.c"
+    "${BOX64_ROOT}/src/os/symbolfuncs_wine.c"
     "${BOX64_ROOT}/src/tools/alternate.c"
     "${BOX64_ROOT}/src/tools/rbtree.c"
-    "${BOX64_ROOT}/src/libtools/threads.c"
 )
 
 add_library(wowbox64 SHARED ${MAIN_SRC} ${BOX64CPU_SRC} ${DYNAREC_ASM_SRC})
diff --git a/wow64/wowbox64.c b/wow64/wowbox64.c
index cd8b2486..0a37e41d 100644
--- a/wow64/wowbox64.c
+++ b/wow64/wowbox64.c
@@ -5,6 +5,36 @@
 
 #include "os.h"
 #include "custommem.h"
+#include "env.h"
+#include "box64context.h"
+
+uintptr_t box64_pagesize = 4096;
+
+int box64_is32bits = 0;
+int box64_wine = 0; // this is for the emulated x86 Wine.
+
+box64env_t box64env = { 0 }; // FIXME: add real env support.
+
+box64env_t* GetCurEnvByAddr(uintptr_t addr) {
+    return &box64env;
+}
+
+int arm64_asimd = 0;
+int arm64_aes = 0;
+int arm64_pmull = 0;
+int arm64_crc32 = 0;
+int arm64_atomics = 0;
+int arm64_sha1 = 0;
+int arm64_sha2 = 0;
+int arm64_uscat = 0;
+int arm64_flagm = 0;
+int arm64_flagm2 = 0;
+int arm64_frintts = 0;
+int arm64_afp = 0;
+int arm64_rndr = 0;
+
+static box64context_t box64_context;
+box64context_t *my_context = &box64_context;
 
 void WINAPI BTCpuFlushInstructionCache2(LPCVOID addr, SIZE_T size)
 {