diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-09-30 15:37:53 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-09-30 15:37:53 +0200 |
| commit | 2a0489a21cc84438a212ae2df363cffcb0be9b76 (patch) | |
| tree | a2bfa5f8e4928d7103e71b9cbf9c8edd73d10ff1 /src/wrapped32/generated | |
| parent | 0980c4438aa1688b6d356c49b6a09eef217d2924 (diff) | |
| download | box64-2a0489a21cc84438a212ae2df363cffcb0be9b76.tar.gz box64-2a0489a21cc84438a212ae2df363cffcb0be9b76.zip | |
[BOX32] Handling of BOX64_MAXCPU for 32bits apps
Diffstat (limited to 'src/wrapped32/generated')
| -rw-r--r-- | src/wrapped32/generated/functions_list.txt | 5 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrappedlibctypes32.h | 3 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrapper32.c | 4 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrapper32.h | 2 |
4 files changed, 10 insertions, 4 deletions
diff --git a/src/wrapped32/generated/functions_list.txt b/src/wrapped32/generated/functions_list.txt index d28a2962..953b588d 100644 --- a/src/wrapped32/generated/functions_list.txt +++ b/src/wrapped32/generated/functions_list.txt @@ -55,7 +55,6 @@ #() dFd -> dFd #() dFp -> dFp #() lFv -> lFv -#() lFi -> lFi #() lFu -> lFu #() lFl -> lFl #() lFp -> lFp @@ -188,6 +187,7 @@ #() dFdp -> dFdp #() dFll -> dFll #() dFpp -> dFpp +#() lFEi -> lFEi #() lFEV -> lFEV #() lFES -> lFES #() lFii -> lFii @@ -1177,6 +1177,9 @@ wrappedlibc: - uFS: - getwc - UFp: +- lFi: + - __sysconf + - sysconf - lFp: - atol - lFV: diff --git a/src/wrapped32/generated/wrappedlibctypes32.h b/src/wrapped32/generated/wrappedlibctypes32.h index f0538b7d..e43ab640 100644 --- a/src/wrapped32/generated/wrappedlibctypes32.h +++ b/src/wrapped32/generated/wrappedlibctypes32.h @@ -21,6 +21,7 @@ typedef int32_t (*iFO_t)(int32_t); typedef uint32_t (*uFp_t)(void*); typedef uint32_t (*uFS_t)(void*); typedef uint64_t (*UFp_t)(void*); +typedef intptr_t (*lFi_t)(int32_t); typedef intptr_t (*lFp_t)(void*); typedef intptr_t (*lFV_t)(...); typedef intptr_t (*lFS_t)(void*); @@ -103,6 +104,8 @@ typedef int32_t (*iFpLiLppp_t)(void*, uintptr_t, int32_t, uintptr_t, void*, void GO(__close_nocancel, iFi_t) \ GO(sysinfo, iFp_t) \ GO(getwc, uFS_t) \ + GO(__sysconf, lFi_t) \ + GO(sysconf, lFi_t) \ GO(atol, lFp_t) \ GO(ftell, lFS_t) \ GO(__ctype_b_loc, pFv_t) \ diff --git a/src/wrapped32/generated/wrapper32.c b/src/wrapped32/generated/wrapper32.c index 3ce09180..06924ed8 100644 --- a/src/wrapped32/generated/wrapper32.c +++ b/src/wrapped32/generated/wrapper32.c @@ -145,7 +145,6 @@ typedef double (*dFi_t)(int32_t); typedef double (*dFd_t)(double); typedef double (*dFp_t)(void*); typedef intptr_t (*lFv_t)(void); -typedef intptr_t (*lFi_t)(int32_t); typedef intptr_t (*lFu_t)(uint32_t); typedef intptr_t (*lFl_t)(intptr_t); typedef intptr_t (*lFp_t)(void*); @@ -278,6 +277,7 @@ typedef double (*dFdD_t)(double, long double); typedef double (*dFdp_t)(double, void*); typedef double (*dFll_t)(intptr_t, intptr_t); typedef double (*dFpp_t)(void*, void*); +typedef intptr_t (*lFEi_t)(x64emu_t*, int32_t); typedef intptr_t (*lFEV_t)(x64emu_t*, void*); typedef intptr_t (*lFES_t)(x64emu_t*, void*); typedef intptr_t (*lFii_t)(int32_t, int32_t); @@ -1235,7 +1235,6 @@ void dFi_32(x64emu_t *emu, uintptr_t fcn) { dFi_t fn = (dFi_t)fcn; double db = f void dFd_32(x64emu_t *emu, uintptr_t fcn) { dFd_t fn = (dFd_t)fcn; double db = fn(from_ptri(double, R_ESP + 4)); fpu_do_push(emu); ST0val = db; } void dFp_32(x64emu_t *emu, uintptr_t fcn) { dFp_t fn = (dFp_t)fcn; double db = fn(from_ptriv(R_ESP + 4)); fpu_do_push(emu); ST0val = db; } void lFv_32(x64emu_t *emu, uintptr_t fcn) { lFv_t fn = (lFv_t)fcn; R_EAX = to_long(fn()); } -void lFi_32(x64emu_t *emu, uintptr_t fcn) { lFi_t fn = (lFi_t)fcn; R_EAX = to_long(fn(from_ptri(int32_t, R_ESP + 4))); } void lFu_32(x64emu_t *emu, uintptr_t fcn) { lFu_t fn = (lFu_t)fcn; R_EAX = to_long(fn(from_ptri(uint32_t, R_ESP + 4))); } void lFl_32(x64emu_t *emu, uintptr_t fcn) { lFl_t fn = (lFl_t)fcn; R_EAX = to_long(fn(to_long(from_ptri(long_t, R_ESP + 4)))); } void lFp_32(x64emu_t *emu, uintptr_t fcn) { lFp_t fn = (lFp_t)fcn; R_EAX = to_long(fn(from_ptriv(R_ESP + 4))); } @@ -1368,6 +1367,7 @@ void dFdD_32(x64emu_t *emu, uintptr_t fcn) { dFdD_t fn = (dFdD_t)fcn; double db void dFdp_32(x64emu_t *emu, uintptr_t fcn) { dFdp_t fn = (dFdp_t)fcn; double db = fn(from_ptri(double, R_ESP + 4), from_ptriv(R_ESP + 12)); fpu_do_push(emu); ST0val = db; } void dFll_32(x64emu_t *emu, uintptr_t fcn) { dFll_t fn = (dFll_t)fcn; double db = fn(to_long(from_ptri(long_t, R_ESP + 4)), to_long(from_ptri(long_t, R_ESP + 8))); fpu_do_push(emu); ST0val = db; } void dFpp_32(x64emu_t *emu, uintptr_t fcn) { dFpp_t fn = (dFpp_t)fcn; double db = fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8)); fpu_do_push(emu); ST0val = db; } +void lFEi_32(x64emu_t *emu, uintptr_t fcn) { lFEi_t fn = (lFEi_t)fcn; R_EAX = to_long(fn(emu, from_ptri(int32_t, R_ESP + 4))); } void lFEV_32(x64emu_t *emu, uintptr_t fcn) { lFEV_t fn = (lFEV_t)fcn; R_EAX = to_long(fn(emu, from_ptrv(R_ESP + 4))); } void lFES_32(x64emu_t *emu, uintptr_t fcn) { lFES_t fn = (lFES_t)fcn; R_EAX = to_long(fn(emu, io_convert32(from_ptriv(R_ESP + 4)))); } void lFii_32(x64emu_t *emu, uintptr_t fcn) { lFii_t fn = (lFii_t)fcn; R_EAX = to_long(fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8))); } diff --git a/src/wrapped32/generated/wrapper32.h b/src/wrapped32/generated/wrapper32.h index cb95d1d2..50f7f756 100644 --- a/src/wrapped32/generated/wrapper32.h +++ b/src/wrapped32/generated/wrapper32.h @@ -96,7 +96,6 @@ void dFi_32(x64emu_t *emu, uintptr_t fnc); void dFd_32(x64emu_t *emu, uintptr_t fnc); void dFp_32(x64emu_t *emu, uintptr_t fnc); void lFv_32(x64emu_t *emu, uintptr_t fnc); -void lFi_32(x64emu_t *emu, uintptr_t fnc); void lFu_32(x64emu_t *emu, uintptr_t fnc); void lFl_32(x64emu_t *emu, uintptr_t fnc); void lFp_32(x64emu_t *emu, uintptr_t fnc); @@ -229,6 +228,7 @@ void dFdD_32(x64emu_t *emu, uintptr_t fnc); void dFdp_32(x64emu_t *emu, uintptr_t fnc); void dFll_32(x64emu_t *emu, uintptr_t fnc); void dFpp_32(x64emu_t *emu, uintptr_t fnc); +void lFEi_32(x64emu_t *emu, uintptr_t fnc); void lFEV_32(x64emu_t *emu, uintptr_t fnc); void lFES_32(x64emu_t *emu, uintptr_t fnc); void lFii_32(x64emu_t *emu, uintptr_t fnc); |