diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-09-13 11:08:40 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-09-13 11:08:40 +0200 |
| commit | 89a49db5585832529a3cbe1f615330e1c51f4897 (patch) | |
| tree | 6cae0bf85d30d468be8034f7501094a95164448d /src | |
| parent | 1ee51a54de1b34d8ce1038c2eabb79f47e566e34 (diff) | |
| download | box64-89a49db5585832529a3cbe1f615330e1c51f4897.tar.gz box64-89a49db5585832529a3cbe1f615330e1c51f4897.zip | |
[BOX32] Adjusted some 32bits wrapped functions
Diffstat (limited to 'src')
| -rw-r--r-- | src/wrapped32/generated/functions_list.txt | 12 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrappedlibctypes32.h | 6 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrapper32.c | 10 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrapper32.h | 6 | ||||
| -rwxr-xr-x | src/wrapped32/wrappedlibc_private.h | 12 |
5 files changed, 23 insertions, 23 deletions
diff --git a/src/wrapped32/generated/functions_list.txt b/src/wrapped32/generated/functions_list.txt index fdb450c0..21b09142 100644 --- a/src/wrapped32/generated/functions_list.txt +++ b/src/wrapped32/generated/functions_list.txt @@ -234,7 +234,9 @@ #() vFEpLLp -> vFEpLLp #() iFEiiip -> iFEiiip #() iFEipii -> iFEipii +#() iFEpipp -> iFEpipp #() iFEpupV -> iFEpupV +#() iFEpLpp -> iFEpLpp #() iFEpLpV -> iFEpLpV #() iFEppiV -> iFEppiV #() iFEpppi -> iFEpppi @@ -252,8 +254,6 @@ #() iFippprLL_ -> iFipppB #() LFLbp_bL_Bp_BL_ -> LFLBBBB #() LFpLpriiiiiiiiilt_a -> LFpLpBa -#() iFEpippp -> iFEpippp -#() iFEpuppp -> iFEpuppp #() iFEpLppp -> iFEpLppp #() lFipLipu -> lFipLipu #() lFipLipp -> lFipLipp @@ -280,7 +280,7 @@ #() iFESvpp -> iFESpp #() iFESvpV -> iFESpV #() iFEpvvpV -> iFEppV -#() iFEpuvvppp -> iFEpuppp +#() iFEpLvvpp -> iFEpLpp wrappedcrashhandler: wrappedldlinux: - pFv: @@ -388,7 +388,9 @@ wrappedlibc: - iFiiip: - iFipii: - iFLLLL: +- iFpipp: - iFpupV: +- iFpLpp: - iFpLpV: - iFppiV: - iFpppp: @@ -397,15 +399,13 @@ wrappedlibc: - iFSvpV: - LFppiv: - iFpvvpV: -- iFpippp: -- iFpuppp: - iFpLppp: - pFpLLiN: +- iFpLvvpp: - iFpLiipV: - pFpLiiii: - pFpLiiiI: - iFpippppp: -- iFpuvvppp: wrappedlibdl: - iFp: - dlclose diff --git a/src/wrapped32/generated/wrappedlibctypes32.h b/src/wrapped32/generated/wrappedlibctypes32.h index cd100f40..1301852f 100644 --- a/src/wrapped32/generated/wrappedlibctypes32.h +++ b/src/wrapped32/generated/wrappedlibctypes32.h @@ -71,7 +71,9 @@ typedef int32_t (*iFivpV_t)(int32_t, void, void*, ...); typedef int32_t (*iFiiip_t)(int32_t, int32_t, int32_t, void*); typedef int32_t (*iFipii_t)(int32_t, void*, int32_t, int32_t); typedef int32_t (*iFLLLL_t)(uintptr_t, uintptr_t, uintptr_t, uintptr_t); +typedef int32_t (*iFpipp_t)(void*, int32_t, void*, void*); typedef int32_t (*iFpupV_t)(void*, uint32_t, void*, ...); +typedef int32_t (*iFpLpp_t)(void*, uintptr_t, void*, void*); typedef int32_t (*iFpLpV_t)(void*, uintptr_t, void*, ...); typedef int32_t (*iFppiV_t)(void*, void*, int32_t, ...); typedef int32_t (*iFpppp_t)(void*, void*, void*, void*); @@ -79,15 +81,13 @@ typedef int32_t (*iFSvpp_t)(void*, void, void*, void*); typedef int32_t (*iFSvpV_t)(void*, void, void*, ...); typedef uintptr_t (*LFppiv_t)(void*, void*, int32_t, void); typedef int32_t (*iFpvvpV_t)(void*, void, void, void*, ...); -typedef int32_t (*iFpippp_t)(void*, int32_t, void*, void*, void*); -typedef int32_t (*iFpuppp_t)(void*, uint32_t, void*, void*, void*); typedef int32_t (*iFpLppp_t)(void*, uintptr_t, void*, void*, void*); typedef void* (*pFpLLiN_t)(void*, uintptr_t, uintptr_t, int32_t, ...); +typedef int32_t (*iFpLvvpp_t)(void*, uintptr_t, void, void, void*, void*); typedef int32_t (*iFpLiipV_t)(void*, uintptr_t, int32_t, int32_t, void*, ...); typedef void* (*pFpLiiii_t)(void*, uintptr_t, int32_t, int32_t, int32_t, int32_t); typedef void* (*pFpLiiiI_t)(void*, uintptr_t, int32_t, int32_t, int32_t, int64_t); typedef int32_t (*iFpippppp_t)(void*, int32_t, void*, void*, void*, void*, void*); -typedef int32_t (*iFpuvvppp_t)(void*, uint32_t, void, void, void*, void*, void*); #define SUPER() ADDED_FUNCTIONS() \ GO(freeaddrinfo, vFp_t) \ diff --git a/src/wrapped32/generated/wrapper32.c b/src/wrapped32/generated/wrapper32.c index 5c12b4bc..95b613e9 100644 --- a/src/wrapped32/generated/wrapper32.c +++ b/src/wrapped32/generated/wrapper32.c @@ -321,7 +321,9 @@ typedef uintptr_t (*LFpLpriiiiiiiiilt__t)(void*, uintptr_t, void*, struct_iiiiii typedef void (*vFEpLLp_t)(x64emu_t*, void*, uintptr_t, uintptr_t, void*); typedef int32_t (*iFEiiip_t)(x64emu_t*, int32_t, int32_t, int32_t, void*); typedef int32_t (*iFEipii_t)(x64emu_t*, int32_t, void*, int32_t, int32_t); +typedef int32_t (*iFEpipp_t)(x64emu_t*, void*, int32_t, void*, void*); typedef int32_t (*iFEpupV_t)(x64emu_t*, void*, uint32_t, void*, void*); +typedef int32_t (*iFEpLpp_t)(x64emu_t*, void*, uintptr_t, void*, void*); typedef int32_t (*iFEpLpV_t)(x64emu_t*, void*, uintptr_t, void*, void*); typedef int32_t (*iFEppiV_t)(x64emu_t*, void*, void*, int32_t, void*); typedef int32_t (*iFEpppi_t)(x64emu_t*, void*, void*, void*, int32_t); @@ -339,8 +341,6 @@ typedef uintptr_t (*LFpBp_LLp_t)(void*, struct_p_t*, uintptr_t, uintptr_t, void* typedef int32_t (*iFippprLL__t)(int32_t, void*, void*, void*, struct_LL_t*); typedef uintptr_t (*LFLbp_bL_Bp_BL__t)(uintptr_t, struct_p_t*, struct_L_t*, struct_p_t*, struct_L_t*); typedef uintptr_t (*LFpLpriiiiiiiiilt_a_t)(void*, uintptr_t, void*, struct_iiiiiiiiilt_t*, void*); -typedef int32_t (*iFEpippp_t)(x64emu_t*, void*, int32_t, void*, void*, void*); -typedef int32_t (*iFEpuppp_t)(x64emu_t*, void*, uint32_t, void*, void*, void*); typedef int32_t (*iFEpLppp_t)(x64emu_t*, void*, uintptr_t, void*, void*, void*); typedef intptr_t (*lFipLipu_t)(int32_t, void*, uintptr_t, int32_t, void*, uint32_t); typedef intptr_t (*lFipLipp_t)(int32_t, void*, uintptr_t, int32_t, void*, void*); @@ -605,7 +605,9 @@ void LFpLpriiiiiiiiilt__32(x64emu_t *emu, uintptr_t fcn) { LFpLpriiiiiiiiilt__t void vFEpLLp_32(x64emu_t *emu, uintptr_t fcn) { vFEpLLp_t fn = (vFEpLLp_t)fcn; fn(emu, from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), to_ulong(from_ptri(ulong_t, R_ESP + 12)), from_ptriv(R_ESP + 16)); } void iFEiiip_32(x64emu_t *emu, uintptr_t fcn) { iFEiiip_t fn = (iFEiiip_t)fcn; R_EAX = fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptriv(R_ESP + 16)); } void iFEipii_32(x64emu_t *emu, uintptr_t fcn) { iFEipii_t fn = (iFEipii_t)fcn; R_EAX = fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16)); } +void iFEpipp_32(x64emu_t *emu, uintptr_t fcn) { iFEpipp_t fn = (iFEpipp_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16)); } void iFEpupV_32(x64emu_t *emu, uintptr_t fcn) { iFEpupV_t fn = (iFEpupV_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptriv(R_ESP + 12), from_ptrv(R_ESP + 16)); } +void iFEpLpp_32(x64emu_t *emu, uintptr_t fcn) { iFEpLpp_t fn = (iFEpLpp_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16)); } void iFEpLpV_32(x64emu_t *emu, uintptr_t fcn) { iFEpLpV_t fn = (iFEpLpV_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptriv(R_ESP + 12), from_ptrv(R_ESP + 16)); } void iFEppiV_32(x64emu_t *emu, uintptr_t fcn) { iFEppiV_t fn = (iFEppiV_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptrv(R_ESP + 16)); } void iFEpppi_32(x64emu_t *emu, uintptr_t fcn) { iFEpppi_t fn = (iFEpppi_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptri(int32_t, R_ESP + 16)); } @@ -623,8 +625,6 @@ void LFpBp_LLp_32(x64emu_t *emu, uintptr_t fcn) { LFpBp_LLp_t fn = (LFpBp_LLp_t) void iFippprLL__32(x64emu_t *emu, uintptr_t fcn) { iFippprLL__t fn = (iFippprLL__t)fcn; struct_LL_t arg_20; from_struct_LL(&arg_20, *(ptr_t*)(from_ptr((R_ESP + 20)))); R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16), *(ptr_t*)(from_ptr((R_ESP + 20))) ? &arg_20 : NULL); } void LFLbp_bL_Bp_BL__32(x64emu_t *emu, uintptr_t fcn) { LFLbp_bL_Bp_BL__t fn = (LFLbp_bL_Bp_BL__t)fcn; struct_p_t arg_8; from_struct_p(&arg_8, *(ptr_t*)(from_ptr((R_ESP + 8)))); struct_L_t arg_12; from_struct_L(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); struct_p_t arg_16; struct_L_t arg_20; R_EAX = to_ulong(fn(to_ulong(from_ptri(ulong_t, R_ESP + 4)), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL, *(ptr_t*)(from_ptr((R_ESP + 16))) ? &arg_16 : NULL, *(ptr_t*)(from_ptr((R_ESP + 20))) ? &arg_20 : NULL)); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_L(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); if (*(ptr_t*)(from_ptr((R_ESP + 16)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 16))), &arg_16); if (*(ptr_t*)(from_ptr((R_ESP + 20)))) to_struct_L(*(ptr_t*)(from_ptr((R_ESP + 20))), &arg_20); } void LFpLpriiiiiiiiilt_a_32(x64emu_t *emu, uintptr_t fcn) { LFpLpriiiiiiiiilt_a_t fn = (LFpLpriiiiiiiiilt_a_t)fcn; struct_iiiiiiiiilt_t arg_16; from_struct_iiiiiiiiilt(&arg_16, *(ptr_t*)(from_ptr((R_ESP + 16)))); R_EAX = to_ulong(fn(from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptriv(R_ESP + 12), *(ptr_t*)(from_ptr((R_ESP + 16))) ? &arg_16 : NULL, from_locale(from_ptri(ptr_t, R_ESP + 20)))); } -void iFEpippp_32(x64emu_t *emu, uintptr_t fcn) { iFEpippp_t fn = (iFEpippp_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16), from_ptriv(R_ESP + 20)); } -void iFEpuppp_32(x64emu_t *emu, uintptr_t fcn) { iFEpuppp_t fn = (iFEpuppp_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16), from_ptriv(R_ESP + 20)); } void iFEpLppp_32(x64emu_t *emu, uintptr_t fcn) { iFEpLppp_t fn = (iFEpLppp_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16), from_ptriv(R_ESP + 20)); } void lFipLipu_32(x64emu_t *emu, uintptr_t fcn) { lFipLipu_t fn = (lFipLipu_t)fcn; R_EAX = to_long(fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), to_ulong(from_ptri(ulong_t, R_ESP + 12)), from_ptri(int32_t, R_ESP + 16), from_ptriv(R_ESP + 20), from_ptri(uint32_t, R_ESP + 24))); } void lFipLipp_32(x64emu_t *emu, uintptr_t fcn) { lFipLipp_t fn = (lFipLipp_t)fcn; R_EAX = to_long(fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), to_ulong(from_ptri(ulong_t, R_ESP + 12)), from_ptri(int32_t, R_ESP + 16), from_ptriv(R_ESP + 20), from_ptriv(R_ESP + 24))); } @@ -661,7 +661,7 @@ void iFEivpV_32(x64emu_t *emu, uintptr_t fcn) { iFEipV_t fn = (iFEipV_t)fcn; R_E void iFESvpp_32(x64emu_t *emu, uintptr_t fcn) { iFESpp_t fn = (iFESpp_t)fcn; R_EAX = fn(emu, io_convert32(from_ptriv(R_ESP + 4)), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16)); } void iFESvpV_32(x64emu_t *emu, uintptr_t fcn) { iFESpV_t fn = (iFESpV_t)fcn; R_EAX = fn(emu, io_convert32(from_ptriv(R_ESP + 4)), from_ptriv(R_ESP + 12), from_ptrv(R_ESP + 16)); } void iFEpvvpV_32(x64emu_t *emu, uintptr_t fcn) { iFEppV_t fn = (iFEppV_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 16), from_ptrv(R_ESP + 20)); } -void iFEpuvvppp_32(x64emu_t *emu, uintptr_t fcn) { iFEpuppp_t fn = (iFEpuppp_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptriv(R_ESP + 20), from_ptriv(R_ESP + 24), from_ptriv(R_ESP + 28)); } +void iFEpLvvpp_32(x64emu_t *emu, uintptr_t fcn) { iFEpLpp_t fn = (iFEpLpp_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptriv(R_ESP + 20), from_ptriv(R_ESP + 24)); } int isRetX87Wrapper32(wrapper_t fun) { if (fun == &fFf_32) return 1; diff --git a/src/wrapped32/generated/wrapper32.h b/src/wrapped32/generated/wrapper32.h index 2979bc06..7c87c1d5 100644 --- a/src/wrapped32/generated/wrapper32.h +++ b/src/wrapped32/generated/wrapper32.h @@ -274,7 +274,9 @@ void LFpLpriiiiiiiiilt__32(x64emu_t *emu, uintptr_t fnc); void vFEpLLp_32(x64emu_t *emu, uintptr_t fnc); void iFEiiip_32(x64emu_t *emu, uintptr_t fnc); void iFEipii_32(x64emu_t *emu, uintptr_t fnc); +void iFEpipp_32(x64emu_t *emu, uintptr_t fnc); void iFEpupV_32(x64emu_t *emu, uintptr_t fnc); +void iFEpLpp_32(x64emu_t *emu, uintptr_t fnc); void iFEpLpV_32(x64emu_t *emu, uintptr_t fnc); void iFEppiV_32(x64emu_t *emu, uintptr_t fnc); void iFEpppi_32(x64emu_t *emu, uintptr_t fnc); @@ -292,8 +294,6 @@ void LFpBp_LLp_32(x64emu_t *emu, uintptr_t fnc); void iFippprLL__32(x64emu_t *emu, uintptr_t fnc); void LFLbp_bL_Bp_BL__32(x64emu_t *emu, uintptr_t fnc); void LFpLpriiiiiiiiilt_a_32(x64emu_t *emu, uintptr_t fnc); -void iFEpippp_32(x64emu_t *emu, uintptr_t fnc); -void iFEpuppp_32(x64emu_t *emu, uintptr_t fnc); void iFEpLppp_32(x64emu_t *emu, uintptr_t fnc); void lFipLipu_32(x64emu_t *emu, uintptr_t fnc); void lFipLipp_32(x64emu_t *emu, uintptr_t fnc); @@ -330,5 +330,5 @@ void iFEivpV_32(x64emu_t *emu, uintptr_t fnc); void iFESvpp_32(x64emu_t *emu, uintptr_t fnc); void iFESvpV_32(x64emu_t *emu, uintptr_t fnc); void iFEpvvpV_32(x64emu_t *emu, uintptr_t fnc); -void iFEpuvvppp_32(x64emu_t *emu, uintptr_t fnc); +void iFEpLvvpp_32(x64emu_t *emu, uintptr_t fnc); #endif // __WRAPPER32_H_ diff --git a/src/wrapped32/wrappedlibc_private.h b/src/wrapped32/wrappedlibc_private.h index 45a2b96d..23623e30 100755 --- a/src/wrapped32/wrappedlibc_private.h +++ b/src/wrapped32/wrappedlibc_private.h @@ -1873,8 +1873,8 @@ GOWM(utimes, iFEpp) //GOW(utmpname, iFp) // utmpxname //GOW(valloc, pFu) -GOM(vasprintf, iFEpppp) //%% -GOM(__vasprintf_chk, iFEpippp) //%% +GOM(vasprintf, iFEppp) //%% +GOM(__vasprintf_chk, iFEpipp) //%% // vdprintf // Weak // __vdprintf_chk //GOM(verr, vFEpV) //%% @@ -1896,14 +1896,14 @@ GOM(__vfprintf_chk, iFESvpp) //%% //GOM(vprintf, iFEpp) //%% //GOM(__vprintf_chk, iFEvpp) //%% // vscanf // Weak -GOWM(vsnprintf, iFEpLppp) //%% -//GOWM(__vsnprintf, iFEpuppp) //%% -GOM(__vsnprintf_chk, iFEpuvvppp) //%% +GOWM(vsnprintf, iFEpLpp) //%% +GOWM(__vsnprintf, iFEpLpp) //%% +GOM(__vsnprintf_chk, iFEpLvvpp) //%% //GOWM(vsprintf, iFEppp) //%% //GOM(__vsprintf_chk, iFEpiLpp) //%% //GOM(vsscanf, iFEppp) //%% // __vsscanf // Weak -GOWM(vswprintf, iFEpuppp) //%% +GOWM(vswprintf, iFEpLppp) //%% //GOWM(__vswprintf_chk, iFEpLiLppp) //%% GOM(vswscanf, iFEppp) //GO(vsyslog, vFipp) |