diff options
| author | Yang Liu <liuyang22@iscas.ac.cn> | 2023-12-28 03:07:42 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-27 20:07:42 +0100 |
| commit | c801f2d4a52310e36f297f1cc5ee4e1b9fa4c765 (patch) | |
| tree | 0f4572f024bba26162a74ffd7e520aef9a1471d0 | |
| parent | ae84f02bd02a5ff715d6388e8d231cda23dc0f34 (diff) | |
| download | box64-c801f2d4a52310e36f297f1cc5ee4e1b9fa4c765.tar.gz box64-c801f2d4a52310e36f297f1cc5ee4e1b9fa4c765.zip | |
[RCFILE] Disable CALL/RET optimization for zoom (#1170) (#1174)
* [WRAPPER] Added 1 more wrapped libc functions * [RCFILE] Disable CALL/RET optimization for zoom (#1170) * Do not delete BOX64_DYNAREC_CALLRET=1 in case we make it not default again
| -rw-r--r-- | src/wrapped/generated/functions_list.txt | 1 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.c | 3 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.h | 1 | ||||
| -rw-r--r-- | src/wrapped/wrappedlibc_private.h | 2 | ||||
| -rw-r--r-- | system/box64.box64rc | 5 |
5 files changed, 10 insertions, 2 deletions
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index 44fc6569..f8a5b667 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -2060,6 +2060,7 @@ #() iFppppiu #() iFppppip #() iFppppup +#() iFppppLp #() iFpppppi #() iFpppppL #() iFpppppp diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c index 15f0323d..96bb1b97 100644 --- a/src/wrapped/generated/wrapper.c +++ b/src/wrapped/generated/wrapper.c @@ -2098,6 +2098,7 @@ typedef int32_t (*iFppppii_t)(void*, void*, void*, void*, int32_t, int32_t); typedef int32_t (*iFppppiu_t)(void*, void*, void*, void*, int32_t, uint32_t); typedef int32_t (*iFppppip_t)(void*, void*, void*, void*, int32_t, void*); typedef int32_t (*iFppppup_t)(void*, void*, void*, void*, uint32_t, void*); +typedef int32_t (*iFppppLp_t)(void*, void*, void*, void*, uintptr_t, void*); typedef int32_t (*iFpppppi_t)(void*, void*, void*, void*, void*, int32_t); typedef int32_t (*iFpppppL_t)(void*, void*, void*, void*, void*, uintptr_t); typedef int32_t (*iFpppppp_t)(void*, void*, void*, void*, void*, void*); @@ -5130,6 +5131,7 @@ void iFppppii(x64emu_t *emu, uintptr_t fcn) { iFppppii_t fn = (iFppppii_t)fcn; R void iFppppiu(x64emu_t *emu, uintptr_t fcn) { iFppppiu_t fn = (iFppppiu_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (int32_t)R_R8, (uint32_t)R_R9); } void iFppppip(x64emu_t *emu, uintptr_t fcn) { iFppppip_t fn = (iFppppip_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (int32_t)R_R8, (void*)R_R9); } void iFppppup(x64emu_t *emu, uintptr_t fcn) { iFppppup_t fn = (iFppppup_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (uint32_t)R_R8, (void*)R_R9); } +void iFppppLp(x64emu_t *emu, uintptr_t fcn) { iFppppLp_t fn = (iFppppLp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (uintptr_t)R_R8, (void*)R_R9); } void iFpppppi(x64emu_t *emu, uintptr_t fcn) { iFpppppi_t fn = (iFpppppi_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (int32_t)R_R9); } void iFpppppL(x64emu_t *emu, uintptr_t fcn) { iFpppppL_t fn = (iFpppppL_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (uintptr_t)R_R9); } void iFpppppp(x64emu_t *emu, uintptr_t fcn) { iFpppppp_t fn = (iFpppppp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); } @@ -7798,6 +7800,7 @@ int isSimpleWrapper(wrapper_t fun) { if (fun == &iFppppiu) return 1; if (fun == &iFppppip) return 1; if (fun == &iFppppup) return 1; + if (fun == &iFppppLp) return 1; if (fun == &iFpppppi) return 1; if (fun == &iFpppppL) return 1; if (fun == &iFpppppp) return 1; diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h index 4cdda947..b081130f 100644 --- a/src/wrapped/generated/wrapper.h +++ b/src/wrapped/generated/wrapper.h @@ -2098,6 +2098,7 @@ void iFppppii(x64emu_t *emu, uintptr_t fnc); void iFppppiu(x64emu_t *emu, uintptr_t fnc); void iFppppip(x64emu_t *emu, uintptr_t fnc); void iFppppup(x64emu_t *emu, uintptr_t fnc); +void iFppppLp(x64emu_t *emu, uintptr_t fnc); void iFpppppi(x64emu_t *emu, uintptr_t fnc); void iFpppppL(x64emu_t *emu, uintptr_t fnc); void iFpppppp(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped/wrappedlibc_private.h b/src/wrapped/wrappedlibc_private.h index edef2478..c621688f 100644 --- a/src/wrapped/wrappedlibc_private.h +++ b/src/wrapped/wrappedlibc_private.h @@ -613,7 +613,7 @@ GOW(getrusage, iFip) //GO(__gets_chk, GO(getsecretkey, iFppp) GO(getservbyname, pFpp) -//GO(getservbyname_r, iFpp!pL!) +GO(getservbyname_r, iFppppLp) GO(getservbyport, pFip) GO(getservbyport_r, iFipppLp) GO(getservent, pFv) diff --git a/system/box64.box64rc b/system/box64.box64rc index bc5977a3..153e71e8 100644 --- a/system/box64.box64rc +++ b/system/box64.box64rc @@ -203,4 +203,7 @@ BOX64_DYNAREC_STRONGMEM=1 [FL64.exe] BOX64_DYNAREC_STRONGMEM=1 BOX64_DYNAREC_SAFEFLAGS=2 -BOX64_DYNAREC_CALLRET=0 # to prevent segfaulting and if people enabling it default +BOX64_DYNAREC_CALLRET=0 # prevent segfaulting + +[zoom] +BOX64_DYNAREC_CALLRET=0 # prevent segfaulting |