diff options
| author | Marko Havu <marko.havu@aalto.fi> | 2022-04-04 19:47:11 +0300 |
|---|---|---|
| committer | Marko Havu <marko.havu@aalto.fi> | 2022-04-04 19:47:11 +0300 |
| commit | 83f97f9b70b9da1b54ea2abbd9501f000f90956e (patch) | |
| tree | 20fc0a5bbdf12ef49a3c837645ead8aaca862fa5 /src | |
| parent | ead3217bf47f328ee7cce78a3080112f0f7a804b (diff) | |
| download | box64-83f97f9b70b9da1b54ea2abbd9501f000f90956e.tar.gz box64-83f97f9b70b9da1b54ea2abbd9501f000f90956e.zip | |
Added remaining __strto*_internal libc wrapped functions
Diffstat (limited to 'src')
| -rw-r--r-- | src/wrapped/generated/functions_list.txt | 4 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.c | 11 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.h | 4 | ||||
| -rwxr-xr-x | src/wrapped/wrappedlibc_private.h | 10 |
4 files changed, 24 insertions, 5 deletions
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index a95b0fef..fd3b6a9d 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -444,6 +444,7 @@ #() fFull #() fFfff #() fFffp +#() fFppi #() fFppL #() fFppp #() dFddd @@ -451,6 +452,7 @@ #() dFpdd #() dFppi #() dFppp +#() DFppi #() DFppp #() lFili #() lFilL @@ -790,6 +792,7 @@ #() iFpppp #() IFEpIi #() IFpIip +#() IFppii #() IFppip #() IFpppp #() IFSIii @@ -811,6 +814,7 @@ #() uFpppu #() uFpppp #() UFpipp +#() UFppii #() UFppip #() UFpppp #() dFpppp diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c index df58b8b5..60f9840c 100644 --- a/src/wrapped/generated/wrapper.c +++ b/src/wrapped/generated/wrapper.c @@ -478,6 +478,7 @@ typedef uint64_t (*UFppu_t)(void*, void*, uint64_t); typedef float (*fFull_t)(uint64_t, intptr_t, intptr_t); typedef float (*fFfff_t)(float, float, float); typedef float (*fFffp_t)(float, float, void*); +typedef float (*fFppi_t)(void*, void*, int64_t); typedef float (*fFppL_t)(void*, void*, uintptr_t); typedef float (*fFppp_t)(void*, void*, void*); typedef double (*dFddd_t)(double, double, double); @@ -485,6 +486,7 @@ typedef double (*dFddp_t)(double, double, void*); typedef double (*dFpdd_t)(void*, double, double); typedef double (*dFppi_t)(void*, void*, int64_t); typedef double (*dFppp_t)(void*, void*, void*); +typedef long double (*DFppi_t)(void*, void*, int64_t); typedef long double (*DFppp_t)(void*, void*, void*); typedef intptr_t (*lFili_t)(int64_t, intptr_t, int64_t); typedef intptr_t (*lFilL_t)(int64_t, intptr_t, uintptr_t); @@ -824,6 +826,7 @@ typedef int64_t (*iFpppL_t)(void*, void*, void*, uintptr_t); typedef int64_t (*iFpppp_t)(void*, void*, void*, void*); typedef int64_t (*IFEpIi_t)(x64emu_t*, void*, int64_t, int64_t); typedef int64_t (*IFpIip_t)(void*, int64_t, int64_t, void*); +typedef int64_t (*IFppii_t)(void*, void*, int64_t, int64_t); typedef int64_t (*IFppip_t)(void*, void*, int64_t, void*); typedef int64_t (*IFpppp_t)(void*, void*, void*, void*); typedef int64_t (*IFSIii_t)(void*, int64_t, int64_t, int64_t); @@ -845,6 +848,7 @@ typedef uint64_t (*uFpppi_t)(void*, void*, void*, int64_t); typedef uint64_t (*uFpppu_t)(void*, void*, void*, uint64_t); typedef uint64_t (*uFpppp_t)(void*, void*, void*, void*); typedef uint64_t (*UFpipp_t)(void*, int64_t, void*, void*); +typedef uint64_t (*UFppii_t)(void*, void*, int64_t, int64_t); typedef uint64_t (*UFppip_t)(void*, void*, int64_t, void*); typedef uint64_t (*UFpppp_t)(void*, void*, void*, void*); typedef double (*dFpppp_t)(void*, void*, void*, void*); @@ -2541,6 +2545,7 @@ void UFppu(x64emu_t *emu, uintptr_t fcn) { UFppu_t fn = (UFppu_t)fcn; R_RAX=fn(( void fFull(x64emu_t *emu, uintptr_t fcn) { fFull_t fn = (fFull_t)fcn; emu->xmm[0].f[0]=fn((uint64_t)R_RDI, (intptr_t)R_RSI, (intptr_t)R_RDX); } void fFfff(x64emu_t *emu, uintptr_t fcn) { fFfff_t fn = (fFfff_t)fcn; emu->xmm[0].f[0]=fn(emu->xmm[0].f[0], emu->xmm[1].f[0], emu->xmm[2].f[0]); } void fFffp(x64emu_t *emu, uintptr_t fcn) { fFffp_t fn = (fFffp_t)fcn; emu->xmm[0].f[0]=fn(emu->xmm[0].f[0], emu->xmm[1].f[0], (void*)R_RDI); } +void fFppi(x64emu_t *emu, uintptr_t fcn) { fFppi_t fn = (fFppi_t)fcn; emu->xmm[0].f[0]=fn((void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX); } void fFppL(x64emu_t *emu, uintptr_t fcn) { fFppL_t fn = (fFppL_t)fcn; emu->xmm[0].f[0]=fn((void*)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX); } void fFppp(x64emu_t *emu, uintptr_t fcn) { fFppp_t fn = (fFppp_t)fcn; emu->xmm[0].f[0]=fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX); } void dFddd(x64emu_t *emu, uintptr_t fcn) { dFddd_t fn = (dFddd_t)fcn; emu->xmm[0].d[0]=fn(emu->xmm[0].d[0], emu->xmm[1].d[0], emu->xmm[2].d[0]); } @@ -2548,6 +2553,7 @@ void dFddp(x64emu_t *emu, uintptr_t fcn) { dFddp_t fn = (dFddp_t)fcn; emu->xmm[0 void dFpdd(x64emu_t *emu, uintptr_t fcn) { dFpdd_t fn = (dFpdd_t)fcn; emu->xmm[0].d[0]=fn((void*)R_RDI, emu->xmm[0].d[0], emu->xmm[1].d[0]); } void dFppi(x64emu_t *emu, uintptr_t fcn) { dFppi_t fn = (dFppi_t)fcn; emu->xmm[0].d[0]=fn((void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX); } void dFppp(x64emu_t *emu, uintptr_t fcn) { dFppp_t fn = (dFppp_t)fcn; emu->xmm[0].d[0]=fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX); } +void DFppi(x64emu_t *emu, uintptr_t fcn) { DFppi_t fn = (DFppi_t)fcn; long double ld=fn((void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX); fpu_do_push(emu); ST0val = ld; } void DFppp(x64emu_t *emu, uintptr_t fcn) { DFppp_t fn = (DFppp_t)fcn; long double ld=fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX); fpu_do_push(emu); ST0val = ld; } void lFili(x64emu_t *emu, uintptr_t fcn) { lFili_t fn = (lFili_t)fcn; R_RAX=(intptr_t)fn((int64_t)R_RDI, (intptr_t)R_RSI, (int64_t)R_RDX); } void lFilL(x64emu_t *emu, uintptr_t fcn) { lFilL_t fn = (lFilL_t)fcn; R_RAX=(intptr_t)fn((int64_t)R_RDI, (intptr_t)R_RSI, (uintptr_t)R_RDX); } @@ -2887,6 +2893,7 @@ void iFpppL(x64emu_t *emu, uintptr_t fcn) { iFpppL_t fn = (iFpppL_t)fcn; R_RAX=( void iFpppp(x64emu_t *emu, uintptr_t fcn) { iFpppp_t fn = (iFpppp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX); } void IFEpIi(x64emu_t *emu, uintptr_t fcn) { IFEpIi_t fn = (IFEpIi_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX); } void IFpIip(x64emu_t *emu, uintptr_t fcn) { IFpIip_t fn = (IFpIip_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (void*)R_RCX); } +void IFppii(x64emu_t *emu, uintptr_t fcn) { IFppii_t fn = (IFppii_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX); } void IFppip(x64emu_t *emu, uintptr_t fcn) { IFppip_t fn = (IFppip_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (void*)R_RCX); } void IFpppp(x64emu_t *emu, uintptr_t fcn) { IFpppp_t fn = (IFpppp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX); } void IFSIii(x64emu_t *emu, uintptr_t fcn) { IFSIii_t fn = (IFSIii_t)fcn; R_RAX=(int64_t)fn(io_convert((void*)R_RDI), (int64_t)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX); } @@ -2908,6 +2915,7 @@ void uFpppi(x64emu_t *emu, uintptr_t fcn) { uFpppi_t fn = (uFpppi_t)fcn; R_RAX=( void uFpppu(x64emu_t *emu, uintptr_t fcn) { uFpppu_t fn = (uFpppu_t)fcn; R_RAX=(uint64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint64_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 UFppii(x64emu_t *emu, uintptr_t fcn) { UFppii_t fn = (UFppii_t)fcn; R_RAX=fn((void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX); } void UFppip(x64emu_t *emu, uintptr_t fcn) { UFppip_t fn = (UFppip_t)fcn; R_RAX=fn((void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (void*)R_RCX); } void UFpppp(x64emu_t *emu, uintptr_t fcn) { UFpppp_t fn = (UFpppp_t)fcn; R_RAX=fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX); } void dFpppp(x64emu_t *emu, uintptr_t fcn) { dFpppp_t fn = (dFpppp_t)fcn; emu->xmm[0].d[0]=fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX); } @@ -4552,6 +4560,7 @@ int isSimpleWrapper(wrapper_t fun) { if (fun == &fFull) return -1; if (fun == &fFfff) return -4; if (fun == &fFffp) return -3; + if (fun == &fFppi) return -1; if (fun == &fFppL) return -1; if (fun == &fFppp) return -1; if (fun == &dFddd) return -4; @@ -4846,6 +4855,7 @@ int isSimpleWrapper(wrapper_t fun) { if (fun == &iFpppL) return 1; if (fun == &iFpppp) return 1; if (fun == &IFpIip) return 1; + if (fun == &IFppii) return 1; if (fun == &IFppip) return 1; if (fun == &IFpppp) return 1; if (fun == &uFifff) return 4; @@ -4862,6 +4872,7 @@ int isSimpleWrapper(wrapper_t fun) { if (fun == &uFpppu) return 1; if (fun == &uFpppp) return 1; if (fun == &UFpipp) return 1; + if (fun == &UFppii) return 1; if (fun == &UFppip) return 1; if (fun == &UFpppp) return 1; if (fun == &dFpppp) return -1; diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h index 8930f2c9..3bde055b 100644 --- a/src/wrapped/generated/wrapper.h +++ b/src/wrapped/generated/wrapper.h @@ -477,6 +477,7 @@ void UFppu(x64emu_t *emu, uintptr_t fnc); void fFull(x64emu_t *emu, uintptr_t fnc); void fFfff(x64emu_t *emu, uintptr_t fnc); void fFffp(x64emu_t *emu, uintptr_t fnc); +void fFppi(x64emu_t *emu, uintptr_t fnc); void fFppL(x64emu_t *emu, uintptr_t fnc); void fFppp(x64emu_t *emu, uintptr_t fnc); void dFddd(x64emu_t *emu, uintptr_t fnc); @@ -484,6 +485,7 @@ void dFddp(x64emu_t *emu, uintptr_t fnc); void dFpdd(x64emu_t *emu, uintptr_t fnc); void dFppi(x64emu_t *emu, uintptr_t fnc); void dFppp(x64emu_t *emu, uintptr_t fnc); +void DFppi(x64emu_t *emu, uintptr_t fnc); void DFppp(x64emu_t *emu, uintptr_t fnc); void lFili(x64emu_t *emu, uintptr_t fnc); void lFilL(x64emu_t *emu, uintptr_t fnc); @@ -823,6 +825,7 @@ void iFpppL(x64emu_t *emu, uintptr_t fnc); void iFpppp(x64emu_t *emu, uintptr_t fnc); void IFEpIi(x64emu_t *emu, uintptr_t fnc); void IFpIip(x64emu_t *emu, uintptr_t fnc); +void IFppii(x64emu_t *emu, uintptr_t fnc); void IFppip(x64emu_t *emu, uintptr_t fnc); void IFpppp(x64emu_t *emu, uintptr_t fnc); void IFSIii(x64emu_t *emu, uintptr_t fnc); @@ -844,6 +847,7 @@ void uFpppi(x64emu_t *emu, uintptr_t fnc); void uFpppu(x64emu_t *emu, uintptr_t fnc); void uFpppp(x64emu_t *emu, uintptr_t fnc); void UFpipp(x64emu_t *emu, uintptr_t fnc); +void UFppii(x64emu_t *emu, uintptr_t fnc); void UFppip(x64emu_t *emu, uintptr_t fnc); void UFpppp(x64emu_t *emu, uintptr_t fnc); void dFpppp(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped/wrappedlibc_private.h b/src/wrapped/wrappedlibc_private.h index eed71f36..b852f939 100755 --- a/src/wrapped/wrappedlibc_private.h +++ b/src/wrapped/wrappedlibc_private.h @@ -1836,7 +1836,7 @@ GOW(strtof64, dFpp) //GOW(strtof64_l, dFpp!) GOW(strtof64x, DFpp) //GOW(strtof64x_l, DFpp!) -//GO(__strtof_internal, +GO(__strtof_internal, fFppi) GO(__strtof_l, fFppL) GOW(strtof_l, fFppp) //GO(__strtof_nan, @@ -1847,7 +1847,7 @@ GOW(strtok_r, pFppp) //GO(__strtok_r_1c, GOW(strtol, lFppi) GO(strtold, DFpp) -//GO(__strtold_internal, +GO(__strtold_internal, DFppi) GO(__strtold_l, DFppp) GOW(strtold_l, DFppp) //GO(__strtold_nan, @@ -1855,7 +1855,7 @@ GO(__strtol_internal, lFppii) GO(__strtol_l, lFppi) GOW(strtol_l, lFppip) GOW(strtoll, IFppi) -//GO(__strtoll_internal, +GO(__strtoll_internal, IFppii) GOW(__strtoll_l, IFppip) GOW(strtoll_l, IFppip) GOW(strtoq, IFppi) @@ -1864,7 +1864,7 @@ GO(__strtoul_internal, LFppii) //GO(__strtoul_l, GOW(strtoul_l, LFppip) GOW(strtoull, UFppi) -//GO(__strtoull_internal, +GO(__strtoull_internal, UFppii) GOW(__strtoull_l, LFppip) GOW(strtoull_l, UFppip) GO(strtoumax, LFppi) @@ -2303,4 +2303,4 @@ DATAM(program_invocation_short_name, sizeof(void*)) DATAM(__libc_single_threaded, 1) -GO(iconvctl, iFlip) \ No newline at end of file +GO(iconvctl, iFlip) |