diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-09-02 09:53:28 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-09-02 09:53:36 +0200 |
| commit | ff7a8bfdae66bbea6022b317475cbedf26782923 (patch) | |
| tree | 759f2b6ee79e610a9c70fcd70ea1fa7ee346915d | |
| parent | 27ed10939430de6a1aa315082fa5b1f1cb546cd5 (diff) | |
| download | box64-ff7a8bfdae66bbea6022b317475cbedf26782923.tar.gz box64-ff7a8bfdae66bbea6022b317475cbedf26782923.zip | |
[BOX32] Various small fixes
| -rw-r--r-- | src/wrapped32/generated/functions_list.txt | 17 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrappedlibpthreadtypes32.h | 6 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrapper32.c | 22 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrapper32.h | 11 | ||||
| -rwxr-xr-x | src/wrapped32/wrappedlibc_private.h | 2 | ||||
| -rwxr-xr-x | src/wrapped32/wrappedlibpthread_private.h | 16 |
6 files changed, 39 insertions, 35 deletions
diff --git a/src/wrapped32/generated/functions_list.txt b/src/wrapped32/generated/functions_list.txt index bf3e2b7c..0d6a205d 100644 --- a/src/wrapped32/generated/functions_list.txt +++ b/src/wrapped32/generated/functions_list.txt @@ -68,6 +68,7 @@ #() iFpp -> iFpp #() iFpV -> iFpV #() iFpS -> iFpS +#() iFhi -> iFhi #() iFhp -> iFhp #() iFhh -> iFhh #() IFII -> IFII @@ -101,7 +102,7 @@ #() tFip -> tFip #() tFpL -> tFpL #() iFEbp_ -> iFEB -#() iFHBp_ -> iFHB +#() iFhBp_ -> iFhB #() fFpBp_ -> fFpB #() dFpBp_ -> dFpB #() pFrL_p -> pFBp @@ -135,23 +136,22 @@ #() iFipL -> iFipL #() iFipp -> iFipp #() iFuii -> iFuii -#() iFuip -> iFuip #() iFuui -> iFuui #() iFuuu -> iFuuu #() iFuLp -> iFuLp -#() iFupp -> iFupp #() iFpiu -> iFpiu #() iFpip -> iFpip #() iFpuu -> iFpuu #() iFpLi -> iFpLi -#() iFpLL -> iFpLL #() iFppi -> iFppi #() iFppu -> iFppu #() iFppL -> iFppL #() iFppp -> iFppp #() iFppa -> iFppa #() iFpOu -> iFpOu +#() iFhip -> iFhip #() iFhpL -> iFhpL +#() iFhpp -> iFhpp #() iFSIi -> iFSIi #() iFSli -> iFSli #() IFiIi -> IFiIi @@ -178,6 +178,7 @@ #() SFppS -> SFppS #() tFipu -> tFipu #() iFpBp_i -> iFpBi +#() iFBp_LL -> iFBLL #() IFpBp_i -> IFpBi #() UFpBp_i -> UFpBi #() dFpBp_i -> dFpBi @@ -193,7 +194,6 @@ #() iFEiiN -> iFEiiN #() iFEipp -> iFEipp #() iFEipV -> iFEipV -#() iFELup -> iFELup #() iFEpip -> iFEpip #() iFEpup -> iFEpup #() iFEpLi -> iFEpLi @@ -201,6 +201,7 @@ #() iFEppp -> iFEppp #() iFEppV -> iFEppV #() iFEpOu -> iFEpOu +#() iFEhup -> iFEhup #() iFESpp -> iFESpp #() iFESpV -> iFESpV #() iFiiip -> iFiiip @@ -567,17 +568,17 @@ wrappedlibpthread: - vFppp: - _pthread_cleanup_push - _pthread_cleanup_push_defer -- iFLup: - - pthread_setaffinity_np - iFpup: - pthread_attr_setaffinity_np - - pthread_getaffinity_np - iFppL: - pthread_attr_setstack - iFppp: - __pthread_atfork - pthread_atfork - pthread_attr_getstack +- iFhup: + - pthread_getaffinity_np + - pthread_setaffinity_np - iFppLL: - pthread_cond_timedwait - pthread_cond_timedwait@GLIBC_2.0 diff --git a/src/wrapped32/generated/wrappedlibpthreadtypes32.h b/src/wrapped32/generated/wrappedlibpthreadtypes32.h index 973dcc55..16481475 100644 --- a/src/wrapped32/generated/wrappedlibpthreadtypes32.h +++ b/src/wrapped32/generated/wrappedlibpthreadtypes32.h @@ -21,10 +21,10 @@ typedef int32_t (*iFpL_t)(void*, uintptr_t); typedef int32_t (*iFpp_t)(void*, void*); typedef int32_t (*iFhi_t)(uintptr_t, int32_t); typedef void (*vFppp_t)(void*, void*, void*); -typedef int32_t (*iFLup_t)(uintptr_t, uint32_t, void*); typedef int32_t (*iFpup_t)(void*, uint32_t, void*); typedef int32_t (*iFppL_t)(void*, void*, uintptr_t); typedef int32_t (*iFppp_t)(void*, void*, void*); +typedef int32_t (*iFhup_t)(uintptr_t, uint32_t, void*); typedef int32_t (*iFppLL_t)(void*, void*, uintptr_t, uintptr_t); typedef int32_t (*iFhppp_t)(uintptr_t, void*, void*, void*); @@ -90,13 +90,13 @@ typedef int32_t (*iFhppp_t)(uintptr_t, void*, void*, void*); GO(pthread_kill, iFhi_t) \ GO(_pthread_cleanup_push, vFppp_t) \ GO(_pthread_cleanup_push_defer, vFppp_t) \ - GO(pthread_setaffinity_np, iFLup_t) \ GO(pthread_attr_setaffinity_np, iFpup_t) \ - GO(pthread_getaffinity_np, iFpup_t) \ GO(pthread_attr_setstack, iFppL_t) \ GO(__pthread_atfork, iFppp_t) \ GO(pthread_atfork, iFppp_t) \ GO(pthread_attr_getstack, iFppp_t) \ + GO(pthread_getaffinity_np, iFhup_t) \ + GO(pthread_setaffinity_np, iFhup_t) \ GO(pthread_cond_timedwait, iFppLL_t) \ GO(pthread_cond_timedwait@GLIBC_2.0, iFppLL_t) \ GO(pthread_create, iFhppp_t) diff --git a/src/wrapped32/generated/wrapper32.c b/src/wrapped32/generated/wrapper32.c index fac7535f..3c0036a6 100644 --- a/src/wrapped32/generated/wrapper32.c +++ b/src/wrapped32/generated/wrapper32.c @@ -155,6 +155,7 @@ typedef int32_t (*iFpL_t)(void*, uintptr_t); typedef int32_t (*iFpp_t)(void*, void*); typedef int32_t (*iFpV_t)(void*, void*); typedef int32_t (*iFpS_t)(void*, void*); +typedef int32_t (*iFhi_t)(uintptr_t, int32_t); typedef int32_t (*iFhp_t)(uintptr_t, void*); typedef int32_t (*iFhh_t)(uintptr_t, uintptr_t); typedef int64_t (*IFII_t)(int64_t, int64_t); @@ -188,7 +189,7 @@ typedef void* (*SFpp_t)(void*, void*); typedef char* (*tFip_t)(int32_t, void*); typedef char* (*tFpL_t)(void*, uintptr_t); typedef int32_t (*iFEbp__t)(x64emu_t*, struct_p_t*); -typedef int32_t (*iFHBp__t)(uintptr_t, struct_p_t*); +typedef int32_t (*iFhBp__t)(uintptr_t, struct_p_t*); typedef float (*fFpBp__t)(void*, struct_p_t*); typedef double (*dFpBp__t)(void*, struct_p_t*); typedef void* (*pFrL_p_t)(struct_L_t*, void*); @@ -222,23 +223,22 @@ typedef int32_t (*iFipu_t)(int32_t, void*, uint32_t); typedef int32_t (*iFipL_t)(int32_t, void*, uintptr_t); typedef int32_t (*iFipp_t)(int32_t, void*, void*); typedef int32_t (*iFuii_t)(uint32_t, int32_t, int32_t); -typedef int32_t (*iFuip_t)(uint32_t, int32_t, void*); typedef int32_t (*iFuui_t)(uint32_t, uint32_t, int32_t); typedef int32_t (*iFuuu_t)(uint32_t, uint32_t, uint32_t); typedef int32_t (*iFuLp_t)(uint32_t, uintptr_t, void*); -typedef int32_t (*iFupp_t)(uint32_t, void*, void*); typedef int32_t (*iFpiu_t)(void*, int32_t, uint32_t); typedef int32_t (*iFpip_t)(void*, int32_t, void*); typedef int32_t (*iFpuu_t)(void*, uint32_t, uint32_t); typedef int32_t (*iFpLi_t)(void*, uintptr_t, int32_t); -typedef int32_t (*iFpLL_t)(void*, uintptr_t, uintptr_t); typedef int32_t (*iFppi_t)(void*, void*, int32_t); typedef int32_t (*iFppu_t)(void*, void*, uint32_t); typedef int32_t (*iFppL_t)(void*, void*, uintptr_t); typedef int32_t (*iFppp_t)(void*, void*, void*); typedef int32_t (*iFppa_t)(void*, void*, void*); typedef int32_t (*iFpOu_t)(void*, int32_t, uint32_t); +typedef int32_t (*iFhip_t)(uintptr_t, int32_t, void*); typedef int32_t (*iFhpL_t)(uintptr_t, void*, uintptr_t); +typedef int32_t (*iFhpp_t)(uintptr_t, void*, void*); typedef int32_t (*iFSIi_t)(void*, int64_t, int32_t); typedef int32_t (*iFSli_t)(void*, intptr_t, int32_t); typedef int64_t (*IFiIi_t)(int32_t, int64_t, int32_t); @@ -265,6 +265,7 @@ typedef void* (*SFEpp_t)(x64emu_t*, void*, void*); typedef void* (*SFppS_t)(void*, void*, void*); typedef char* (*tFipu_t)(int32_t, void*, uint32_t); typedef int32_t (*iFpBp_i_t)(void*, struct_p_t*, int32_t); +typedef int32_t (*iFBp_LL_t)(struct_p_t*, uintptr_t, uintptr_t); typedef int64_t (*IFpBp_i_t)(void*, struct_p_t*, int32_t); typedef uint64_t (*UFpBp_i_t)(void*, struct_p_t*, int32_t); typedef double (*dFpBp_i_t)(void*, struct_p_t*, int32_t); @@ -280,7 +281,6 @@ typedef int32_t (*iFEiip_t)(x64emu_t*, int32_t, int32_t, void*); typedef int32_t (*iFEiiN_t)(x64emu_t*, int32_t, int32_t, ...); typedef int32_t (*iFEipp_t)(x64emu_t*, int32_t, void*, void*); typedef int32_t (*iFEipV_t)(x64emu_t*, int32_t, void*, void*); -typedef int32_t (*iFELup_t)(x64emu_t*, uintptr_t, uint32_t, void*); typedef int32_t (*iFEpip_t)(x64emu_t*, void*, int32_t, void*); typedef int32_t (*iFEpup_t)(x64emu_t*, void*, uint32_t, void*); typedef int32_t (*iFEpLi_t)(x64emu_t*, void*, uintptr_t, int32_t); @@ -288,6 +288,7 @@ typedef int32_t (*iFEppL_t)(x64emu_t*, void*, void*, uintptr_t); typedef int32_t (*iFEppp_t)(x64emu_t*, void*, void*, void*); typedef int32_t (*iFEppV_t)(x64emu_t*, void*, void*, void*); typedef int32_t (*iFEpOu_t)(x64emu_t*, void*, int32_t, uint32_t); +typedef int32_t (*iFEhup_t)(x64emu_t*, uintptr_t, uint32_t, void*); typedef int32_t (*iFESpp_t)(x64emu_t*, void*, void*, void*); typedef int32_t (*iFESpV_t)(x64emu_t*, void*, void*, void*); typedef int32_t (*iFiiip_t)(int32_t, int32_t, int32_t, void*); @@ -436,6 +437,7 @@ void iFpL_32(x64emu_t *emu, uintptr_t fcn) { iFpL_t fn = (iFpL_t)fcn; R_EAX = fn void iFpp_32(x64emu_t *emu, uintptr_t fcn) { iFpp_t fn = (iFpp_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8)); } void iFpV_32(x64emu_t *emu, uintptr_t fcn) { iFpV_t fn = (iFpV_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptrv(R_ESP + 8)); } void iFpS_32(x64emu_t *emu, uintptr_t fcn) { iFpS_t fn = (iFpS_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), io_convert32(from_ptriv(R_ESP + 8))); } +void iFhi_32(x64emu_t *emu, uintptr_t fcn) { iFhi_t fn = (iFhi_t)fcn; R_EAX = fn(from_hash(from_ptri(ptr_t, R_ESP + 4)), from_ptri(int32_t, R_ESP + 8)); } void iFhp_32(x64emu_t *emu, uintptr_t fcn) { iFhp_t fn = (iFhp_t)fcn; R_EAX = fn(from_hash(from_ptri(ptr_t, R_ESP + 4)), from_ptriv(R_ESP + 8)); } void iFhh_32(x64emu_t *emu, uintptr_t fcn) { iFhh_t fn = (iFhh_t)fcn; R_EAX = fn(from_hash(from_ptri(ptr_t, R_ESP + 4)), from_hash(from_ptri(ptr_t, R_ESP + 8))); } void IFII_32(x64emu_t *emu, uintptr_t fcn) { IFII_t fn = (IFII_t)fcn; ui64_t r; r.i = fn(from_ptri(int64_t, R_ESP + 4), from_ptri(int64_t, R_ESP + 12)); R_EAX = r.d[0]; R_EDX = r.d[1]; } @@ -469,7 +471,7 @@ void SFpp_32(x64emu_t *emu, uintptr_t fcn) { SFpp_t fn = (SFpp_t)fcn; R_EAX = to void tFip_32(x64emu_t *emu, uintptr_t fcn) { tFip_t fn = (tFip_t)fcn; R_EAX = to_cstring(fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8))); } void tFpL_32(x64emu_t *emu, uintptr_t fcn) { tFpL_t fn = (tFpL_t)fcn; R_EAX = to_cstring(fn(from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)))); } void iFEbp__32(x64emu_t *emu, uintptr_t fcn) { iFEbp__t fn = (iFEbp__t)fcn; struct_p_t arg_4; from_struct_p(&arg_4, *(ptr_t*)(from_ptr((R_ESP + 4)))); R_EAX = fn(emu, *(ptr_t*)(from_ptr((R_ESP + 4))) ? &arg_4 : NULL); if (*(ptr_t*)(from_ptr((R_ESP + 4)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 4))), &arg_4); } -void iFHBp__32(x64emu_t *emu, uintptr_t fcn) { iFHBp__t fn = (iFHBp__t)fcn; struct_p_t arg_8; R_EAX = fn(from_hash_d(from_ptri(ptr_t, R_ESP + 4)), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } +void iFhBp__32(x64emu_t *emu, uintptr_t fcn) { iFhBp__t fn = (iFhBp__t)fcn; struct_p_t arg_8; R_EAX = fn(from_hash(from_ptri(ptr_t, R_ESP + 4)), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } void fFpBp__32(x64emu_t *emu, uintptr_t fcn) { fFpBp__t fn = (fFpBp__t)fcn; struct_p_t arg_8; float fl = fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL); fpu_do_push(emu); ST0val = fl; if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } void dFpBp__32(x64emu_t *emu, uintptr_t fcn) { dFpBp__t fn = (dFpBp__t)fcn; struct_p_t arg_8; double db = fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL); fpu_do_push(emu); ST0val = db; if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } void pFrL_p_32(x64emu_t *emu, uintptr_t fcn) { pFrL_p_t fn = (pFrL_p_t)fcn; struct_L_t arg_4; from_struct_L(&arg_4, *(ptr_t*)(from_ptr((R_ESP + 4)))); R_EAX = to_ptrv(fn(*(ptr_t*)(from_ptr((R_ESP + 4))) ? &arg_4 : NULL, from_ptriv(R_ESP + 8))); } @@ -503,23 +505,22 @@ void iFipu_32(x64emu_t *emu, uintptr_t fcn) { iFipu_t fn = (iFipu_t)fcn; R_EAX = void iFipL_32(x64emu_t *emu, uintptr_t fcn) { iFipL_t fn = (iFipL_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), to_ulong(from_ptri(ulong_t, R_ESP + 12))); } void iFipp_32(x64emu_t *emu, uintptr_t fcn) { iFipp_t fn = (iFipp_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12)); } void iFuii_32(x64emu_t *emu, uintptr_t fcn) { iFuii_t fn = (iFuii_t)fcn; R_EAX = fn(from_ptri(uint32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12)); } -void iFuip_32(x64emu_t *emu, uintptr_t fcn) { iFuip_t fn = (iFuip_t)fcn; R_EAX = fn(from_ptri(uint32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12)); } void iFuui_32(x64emu_t *emu, uintptr_t fcn) { iFuui_t fn = (iFuui_t)fcn; R_EAX = fn(from_ptri(uint32_t, R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12)); } void iFuuu_32(x64emu_t *emu, uintptr_t fcn) { iFuuu_t fn = (iFuuu_t)fcn; R_EAX = fn(from_ptri(uint32_t, R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptri(uint32_t, R_ESP + 12)); } void iFuLp_32(x64emu_t *emu, uintptr_t fcn) { iFuLp_t fn = (iFuLp_t)fcn; R_EAX = fn(from_ptri(uint32_t, R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptriv(R_ESP + 12)); } -void iFupp_32(x64emu_t *emu, uintptr_t fcn) { iFupp_t fn = (iFupp_t)fcn; R_EAX = fn(from_ptri(uint32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12)); } void iFpiu_32(x64emu_t *emu, uintptr_t fcn) { iFpiu_t fn = (iFpiu_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(uint32_t, R_ESP + 12)); } void iFpip_32(x64emu_t *emu, uintptr_t fcn) { iFpip_t fn = (iFpip_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12)); } void iFpuu_32(x64emu_t *emu, uintptr_t fcn) { iFpuu_t fn = (iFpuu_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptri(uint32_t, R_ESP + 12)); } void iFpLi_32(x64emu_t *emu, uintptr_t fcn) { iFpLi_t fn = (iFpLi_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptri(int32_t, R_ESP + 12)); } -void iFpLL_32(x64emu_t *emu, uintptr_t fcn) { iFpLL_t fn = (iFpLL_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), to_ulong(from_ptri(ulong_t, R_ESP + 12))); } void iFppi_32(x64emu_t *emu, uintptr_t fcn) { iFppi_t fn = (iFppi_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12)); } void iFppu_32(x64emu_t *emu, uintptr_t fcn) { iFppu_t fn = (iFppu_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(uint32_t, R_ESP + 12)); } void iFppL_32(x64emu_t *emu, uintptr_t fcn) { iFppL_t fn = (iFppL_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), to_ulong(from_ptri(ulong_t, R_ESP + 12))); } void iFppp_32(x64emu_t *emu, uintptr_t fcn) { iFppp_t fn = (iFppp_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12)); } void iFppa_32(x64emu_t *emu, uintptr_t fcn) { iFppa_t fn = (iFppa_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_locale(from_ptri(ptr_t, R_ESP + 12))); } void iFpOu_32(x64emu_t *emu, uintptr_t fcn) { iFpOu_t fn = (iFpOu_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), of_convert32(from_ptri(int32_t, R_ESP + 8)), from_ptri(uint32_t, R_ESP + 12)); } +void iFhip_32(x64emu_t *emu, uintptr_t fcn) { iFhip_t fn = (iFhip_t)fcn; R_EAX = fn(from_hash(from_ptri(ptr_t, R_ESP + 4)), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12)); } void iFhpL_32(x64emu_t *emu, uintptr_t fcn) { iFhpL_t fn = (iFhpL_t)fcn; R_EAX = fn(from_hash(from_ptri(ptr_t, R_ESP + 4)), from_ptriv(R_ESP + 8), to_ulong(from_ptri(ulong_t, R_ESP + 12))); } +void iFhpp_32(x64emu_t *emu, uintptr_t fcn) { iFhpp_t fn = (iFhpp_t)fcn; R_EAX = fn(from_hash(from_ptri(ptr_t, R_ESP + 4)), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12)); } void iFSIi_32(x64emu_t *emu, uintptr_t fcn) { iFSIi_t fn = (iFSIi_t)fcn; R_EAX = fn(io_convert32(from_ptriv(R_ESP + 4)), from_ptri(int64_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 16)); } void iFSli_32(x64emu_t *emu, uintptr_t fcn) { iFSli_t fn = (iFSli_t)fcn; R_EAX = fn(io_convert32(from_ptriv(R_ESP + 4)), to_long(from_ptri(long_t, R_ESP + 8)), from_ptri(int32_t, R_ESP + 12)); } void IFiIi_32(x64emu_t *emu, uintptr_t fcn) { IFiIi_t fn = (IFiIi_t)fcn; ui64_t r; r.i = fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int64_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 16)); R_EAX = r.d[0]; R_EDX = r.d[1]; } @@ -546,6 +547,7 @@ void SFEpp_32(x64emu_t *emu, uintptr_t fcn) { SFEpp_t fn = (SFEpp_t)fcn; R_EAX = void SFppS_32(x64emu_t *emu, uintptr_t fcn) { SFppS_t fn = (SFppS_t)fcn; R_EAX = to_ptrv(io_convert_from(fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), io_convert32(from_ptriv(R_ESP + 12))))); } void tFipu_32(x64emu_t *emu, uintptr_t fcn) { tFipu_t fn = (tFipu_t)fcn; R_EAX = to_cstring(fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(uint32_t, R_ESP + 12))); } void iFpBp_i_32(x64emu_t *emu, uintptr_t fcn) { iFpBp_i_t fn = (iFpBp_i_t)fcn; struct_p_t arg_8; R_EAX = fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, from_ptri(int32_t, R_ESP + 12)); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } +void iFBp_LL_32(x64emu_t *emu, uintptr_t fcn) { iFBp_LL_t fn = (iFBp_LL_t)fcn; struct_p_t arg_4; R_EAX = fn(*(ptr_t*)(from_ptr((R_ESP + 4))) ? &arg_4 : NULL, to_ulong(from_ptri(ulong_t, R_ESP + 8)), to_ulong(from_ptri(ulong_t, R_ESP + 12))); if (*(ptr_t*)(from_ptr((R_ESP + 4)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 4))), &arg_4); } void IFpBp_i_32(x64emu_t *emu, uintptr_t fcn) { IFpBp_i_t fn = (IFpBp_i_t)fcn; struct_p_t arg_8; ui64_t r; r.i = fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, from_ptri(int32_t, R_ESP + 12)); R_EAX = r.d[0]; R_EDX = r.d[1]; if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } void UFpBp_i_32(x64emu_t *emu, uintptr_t fcn) { UFpBp_i_t fn = (UFpBp_i_t)fcn; struct_p_t arg_8; ui64_t r; r.u = (uint64_t)fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, from_ptri(int32_t, R_ESP + 12)); R_EAX = r.d[0]; R_EDX = r.d[1]; if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } void dFpBp_i_32(x64emu_t *emu, uintptr_t fcn) { dFpBp_i_t fn = (dFpBp_i_t)fcn; struct_p_t arg_8; double db = fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, from_ptri(int32_t, R_ESP + 12)); fpu_do_push(emu); ST0val = db; if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } @@ -561,7 +563,6 @@ void iFEiip_32(x64emu_t *emu, uintptr_t fcn) { iFEiip_t fn = (iFEiip_t)fcn; R_EA void iFEiiN_32(x64emu_t *emu, uintptr_t fcn) { iFEiiN_t fn = (iFEiiN_t)fcn; R_EAX = fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12)); } void iFEipp_32(x64emu_t *emu, uintptr_t fcn) { iFEipp_t fn = (iFEipp_t)fcn; R_EAX = fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12)); } void iFEipV_32(x64emu_t *emu, uintptr_t fcn) { iFEipV_t fn = (iFEipV_t)fcn; R_EAX = fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptrv(R_ESP + 12)); } -void iFELup_32(x64emu_t *emu, uintptr_t fcn) { iFELup_t fn = (iFELup_t)fcn; R_EAX = fn(emu, to_ulong(from_ptri(ulong_t, R_ESP + 4)), from_ptri(uint32_t, R_ESP + 8), from_ptriv(R_ESP + 12)); } void iFEpip_32(x64emu_t *emu, uintptr_t fcn) { iFEpip_t fn = (iFEpip_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12)); } void iFEpup_32(x64emu_t *emu, uintptr_t fcn) { iFEpup_t fn = (iFEpup_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptriv(R_ESP + 12)); } void iFEpLi_32(x64emu_t *emu, uintptr_t fcn) { iFEpLi_t fn = (iFEpLi_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptri(int32_t, R_ESP + 12)); } @@ -569,6 +570,7 @@ void iFEppL_32(x64emu_t *emu, uintptr_t fcn) { iFEppL_t fn = (iFEppL_t)fcn; R_EA void iFEppp_32(x64emu_t *emu, uintptr_t fcn) { iFEppp_t fn = (iFEppp_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12)); } void iFEppV_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 + 8), from_ptrv(R_ESP + 12)); } void iFEpOu_32(x64emu_t *emu, uintptr_t fcn) { iFEpOu_t fn = (iFEpOu_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), of_convert32(from_ptri(int32_t, R_ESP + 8)), from_ptri(uint32_t, R_ESP + 12)); } +void iFEhup_32(x64emu_t *emu, uintptr_t fcn) { iFEhup_t fn = (iFEhup_t)fcn; R_EAX = fn(emu, from_hash(from_ptri(ptr_t, R_ESP + 4)), from_ptri(uint32_t, R_ESP + 8), from_ptriv(R_ESP + 12)); } void iFESpp_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 + 8), from_ptriv(R_ESP + 12)); } void iFESpV_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 + 8), from_ptrv(R_ESP + 12)); } void iFiiip_32(x64emu_t *emu, uintptr_t fcn) { iFiiip_t fn = (iFiiip_t)fcn; R_EAX = fn(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)); } diff --git a/src/wrapped32/generated/wrapper32.h b/src/wrapped32/generated/wrapper32.h index 06781bea..e0cb6c0b 100644 --- a/src/wrapped32/generated/wrapper32.h +++ b/src/wrapped32/generated/wrapper32.h @@ -108,6 +108,7 @@ void iFpL_32(x64emu_t *emu, uintptr_t fnc); void iFpp_32(x64emu_t *emu, uintptr_t fnc); void iFpV_32(x64emu_t *emu, uintptr_t fnc); void iFpS_32(x64emu_t *emu, uintptr_t fnc); +void iFhi_32(x64emu_t *emu, uintptr_t fnc); void iFhp_32(x64emu_t *emu, uintptr_t fnc); void iFhh_32(x64emu_t *emu, uintptr_t fnc); void IFII_32(x64emu_t *emu, uintptr_t fnc); @@ -141,7 +142,7 @@ void SFpp_32(x64emu_t *emu, uintptr_t fnc); void tFip_32(x64emu_t *emu, uintptr_t fnc); void tFpL_32(x64emu_t *emu, uintptr_t fnc); void iFEbp__32(x64emu_t *emu, uintptr_t fnc); -void iFHBp__32(x64emu_t *emu, uintptr_t fnc); +void iFhBp__32(x64emu_t *emu, uintptr_t fnc); void fFpBp__32(x64emu_t *emu, uintptr_t fnc); void dFpBp__32(x64emu_t *emu, uintptr_t fnc); void pFrL_p_32(x64emu_t *emu, uintptr_t fnc); @@ -175,23 +176,22 @@ void iFipu_32(x64emu_t *emu, uintptr_t fnc); void iFipL_32(x64emu_t *emu, uintptr_t fnc); void iFipp_32(x64emu_t *emu, uintptr_t fnc); void iFuii_32(x64emu_t *emu, uintptr_t fnc); -void iFuip_32(x64emu_t *emu, uintptr_t fnc); void iFuui_32(x64emu_t *emu, uintptr_t fnc); void iFuuu_32(x64emu_t *emu, uintptr_t fnc); void iFuLp_32(x64emu_t *emu, uintptr_t fnc); -void iFupp_32(x64emu_t *emu, uintptr_t fnc); void iFpiu_32(x64emu_t *emu, uintptr_t fnc); void iFpip_32(x64emu_t *emu, uintptr_t fnc); void iFpuu_32(x64emu_t *emu, uintptr_t fnc); void iFpLi_32(x64emu_t *emu, uintptr_t fnc); -void iFpLL_32(x64emu_t *emu, uintptr_t fnc); void iFppi_32(x64emu_t *emu, uintptr_t fnc); void iFppu_32(x64emu_t *emu, uintptr_t fnc); void iFppL_32(x64emu_t *emu, uintptr_t fnc); void iFppp_32(x64emu_t *emu, uintptr_t fnc); void iFppa_32(x64emu_t *emu, uintptr_t fnc); void iFpOu_32(x64emu_t *emu, uintptr_t fnc); +void iFhip_32(x64emu_t *emu, uintptr_t fnc); void iFhpL_32(x64emu_t *emu, uintptr_t fnc); +void iFhpp_32(x64emu_t *emu, uintptr_t fnc); void iFSIi_32(x64emu_t *emu, uintptr_t fnc); void iFSli_32(x64emu_t *emu, uintptr_t fnc); void IFiIi_32(x64emu_t *emu, uintptr_t fnc); @@ -218,6 +218,7 @@ void SFEpp_32(x64emu_t *emu, uintptr_t fnc); void SFppS_32(x64emu_t *emu, uintptr_t fnc); void tFipu_32(x64emu_t *emu, uintptr_t fnc); void iFpBp_i_32(x64emu_t *emu, uintptr_t fnc); +void iFBp_LL_32(x64emu_t *emu, uintptr_t fnc); void IFpBp_i_32(x64emu_t *emu, uintptr_t fnc); void UFpBp_i_32(x64emu_t *emu, uintptr_t fnc); void dFpBp_i_32(x64emu_t *emu, uintptr_t fnc); @@ -233,7 +234,6 @@ void iFEiip_32(x64emu_t *emu, uintptr_t fnc); void iFEiiN_32(x64emu_t *emu, uintptr_t fnc); void iFEipp_32(x64emu_t *emu, uintptr_t fnc); void iFEipV_32(x64emu_t *emu, uintptr_t fnc); -void iFELup_32(x64emu_t *emu, uintptr_t fnc); void iFEpip_32(x64emu_t *emu, uintptr_t fnc); void iFEpup_32(x64emu_t *emu, uintptr_t fnc); void iFEpLi_32(x64emu_t *emu, uintptr_t fnc); @@ -241,6 +241,7 @@ void iFEppL_32(x64emu_t *emu, uintptr_t fnc); void iFEppp_32(x64emu_t *emu, uintptr_t fnc); void iFEppV_32(x64emu_t *emu, uintptr_t fnc); void iFEpOu_32(x64emu_t *emu, uintptr_t fnc); +void iFEhup_32(x64emu_t *emu, uintptr_t fnc); void iFESpp_32(x64emu_t *emu, uintptr_t fnc); void iFESpV_32(x64emu_t *emu, uintptr_t fnc); void iFiiip_32(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped32/wrappedlibc_private.h b/src/wrapped32/wrappedlibc_private.h index 68dea885..176a2492 100755 --- a/src/wrapped32/wrappedlibc_private.h +++ b/src/wrapped32/wrappedlibc_private.h @@ -1242,7 +1242,7 @@ GO(posix_fadvise64, iFiuui) GO(posix_fallocate, iFiii) GO(posix_fallocate64, iFiII) // posix_madvise -GOW(posix_memalign, iFpLL) +GOW(posix_memalign, iFBp_LL) // posix_openpt // Weak //GO(posix_spawn, iFpppppp) // posix_spawnattr_destroy diff --git a/src/wrapped32/wrappedlibpthread_private.h b/src/wrapped32/wrappedlibpthread_private.h index ca98ba5a..fca33103 100755 --- a/src/wrapped32/wrappedlibpthread_private.h +++ b/src/wrapped32/wrappedlibpthread_private.h @@ -74,17 +74,17 @@ GOM(pthread_create, iFEBh_ppp) GOM(pthread_detach, iFEh) GO(pthread_equal, iFhh) GO(pthread_exit, vFp) -GOM(pthread_getaffinity_np, iFEpup) -GO(pthread_getattr_np, iFup) +GOM(pthread_getaffinity_np, iFEhup) +GO(pthread_getattr_np, iFhp) GO(pthread_getconcurrency, iFv) -GO(pthread_getcpuclockid, iFup) -GO(pthread_getschedparam, iFupp) +GO(pthread_getcpuclockid, iFhp) +GO(pthread_getschedparam, iFhpp) GO(__pthread_getspecific, pFu) GO(pthread_getspecific, pFu) GO(pthread_getname_np, iFhpL) GOM(__pthread_initialize, vFv) //%noE doesn't exist anymore... // __pthread_initialize_minimal -GO(pthread_join, iFHBp_) +GO(pthread_join, iFhBp_) GOM(__pthread_key_create, iFEpp) GOM(pthread_key_create, iFEpp) GO(pthread_key_delete, iFu) @@ -146,13 +146,13 @@ GOM(pthread_rwlock_unlock, iFp) //%noE GO(__pthread_rwlock_wrlock, iFp) GOM(pthread_rwlock_wrlock, iFp) //%noE GO(pthread_self, hFv) -GOM(pthread_setaffinity_np, iFELup) +GOM(pthread_setaffinity_np, iFEhup) GO(pthread_setcancelstate, iFip) GO(pthread_setcanceltype, iFip) GO(pthread_setconcurrency, iFi) GO(pthread_setname_np, iFhp) -GO(pthread_setschedparam, iFuip) -GO(pthread_setschedprio, iFpi) +GO(pthread_setschedparam, iFhip) +GO(pthread_setschedprio, iFhi) GO(__pthread_setspecific, iFup) GO(pthread_setspecific, iFup) GO(pthread_sigmask, iFipp) |