diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-07-13 17:42:43 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-07-13 17:42:43 +0200 |
| commit | 41ebdc7604a0d41484df84b7bc2fa51e0a75ec16 (patch) | |
| tree | 80d189b9526c75d2c32a40c6b4cfee6b73747944 /src/wrapped | |
| parent | e3fde0807f919ccba287d5dff1e9b98742826e6a (diff) | |
| download | box64-41ebdc7604a0d41484df84b7bc2fa51e0a75ec16.tar.gz box64-41ebdc7604a0d41484df84b7bc2fa51e0a75ec16.zip | |
Added 1 more wrapped function and fixed signature of 2 other
Diffstat (limited to 'src/wrapped')
| -rw-r--r-- | src/wrapped/generated/functions_list.txt | 3 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.c | 7 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.h | 3 | ||||
| -rwxr-xr-x | src/wrapped/wrappedlibc_private.h | 6 |
4 files changed, 11 insertions, 8 deletions
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index 40c02898..b7678f06 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -171,6 +171,7 @@ #() dFLL #() dFpi #() dFpp +#() DFpp #() lFll #() lFpi #() lFpp @@ -607,7 +608,7 @@ #() uFpppi #() uFpppp #() UFpipp -#() dFppiL +#() DFppiL #() lFEpip #() lFEppL #() lFiipL diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c index 7056f9eb..1f747877 100644 --- a/src/wrapped/generated/wrapper.c +++ b/src/wrapped/generated/wrapper.c @@ -205,6 +205,7 @@ typedef double (*dFdp_t)(double, void*); typedef double (*dFLL_t)(uintptr_t, uintptr_t); typedef double (*dFpi_t)(void*, int64_t); typedef double (*dFpp_t)(void*, void*); +typedef long double (*DFpp_t)(void*, void*); typedef intptr_t (*lFll_t)(intptr_t, intptr_t); typedef intptr_t (*lFpi_t)(void*, int64_t); typedef intptr_t (*lFpp_t)(void*, void*); @@ -641,7 +642,7 @@ typedef uint64_t (*uFppiu_t)(void*, void*, int64_t, uint64_t); typedef uint64_t (*uFpppi_t)(void*, void*, void*, int64_t); typedef uint64_t (*uFpppp_t)(void*, void*, void*, void*); typedef uint64_t (*UFpipp_t)(void*, int64_t, void*, void*); -typedef double (*dFppiL_t)(void*, void*, int64_t, uintptr_t); +typedef long double (*DFppiL_t)(void*, void*, int64_t, uintptr_t); typedef intptr_t (*lFEpip_t)(x64emu_t*, void*, int64_t, void*); typedef intptr_t (*lFEppL_t)(x64emu_t*, void*, void*, uintptr_t); typedef intptr_t (*lFiipL_t)(int64_t, int64_t, void*, uintptr_t); @@ -1622,6 +1623,7 @@ void dFdp(x64emu_t *emu, uintptr_t fcn) { dFdp_t fn = (dFdp_t)fcn; emu->xmm[0].d void dFLL(x64emu_t *emu, uintptr_t fcn) { dFLL_t fn = (dFLL_t)fcn; emu->xmm[0].d[0]=fn((uintptr_t)R_RDI, (uintptr_t)R_RSI); } void dFpi(x64emu_t *emu, uintptr_t fcn) { dFpi_t fn = (dFpi_t)fcn; emu->xmm[0].d[0]=fn((void*)R_RDI, (int64_t)R_RSI); } void dFpp(x64emu_t *emu, uintptr_t fcn) { dFpp_t fn = (dFpp_t)fcn; emu->xmm[0].d[0]=fn((void*)R_RDI, (void*)R_RSI); } +void DFpp(x64emu_t *emu, uintptr_t fcn) { DFpp_t fn = (DFpp_t)fcn; long double ld=fn((void*)R_RDI, (void*)R_RSI); fpu_do_push(emu); ST0val = ld; } void lFll(x64emu_t *emu, uintptr_t fcn) { lFll_t fn = (lFll_t)fcn; R_RAX=(intptr_t)fn((intptr_t)R_RDI, (intptr_t)R_RSI); } void lFpi(x64emu_t *emu, uintptr_t fcn) { lFpi_t fn = (lFpi_t)fcn; R_RAX=(intptr_t)fn((void*)R_RDI, (int64_t)R_RSI); } void lFpp(x64emu_t *emu, uintptr_t fcn) { lFpp_t fn = (lFpp_t)fcn; R_RAX=(intptr_t)fn((void*)R_RDI, (void*)R_RSI); } @@ -2058,7 +2060,7 @@ void uFppiu(x64emu_t *emu, uintptr_t fcn) { uFppiu_t fn = (uFppiu_t)fcn; R_RAX=( void uFpppi(x64emu_t *emu, uintptr_t fcn) { uFpppi_t fn = (uFpppi_t)fcn; R_RAX=(uint64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int64_t)R_RCX); } void uFpppp(x64emu_t *emu, uintptr_t fcn) { uFpppp_t fn = (uFpppp_t)fcn; R_RAX=(uint64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX); } void UFpipp(x64emu_t *emu, uintptr_t fcn) { UFpipp_t fn = (UFpipp_t)fcn; R_RAX=fn((void*)R_RDI, (int64_t)R_RSI, (void*)R_RDX, (void*)R_RCX); } -void dFppiL(x64emu_t *emu, uintptr_t fcn) { dFppiL_t fn = (dFppiL_t)fcn; emu->xmm[0].d[0]=fn((void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (uintptr_t)R_RCX); } +void DFppiL(x64emu_t *emu, uintptr_t fcn) { DFppiL_t fn = (DFppiL_t)fcn; long double ld=fn((void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (uintptr_t)R_RCX); fpu_do_push(emu); ST0val = ld; } void lFEpip(x64emu_t *emu, uintptr_t fcn) { lFEpip_t fn = (lFEpip_t)fcn; R_RAX=(intptr_t)fn(emu, (void*)R_RDI, (int64_t)R_RSI, (void*)R_RDX); } void lFEppL(x64emu_t *emu, uintptr_t fcn) { lFEppL_t fn = (lFEppL_t)fcn; R_RAX=(intptr_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX); } void lFiipL(x64emu_t *emu, uintptr_t fcn) { lFiipL_t fn = (lFiipL_t)fcn; R_RAX=(intptr_t)fn((int64_t)R_RDI, (int64_t)R_RSI, (void*)R_RDX, (uintptr_t)R_RCX); } @@ -3402,7 +3404,6 @@ int isSimpleWrapper(wrapper_t fun) { if (fun == &uFpppi) return 1; if (fun == &uFpppp) return 1; if (fun == &UFpipp) return 1; - if (fun == &dFppiL) return -1; if (fun == &lFiipL) return 1; if (fun == &lFilpp) return 1; if (fun == &lFipiI) return 1; diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h index 14c1b718..dacff7a7 100644 --- a/src/wrapped/generated/wrapper.h +++ b/src/wrapped/generated/wrapper.h @@ -201,6 +201,7 @@ void dFdp(x64emu_t *emu, uintptr_t fnc); void dFLL(x64emu_t *emu, uintptr_t fnc); void dFpi(x64emu_t *emu, uintptr_t fnc); void dFpp(x64emu_t *emu, uintptr_t fnc); +void DFpp(x64emu_t *emu, uintptr_t fnc); void lFll(x64emu_t *emu, uintptr_t fnc); void lFpi(x64emu_t *emu, uintptr_t fnc); void lFpp(x64emu_t *emu, uintptr_t fnc); @@ -637,7 +638,7 @@ void uFppiu(x64emu_t *emu, uintptr_t fnc); void uFpppi(x64emu_t *emu, uintptr_t fnc); void uFpppp(x64emu_t *emu, uintptr_t fnc); void UFpipp(x64emu_t *emu, uintptr_t fnc); -void dFppiL(x64emu_t *emu, uintptr_t fnc); +void DFppiL(x64emu_t *emu, uintptr_t fnc); void lFEpip(x64emu_t *emu, uintptr_t fnc); void lFEppL(x64emu_t *emu, uintptr_t fnc); void lFiipL(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped/wrappedlibc_private.h b/src/wrapped/wrappedlibc_private.h index 580b6e98..1a4df882 100755 --- a/src/wrapped/wrappedlibc_private.h +++ b/src/wrapped/wrappedlibc_private.h @@ -1853,10 +1853,10 @@ GO(__strtok_r, pFppp) GOW(strtok_r, pFppp) //GO(__strtok_r_1c, GOW(strtol, lFppi) -//GO(strtold, +GO(strtold, DFpp) //GO(__strtold_internal, -GO(__strtold_l, dFppiL) -GOW(strtold_l, dFppiL) +GO(__strtold_l, DFppiL) +GOW(strtold_l, DFppiL) //GO(__strtold_nan, GO(__strtol_internal, lFppii) GO(__strtol_l, lFppi) |