diff options
| author | rajdakin <rajdakin@gmail.com> | 2024-11-06 21:52:34 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-06 21:52:34 +0100 |
| commit | 6af8d70cc1620bf8e7927ade2e42e4cea41384be (patch) | |
| tree | e2c63ee7ea18826ac3ddff5e3bbba67d72344062 /src/wrapped32/generated/wrapper32.c | |
| parent | 2dea11a9e3fed043e368d2e99067d69151c2e694 (diff) | |
| download | box64-6af8d70cc1620bf8e7927ade2e42e4cea41384be.tar.gz box64-6af8d70cc1620bf8e7927ade2e42e4cea41384be.zip | |
[WRAPPED32] Added an errno-aware calling convention (#2006)
Diffstat (limited to 'src/wrapped32/generated/wrapper32.c')
| -rw-r--r-- | src/wrapped32/generated/wrapper32.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wrapped32/generated/wrapper32.c b/src/wrapped32/generated/wrapper32.c index 2c15e1a5..7ff0b3db 100644 --- a/src/wrapped32/generated/wrapper32.c +++ b/src/wrapped32/generated/wrapper32.c @@ -1,6 +1,7 @@ /********************************************************************* * File automatically generated by rebuild_wrappers_32.py (v0.0.2.2) * *********************************************************************/ +#include <errno.h> #include <stdio.h> #include <stdlib.h> #include <stdint.h> @@ -117,6 +118,7 @@ typedef int32_t (*iFd_t)(double); typedef int32_t (*iFl_t)(intptr_t); typedef int32_t (*iFL_t)(uintptr_t); typedef int32_t (*iFp_t)(void*); +typedef int32_t (*iEp_t)(void*); typedef int32_t (*iFh_t)(uintptr_t); typedef int32_t (*iFS_t)(void*); typedef int32_t (*iFX_t)(void*); @@ -1629,6 +1631,7 @@ void iFd_32(x64emu_t *emu, uintptr_t fcn) { iFd_t fn = (iFd_t)fcn; R_EAX = fn(fr void iFl_32(x64emu_t *emu, uintptr_t fcn) { iFl_t fn = (iFl_t)fcn; R_EAX = fn(from_long(from_ptri(long_t, R_ESP + 4))); } void iFL_32(x64emu_t *emu, uintptr_t fcn) { iFL_t fn = (iFL_t)fcn; R_EAX = fn(from_ulong(from_ptri(ulong_t, R_ESP + 4))); } void iFp_32(x64emu_t *emu, uintptr_t fcn) { iFp_t fn = (iFp_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4)); } +void iEp_32(x64emu_t *emu, uintptr_t fcn) { iEp_t fn = (iEp_t)fcn; errno = emu->libc_err; R_EAX = fn(from_ptriv(R_ESP + 4)); emu->libc_err = errno; } void iFh_32(x64emu_t *emu, uintptr_t fcn) { iFh_t fn = (iFh_t)fcn; R_EAX = fn(from_hash(from_ptri(ptr_t, R_ESP + 4))); } void iFS_32(x64emu_t *emu, uintptr_t fcn) { iFS_t fn = (iFS_t)fcn; R_EAX = fn(io_convert32(from_ptriv(R_ESP + 4))); } void iFX_32(x64emu_t *emu, uintptr_t fcn) { iFX_t fn = (iFX_t)fcn; R_EAX = fn(getDisplay(from_ptriv(R_ESP + 4))); } |