about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorYang Liu <liuyang22@iscas.ac.cn>2025-06-11 19:44:41 +0800
committerGitHub <noreply@github.com>2025-06-11 13:44:41 +0200
commit44669935dae4ca780417c877981c3ca9390758c9 (patch)
treed214a239357542deb64df927507df0788aae3533 /src
parente2f22310f4fe4d863872fadc8df656a27c4360ba (diff)
downloadbox64-44669935dae4ca780417c877981c3ca9390758c9.tar.gz
box64-44669935dae4ca780417c877981c3ca9390758c9.zip
[WOW64] Small improvement to grab_segdata (#2728)
Diffstat (limited to 'src')
-rw-r--r--src/dynarec/arm64/dynarec_arm64_helper.c4
-rw-r--r--src/os/os_wine.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/dynarec/arm64/dynarec_arm64_helper.c b/src/dynarec/arm64/dynarec_arm64_helper.c
index 9a5dab3c..852d2318 100644
--- a/src/dynarec/arm64/dynarec_arm64_helper.c
+++ b/src/dynarec/arm64/dynarec_arm64_helper.c
@@ -909,6 +909,9 @@ void grab_segdata(dynarec_arm_t* dyn, uintptr_t addr, int ninst, int reg, int se
     MESSAGE(LOG_DUMP, "Get %s Offset\n", (segment==_FS)?"FS":"GS");
     int t2 = x4;
     if(reg==t2) ++t2;
+    #ifdef _WIN32
+    LDRx_U12(reg, xEmu, offsetof(x64emu_t, segs_offs[segment]));
+    #else
     LDRw_U12(t2, xEmu, offsetof(x64emu_t, segs_serial[segment]));
     /*if(segment==_GS) {
         LDRx_U12(reg, xEmu, offsetof(x64emu_t, segs_offs[segment]));
@@ -923,6 +926,7 @@ void grab_segdata(dynarec_arm_t* dyn, uintptr_t addr, int ninst, int reg, int se
     MOVZw(x1, segment);
     call_c(dyn, ninst, GetSegmentBaseEmu, t2, reg, 1, 0);
     MARKSEG;
+    #endif
     MESSAGE(LOG_DUMP, "----%s Offset\n", (segment==_FS)?"FS":"GS");
 }
 
diff --git a/src/os/os_wine.c b/src/os/os_wine.c
index f2dd64c1..28e8ada3 100644
--- a/src/os/os_wine.c
+++ b/src/os/os_wine.c
@@ -36,7 +36,7 @@ void* GetSeg43Base()
 
 void* GetSegmentBase(uint32_t desc)
 {
-    printf_log(LOG_NONE, "GetSegmentBase NYI\n");
+    printf_log(LOG_NONE, "GetSegmentBase does not apply to Wine dlls\n");
     return NULL;
 }