Use the correct define, enhance files

Enhances CMakeLists and the Python wrapper generator script
This commit is contained in:
rajdakin 2019-06-22 17:46:46 +02:00
parent b59e38519b
commit 03277cbf42
5 changed files with 49 additions and 62 deletions

View File

@ -122,8 +122,7 @@ set(WRAPPEDS
"${CMAKE_HOME_DIRECTORY}/src/wrappedldlinux.c"
)
set(WRAPPER "${CMAKE_HOME_DIRECTORY}/src/wrapper.c" "${CMAKE_HOME_DIRECTORY}/src/wrapper.h")
add_custom_command(OUTPUT ${WRAPPER} COMMAND "${CMAKE_HOME_DIRECTORY}/rebuild_wrappers.py" "${CMAKE_HOME_DIRECTORY}" MAIN_DEPENDENCY "${CMAKE_HOME_DIRECTORY}/rebuild_wrappers.py" DEPENDS ${WRAPPEDS})
set_source_files_properties(${WRAPPER} PROPERTIES GENERATED TRUE)
add_custom_command(OUTPUT ${WRAPPER} COMMAND "${CMAKE_HOME_DIRECTORY}/rebuild_wrappers.py" "${CMAKE_HOME_DIRECTORY}" "PANDORA" ${PANDORA} "HAVE_LD80BITS" ${LD80BITS} "NOALIGN" ${NOALIGN} "HAVE_TRACE" ${HAVE_TRACE} "USE_FLOAT" ${USE_FLOAT} MAIN_DEPENDENCY "${CMAKE_HOME_DIRECTORY}/rebuild_wrappers.py" DEPENDS ${WRAPPEDS} BYPRODUCTS ${WRAPPER})
if(USE_FLOAT)
set(BOX86 box86f)

View File

@ -15,7 +15,7 @@ def splitchar(s):
ret.append(values.index(c))
return ret
def main(root):
def main(root, defines):
# Initialize variables: gbl for all values, vals for file-per-file values, redirects for redirections
gbl = []
vals = {}
@ -25,11 +25,38 @@ def main(root):
for filepath in glob.glob(os.path.join(root, "src", "wrapped*_private.h")):
filename = filepath.split("/")[-1]
locval = []
readline = True
with open(filepath, 'r') as file:
for line in file:
ln = line.strip()
# If the line is a `#' line (#ifdef LD80BITS/#ifndef LD80BITS/header)
if ln.startswith("#"):
preproc_cmd = ln[1:].strip()
try:
if preproc_cmd.startswith("if defined(GO)"):
continue #if defined(GO) && defined(GOM)...
elif preproc_cmd.startswith("if !(defined(GO)"):
continue #if !(defined(GO) && defined(GOM)...)
elif preproc_cmd.startswith("error"):
continue #error meh!
elif preproc_cmd.startswith("endif"):
readline = True
elif preproc_cmd.startswith("ifdef"):
readline = defines[preproc_cmd[5:].strip()]
elif preproc_cmd.startswith("ifndef"):
readline = not defines[preproc_cmd[6:].strip()]
elif preproc_cmd.startswith("else"):
readline = not readline
else:
raise NotImplementedError("Unknown preprocessor directive: {0} ({1}:{2})".format(
preproc_cmd.split(" ")[0], filename, line[:-1]
))
except KeyError as k:
raise NotImplementedError("Unknown key: {0} ({1}:{2})".format(
k.args[0], filename, line[:-1]
))
# If the line is a `GO...' line (GO/GOM/GO2/...)...
if ln.startswith("GO"):
elif ln.startswith("GO") and readline:
# ... then look at the second parameter of the line
ln = ln.split(",")[1].split(")")[0].strip()
if any(c not in values for c in ln[2:]) or (('v' in ln[2:]) and (len(ln) > 3)):
@ -37,7 +64,7 @@ def main(root):
# This needs more work
acceptables = ['v', 'o', '0', '1'] + values
if any(c not in acceptables for c in ln[2:]):
raise NotImplementedError("{0} ({1})".format(ln[2:], line))
raise NotImplementedError("{0} ({1}:{2})".format(ln[2:], filename, line[-1]))
# Ok, this is acceptable: there is 0, 1, stdout and void
ln = (ln
.replace("v", "") # void -> nothing
@ -229,6 +256,9 @@ typedef void (*wrapper_t)(x86emu_t* emu, uintptr_t fnc);
return 0
if __name__ == '__main__':
if main(sys.argv[1]) != 0:
defines = {}
for i in range(2, len(sys.argv), 2):
defines[sys.argv[i]] = sys.argv[i + 1] == "TRUE"
if main(sys.argv[1], defines) != 0:
exit(2)
exit(0)

View File

@ -8,12 +8,12 @@ GOW(acosh, dFd)
GOW(acoshf, fFf)
// __acoshf_finite
// __acosh_finite
#ifdef LD80BITS
#ifdef HAVE_LD80BITS
GOW(acoshl, DFD)
#else
GO2(acoshl, LFL, acosh)
#endif
#ifdef LD80BITS
#ifdef HAVE_LD80BITS
GOW(acpsl, DFD)
#else
GO2(acosl, LFL, acos)
@ -24,12 +24,12 @@ GO(__asinf_finite, fFf)
GO(__asin_finite, dFd)
GOW(asinh, dFd)
GOW(asinhf, fFf)
#ifdef LD80BITS
#ifdef HAVE_LD80BITS
GOW(asinhl, DFD)
#else
GO2(asinhl, LFL, asinh)
#endif
#ifdef LD80BITS
#ifdef HAVE_LD80BITS
GOW(asinl, DFD)
#else
GO2(asinl, LFL, asin)
@ -45,7 +45,7 @@ GOW(atanh, dFd)
GOW(atanhf, fFf)
// __atanhf_finite
// __atanh_finite
#ifdef LD80BITS
#ifdef HAVE_LD80BITS
GOW(atanhl, DFD)
#else
GO2(atanhl, LFL, atanh)
@ -77,7 +77,7 @@ GO2(atanhl, LFL, atanh)
// catanl // Weak
GOW(cbrt, dFd)
GOW(cbrtf, fFf)
#ifdef LD80BITS
#ifdef HAVE_LD80BITS
GOW(cbrtl, DFD)
#else
GO2(cbrtl, LFL, cbrt)
@ -151,13 +151,13 @@ GOS(csqrt, pFpdd)
GOW(erf, dFd)
GOW(erfc, dFd)
GOW(erfcf, fFf)
#ifdef LD80BITS
#ifdef HAVE_LD80BITS
GOW(erfcl, DFD)
#else
GO2(erfcl, LFL, erfc)
#endif
GOW(erff, fFf)
#ifdef LD80BITS
#ifdef HAVE_LD80BITS
GOW(erfl, DFD)
#else
GO2(erfl, LFL, erf)
@ -222,7 +222,7 @@ GOW(fmod, dFdd)
GOW(fmodf, fFff)
// __fmodf_finite
// __fmod_finite
#ifdef LD80BITS
#ifdef HAVE_LD80BITS
GOW(fmodl, DFDD)
#else
GO2(fmodl, LFLL, fmod)
@ -231,7 +231,7 @@ GO(__fpclassify, iFd)
GO(__fpclassifyf, iFf)
GOW(frexp, dFdp)
GOW(frexpf, fFfp)
#ifdef LD80BITS
#ifdef HAVE_LD80BITS
GOW(frexpl, DFDp)
#else
GO2(frexpl, LFLp, frexp)
@ -276,12 +276,12 @@ GOW(lgamma, dFd)
GOW(lgammaf, fFf)
GOW(lgammaf_r, fFfp)
// __lgammaf_r_finite
#ifdef LD80BITS
#ifdef HAVE_LD80BITS
GOW(lgammal, DFD)
#else
GO2(lgammal, LFL, lgamma)
#endif
#ifdef LD80BITS
#ifdef HAVE_LD80BITS
GOW(lgammal_r, DFDp)
#else
GO2(lgammal_r, LFLp, lgamma_r)
@ -345,7 +345,7 @@ GOW(pow, dFdd)
GOW(powf, fFff)
GO(__powf_finite, fFff)
GO(__pow_finite, dFdd)
#ifdef LD80BITS
#ifdef HAVE_LD80BITS
GOW(powl, DFDD)
#else
GO2(powl, LFLL, pow)
@ -405,7 +405,7 @@ GOW(tanhf, fFf)
// tanl // Weak
GOW(tgamma, dFd)
GOW(tgammaf, fFf)
#ifdef LD80BITS
#ifdef HAVE_LD80BITS
GOW(tgammal, DFD)
#else
GO2(tgammal, LFL, tgamma)

View File

@ -58,7 +58,6 @@ typedef double (*dFi_t)(int32_t);
typedef double (*dFd_t)(double);
typedef double (*dFp_t)(void*);
typedef long double (*DFD_t)(long double);
typedef double (*LFL_t)(double);
typedef void* (*pFE_t)(x86emu_t*);
typedef void* (*pFv_t)(void);
typedef void* (*pFi_t)(int32_t);
@ -102,7 +101,6 @@ typedef int32_t (*iFpU_t)(void*, uint64_t);
typedef int32_t (*iFpd_t)(void*, double);
typedef int32_t (*iFpp_t)(void*, void*);
typedef int32_t (*iFpV_t)(void*, void*);
typedef int64_t (*IFEp_t)(x86emu_t*, void*);
typedef int64_t (*IFpi_t)(void*, int32_t);
typedef int64_t (*IFpu_t)(void*, uint32_t);
typedef uint8_t (*CFui_t)(uint32_t, int32_t);
@ -123,7 +121,6 @@ typedef float (*fFfi_t)(float, int32_t);
typedef float (*fFff_t)(float, float);
typedef float (*fFfp_t)(float, void*);
typedef float (*fFpp_t)(void*, void*);
typedef double (*dFEp_t)(x86emu_t*, void*);
typedef double (*dFuu_t)(uint32_t, uint32_t);
typedef double (*dFdi_t)(double, int32_t);
typedef double (*dFdd_t)(double, double);
@ -133,8 +130,6 @@ typedef double (*dFpp_t)(void*, void*);
typedef long double (*DFDD_t)(long double, long double);
typedef long double (*DFDp_t)(long double, void*);
typedef long double (*DFpp_t)(void*, void*);
typedef double (*LFLL_t)(double, double);
typedef double (*LFLp_t)(double, void*);
typedef void* (*pFEp_t)(x86emu_t*, void*);
typedef void* (*pFii_t)(int32_t, int32_t);
typedef void* (*pFip_t)(int32_t, void*);
@ -193,8 +188,6 @@ typedef void (*vFppp_t)(void*, void*, void*);
typedef void (*vGppp_t)(void*, void*, void*);
typedef int32_t (*iFEup_t)(x86emu_t*, uint32_t, void*);
typedef int32_t (*iFEpi_t)(x86emu_t*, void*, int32_t);
typedef int32_t (*iFEpI_t)(x86emu_t*, void*, int64_t);
typedef int32_t (*iFEpd_t)(x86emu_t*, void*, double);
typedef int32_t (*iFEpp_t)(x86emu_t*, void*, void*);
typedef int32_t (*iFiii_t)(int32_t, int32_t, int32_t);
typedef int32_t (*iFiiu_t)(int32_t, int32_t, uint32_t);
@ -227,7 +220,6 @@ typedef int32_t (*iFppu_t)(void*, void*, uint32_t);
typedef int32_t (*iFppd_t)(void*, void*, double);
typedef int32_t (*iFppp_t)(void*, void*, void*);
typedef int32_t (*iFppV_t)(void*, void*, void*);
typedef int64_t (*IFEpi_t)(x86emu_t*, void*, int32_t);
typedef int64_t (*IFiIi_t)(int32_t, int64_t, int32_t);
typedef int64_t (*IFpIi_t)(void*, int64_t, int32_t);
typedef int64_t (*IFppi_t)(void*, void*, int32_t);
@ -253,7 +245,6 @@ typedef uint64_t (*UFppi_t)(void*, void*, int32_t);
typedef float (*fFuii_t)(uint32_t, int32_t, int32_t);
typedef float (*fFppu_t)(void*, void*, uint32_t);
typedef float (*fFppp_t)(void*, void*, void*);
typedef double (*dFEpi_t)(x86emu_t*, void*, int32_t);
typedef double (*dFppu_t)(void*, void*, uint32_t);
typedef double (*dFppp_t)(void*, void*, void*);
typedef long double (*DFppu_t)(void*, void*, uint32_t);
@ -491,13 +482,9 @@ typedef void (*vFppiip_t)(void*, void*, int32_t, int32_t, void*);
typedef void (*vFpppii_t)(void*, void*, void*, int32_t, int32_t);
typedef void (*vFppppi_t)(void*, void*, void*, void*, int32_t);
typedef void (*vFppppp_t)(void*, void*, void*, void*, void*);
typedef int32_t (*iFEiiip_t)(x86emu_t*, int32_t, int32_t, int32_t, void*);
typedef int32_t (*iFEipii_t)(x86emu_t*, int32_t, void*, int32_t, int32_t);
typedef int32_t (*iFEippp_t)(x86emu_t*, int32_t, void*, void*, void*);
typedef int32_t (*iFEpipp_t)(x86emu_t*, void*, int32_t, void*, void*);
typedef int32_t (*iFEpupV_t)(x86emu_t*, void*, uint32_t, void*, void*);
typedef int32_t (*iFEppip_t)(x86emu_t*, void*, void*, int32_t, void*);
typedef int32_t (*iFEpppi_t)(x86emu_t*, void*, void*, void*, int32_t);
typedef int32_t (*iFEpppp_t)(x86emu_t*, void*, void*, void*, void*);
typedef int32_t (*iFEpppV_t)(x86emu_t*, void*, void*, void*, void*);
typedef int32_t (*iFEppVV_t)(x86emu_t*, void*, void*, void*, void*);
@ -743,7 +730,6 @@ typedef void (*vFppiiipii_t)(void*, void*, int32_t, int32_t, int32_t, void*, int
typedef void (*vFppippppi_t)(void*, void*, int32_t, void*, void*, void*, void*, int32_t);
typedef void (*vFppppiipi_t)(void*, void*, void*, void*, int32_t, int32_t, void*, int32_t);
typedef int32_t (*iFEpippppp_t)(x86emu_t*, void*, int32_t, void*, void*, void*, void*, void*);
typedef int32_t (*iFEppiiiip_t)(x86emu_t*, void*, void*, int32_t, int32_t, int32_t, int32_t, void*);
typedef int32_t (*iFiiiiiiip_t)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, void*);
typedef int32_t (*iFiiippppp_t)(int32_t, int32_t, int32_t, void*, void*, void*, void*, void*);
typedef int32_t (*iFiiuuuuuu_t)(int32_t, int32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t);
@ -887,7 +873,6 @@ void dFi(x86emu_t *emu, uintptr_t fcn) { dFi_t fn = (dFi_t)fcn; double db=fn(*(i
void dFd(x86emu_t *emu, uintptr_t fcn) { dFd_t fn = (dFd_t)fcn; double db=fn(*(double*)(R_ESP + 4)); fpu_do_push(emu); ST0val = db; }
void dFp(x86emu_t *emu, uintptr_t fcn) { dFp_t fn = (dFp_t)fcn; double db=fn(*(void**)(R_ESP + 4)); fpu_do_push(emu); ST0val = db; }
void DFD(x86emu_t *emu, uintptr_t fcn) { DFD_t fn = (DFD_t)fcn; long double ld=fn(*(long double*)(R_ESP + 4)); fpu_do_push(emu); ST0val = ld; }
void LFL(x86emu_t *emu, uintptr_t fcn) { LFL_t fn = (LFL_t)fcn; double db=fn(FromLD((void*)(R_ESP + 4))); fpu_do_push(emu); ST0val = db; }
void pFE(x86emu_t *emu, uintptr_t fcn) { pFE_t fn = (pFE_t)fcn; R_EAX=(uintptr_t)fn(emu); }
void pFv(x86emu_t *emu, uintptr_t fcn) { pFv_t fn = (pFv_t)fcn; R_EAX=(uintptr_t)fn(); }
void pFi(x86emu_t *emu, uintptr_t fcn) { pFi_t fn = (pFi_t)fcn; R_EAX=(uintptr_t)fn(*(int32_t*)(R_ESP + 4)); }
@ -931,7 +916,6 @@ void iFpU(x86emu_t *emu, uintptr_t fcn) { iFpU_t fn = (iFpU_t)fcn; R_EAX=fn(*(vo
void iFpd(x86emu_t *emu, uintptr_t fcn) { iFpd_t fn = (iFpd_t)fcn; R_EAX=fn(*(void**)(R_ESP + 4), *(double*)(R_ESP + 8)); }
void iFpp(x86emu_t *emu, uintptr_t fcn) { iFpp_t fn = (iFpp_t)fcn; R_EAX=fn(*(void**)(R_ESP + 4), *(void**)(R_ESP + 8)); }
void iFpV(x86emu_t *emu, uintptr_t fcn) { iFpV_t fn = (iFpV_t)fcn; R_EAX=fn(*(void**)(R_ESP + 4), (void*)(R_ESP + 8)); }
void IFEp(x86emu_t *emu, uintptr_t fcn) { IFEp_t fn = (IFEp_t)fcn; ui64_t r; r.i=fn(emu, *(void**)(R_ESP + 4)); R_EAX=r.d[0]; R_EDX=r.d[1]; }
void IFpi(x86emu_t *emu, uintptr_t fcn) { IFpi_t fn = (IFpi_t)fcn; ui64_t r; r.i=fn(*(void**)(R_ESP + 4), *(int32_t*)(R_ESP + 8)); R_EAX=r.d[0]; R_EDX=r.d[1]; }
void IFpu(x86emu_t *emu, uintptr_t fcn) { IFpu_t fn = (IFpu_t)fcn; ui64_t r; r.i=fn(*(void**)(R_ESP + 4), *(uint32_t*)(R_ESP + 8)); R_EAX=r.d[0]; R_EDX=r.d[1]; }
void CFui(x86emu_t *emu, uintptr_t fcn) { CFui_t fn = (CFui_t)fcn; R_EAX=(unsigned char)fn(*(uint32_t*)(R_ESP + 4), *(int32_t*)(R_ESP + 8)); }
@ -952,7 +936,6 @@ void fFfi(x86emu_t *emu, uintptr_t fcn) { fFfi_t fn = (fFfi_t)fcn; float fl=fn(*
void fFff(x86emu_t *emu, uintptr_t fcn) { fFff_t fn = (fFff_t)fcn; float fl=fn(*(float*)(R_ESP + 4), *(float*)(R_ESP + 8)); fpu_do_push(emu); ST0val = fl; }
void fFfp(x86emu_t *emu, uintptr_t fcn) { fFfp_t fn = (fFfp_t)fcn; float fl=fn(*(float*)(R_ESP + 4), *(void**)(R_ESP + 8)); fpu_do_push(emu); ST0val = fl; }
void fFpp(x86emu_t *emu, uintptr_t fcn) { fFpp_t fn = (fFpp_t)fcn; float fl=fn(*(void**)(R_ESP + 4), *(void**)(R_ESP + 8)); fpu_do_push(emu); ST0val = fl; }
void dFEp(x86emu_t *emu, uintptr_t fcn) { dFEp_t fn = (dFEp_t)fcn; double db=fn(emu, *(void**)(R_ESP + 4)); fpu_do_push(emu); ST0val = db; }
void dFuu(x86emu_t *emu, uintptr_t fcn) { dFuu_t fn = (dFuu_t)fcn; double db=fn(*(uint32_t*)(R_ESP + 4), *(uint32_t*)(R_ESP + 8)); fpu_do_push(emu); ST0val = db; }
void dFdi(x86emu_t *emu, uintptr_t fcn) { dFdi_t fn = (dFdi_t)fcn; double db=fn(*(double*)(R_ESP + 4), *(int32_t*)(R_ESP + 12)); fpu_do_push(emu); ST0val = db; }
void dFdd(x86emu_t *emu, uintptr_t fcn) { dFdd_t fn = (dFdd_t)fcn; double db=fn(*(double*)(R_ESP + 4), *(double*)(R_ESP + 12)); fpu_do_push(emu); ST0val = db; }
@ -962,8 +945,6 @@ void dFpp(x86emu_t *emu, uintptr_t fcn) { dFpp_t fn = (dFpp_t)fcn; double db=fn(
void DFDD(x86emu_t *emu, uintptr_t fcn) { DFDD_t fn = (DFDD_t)fcn; long double ld=fn(*(long double*)(R_ESP + 4), *(long double*)(R_ESP + 16)); fpu_do_push(emu); ST0val = ld; }
void DFDp(x86emu_t *emu, uintptr_t fcn) { DFDp_t fn = (DFDp_t)fcn; long double ld=fn(*(long double*)(R_ESP + 4), *(void**)(R_ESP + 16)); fpu_do_push(emu); ST0val = ld; }
void DFpp(x86emu_t *emu, uintptr_t fcn) { DFpp_t fn = (DFpp_t)fcn; long double ld=fn(*(void**)(R_ESP + 4), *(void**)(R_ESP + 8)); fpu_do_push(emu); ST0val = ld; }
void LFLL(x86emu_t *emu, uintptr_t fcn) { LFLL_t fn = (LFLL_t)fcn; double db=fn(FromLD((void*)(R_ESP + 4)), FromLD((void*)(R_ESP + 16))); fpu_do_push(emu); ST0val = db; }
void LFLp(x86emu_t *emu, uintptr_t fcn) { LFLp_t fn = (LFLp_t)fcn; double db=fn(FromLD((void*)(R_ESP + 4)), *(void**)(R_ESP + 16)); fpu_do_push(emu); ST0val = db; }
void pFEp(x86emu_t *emu, uintptr_t fcn) { pFEp_t fn = (pFEp_t)fcn; R_EAX=(uintptr_t)fn(emu, *(void**)(R_ESP + 4)); }
void pFii(x86emu_t *emu, uintptr_t fcn) { pFii_t fn = (pFii_t)fcn; R_EAX=(uintptr_t)fn(*(int32_t*)(R_ESP + 4), *(int32_t*)(R_ESP + 8)); }
void pFip(x86emu_t *emu, uintptr_t fcn) { pFip_t fn = (pFip_t)fcn; R_EAX=(uintptr_t)fn(*(int32_t*)(R_ESP + 4), *(void**)(R_ESP + 8)); }
@ -1022,8 +1003,6 @@ void vFppp(x86emu_t *emu, uintptr_t fcn) { vFppp_t fn = (vFppp_t)fcn; fn(*(void*
void vGppp(x86emu_t *emu, uintptr_t fcn) { vGppp_t fn = (vGppp_t)fcn; fn(*(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(void**)(R_ESP + 12)); }
void iFEup(x86emu_t *emu, uintptr_t fcn) { iFEup_t fn = (iFEup_t)fcn; R_EAX=fn(emu, *(uint32_t*)(R_ESP + 4), *(void**)(R_ESP + 8)); }
void iFEpi(x86emu_t *emu, uintptr_t fcn) { iFEpi_t fn = (iFEpi_t)fcn; R_EAX=fn(emu, *(void**)(R_ESP + 4), *(int32_t*)(R_ESP + 8)); }
void iFEpI(x86emu_t *emu, uintptr_t fcn) { iFEpI_t fn = (iFEpI_t)fcn; R_EAX=fn(emu, *(void**)(R_ESP + 4), *(int64_t*)(R_ESP + 8)); }
void iFEpd(x86emu_t *emu, uintptr_t fcn) { iFEpd_t fn = (iFEpd_t)fcn; R_EAX=fn(emu, *(void**)(R_ESP + 4), *(double*)(R_ESP + 8)); }
void iFEpp(x86emu_t *emu, uintptr_t fcn) { iFEpp_t fn = (iFEpp_t)fcn; R_EAX=fn(emu, *(void**)(R_ESP + 4), *(void**)(R_ESP + 8)); }
void iFiii(x86emu_t *emu, uintptr_t fcn) { iFiii_t fn = (iFiii_t)fcn; R_EAX=fn(*(int32_t*)(R_ESP + 4), *(int32_t*)(R_ESP + 8), *(int32_t*)(R_ESP + 12)); }
void iFiiu(x86emu_t *emu, uintptr_t fcn) { iFiiu_t fn = (iFiiu_t)fcn; R_EAX=fn(*(int32_t*)(R_ESP + 4), *(int32_t*)(R_ESP + 8), *(uint32_t*)(R_ESP + 12)); }
@ -1056,7 +1035,6 @@ void iFppu(x86emu_t *emu, uintptr_t fcn) { iFppu_t fn = (iFppu_t)fcn; R_EAX=fn(*
void iFppd(x86emu_t *emu, uintptr_t fcn) { iFppd_t fn = (iFppd_t)fcn; R_EAX=fn(*(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(double*)(R_ESP + 12)); }
void iFppp(x86emu_t *emu, uintptr_t fcn) { iFppp_t fn = (iFppp_t)fcn; R_EAX=fn(*(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(void**)(R_ESP + 12)); }
void iFppV(x86emu_t *emu, uintptr_t fcn) { iFppV_t fn = (iFppV_t)fcn; R_EAX=fn(*(void**)(R_ESP + 4), *(void**)(R_ESP + 8), (void*)(R_ESP + 12)); }
void IFEpi(x86emu_t *emu, uintptr_t fcn) { IFEpi_t fn = (IFEpi_t)fcn; ui64_t r; r.i=fn(emu, *(void**)(R_ESP + 4), *(int32_t*)(R_ESP + 8)); R_EAX=r.d[0]; R_EDX=r.d[1]; }
void IFiIi(x86emu_t *emu, uintptr_t fcn) { IFiIi_t fn = (IFiIi_t)fcn; ui64_t r; r.i=fn(*(int32_t*)(R_ESP + 4), *(int64_t*)(R_ESP + 8), *(int32_t*)(R_ESP + 16)); R_EAX=r.d[0]; R_EDX=r.d[1]; }
void IFpIi(x86emu_t *emu, uintptr_t fcn) { IFpIi_t fn = (IFpIi_t)fcn; ui64_t r; r.i=fn(*(void**)(R_ESP + 4), *(int64_t*)(R_ESP + 8), *(int32_t*)(R_ESP + 16)); R_EAX=r.d[0]; R_EDX=r.d[1]; }
void IFppi(x86emu_t *emu, uintptr_t fcn) { IFppi_t fn = (IFppi_t)fcn; ui64_t r; r.i=fn(*(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(int32_t*)(R_ESP + 12)); R_EAX=r.d[0]; R_EDX=r.d[1]; }
@ -1082,7 +1060,6 @@ void UFppi(x86emu_t *emu, uintptr_t fcn) { UFppi_t fn = (UFppi_t)fcn; ui64_t r;
void fFuii(x86emu_t *emu, uintptr_t fcn) { fFuii_t fn = (fFuii_t)fcn; float fl=fn(*(uint32_t*)(R_ESP + 4), *(int32_t*)(R_ESP + 8), *(int32_t*)(R_ESP + 12)); fpu_do_push(emu); ST0val = fl; }
void fFppu(x86emu_t *emu, uintptr_t fcn) { fFppu_t fn = (fFppu_t)fcn; float fl=fn(*(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(uint32_t*)(R_ESP + 12)); fpu_do_push(emu); ST0val = fl; }
void fFppp(x86emu_t *emu, uintptr_t fcn) { fFppp_t fn = (fFppp_t)fcn; float fl=fn(*(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(void**)(R_ESP + 12)); fpu_do_push(emu); ST0val = fl; }
void dFEpi(x86emu_t *emu, uintptr_t fcn) { dFEpi_t fn = (dFEpi_t)fcn; double db=fn(emu, *(void**)(R_ESP + 4), *(int32_t*)(R_ESP + 8)); fpu_do_push(emu); ST0val = db; }
void dFppu(x86emu_t *emu, uintptr_t fcn) { dFppu_t fn = (dFppu_t)fcn; double db=fn(*(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(uint32_t*)(R_ESP + 12)); fpu_do_push(emu); ST0val = db; }
void dFppp(x86emu_t *emu, uintptr_t fcn) { dFppp_t fn = (dFppp_t)fcn; double db=fn(*(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(void**)(R_ESP + 12)); fpu_do_push(emu); ST0val = db; }
void DFppu(x86emu_t *emu, uintptr_t fcn) { DFppu_t fn = (DFppu_t)fcn; long double ld=fn(*(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(uint32_t*)(R_ESP + 12)); fpu_do_push(emu); ST0val = ld; }
@ -1320,13 +1297,9 @@ void vFppiip(x86emu_t *emu, uintptr_t fcn) { vFppiip_t fn = (vFppiip_t)fcn; fn(*
void vFpppii(x86emu_t *emu, uintptr_t fcn) { vFpppii_t fn = (vFpppii_t)fcn; fn(*(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(void**)(R_ESP + 12), *(int32_t*)(R_ESP + 16), *(int32_t*)(R_ESP + 20)); }
void vFppppi(x86emu_t *emu, uintptr_t fcn) { vFppppi_t fn = (vFppppi_t)fcn; fn(*(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(void**)(R_ESP + 12), *(void**)(R_ESP + 16), *(int32_t*)(R_ESP + 20)); }
void vFppppp(x86emu_t *emu, uintptr_t fcn) { vFppppp_t fn = (vFppppp_t)fcn; fn(*(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(void**)(R_ESP + 12), *(void**)(R_ESP + 16), *(void**)(R_ESP + 20)); }
void iFEiiip(x86emu_t *emu, uintptr_t fcn) { iFEiiip_t fn = (iFEiiip_t)fcn; R_EAX=fn(emu, *(int32_t*)(R_ESP + 4), *(int32_t*)(R_ESP + 8), *(int32_t*)(R_ESP + 12), *(void**)(R_ESP + 16)); }
void iFEipii(x86emu_t *emu, uintptr_t fcn) { iFEipii_t fn = (iFEipii_t)fcn; R_EAX=fn(emu, *(int32_t*)(R_ESP + 4), *(void**)(R_ESP + 8), *(int32_t*)(R_ESP + 12), *(int32_t*)(R_ESP + 16)); }
void iFEippp(x86emu_t *emu, uintptr_t fcn) { iFEippp_t fn = (iFEippp_t)fcn; R_EAX=fn(emu, *(int32_t*)(R_ESP + 4), *(void**)(R_ESP + 8), *(void**)(R_ESP + 12), *(void**)(R_ESP + 16)); }
void iFEpipp(x86emu_t *emu, uintptr_t fcn) { iFEpipp_t fn = (iFEpipp_t)fcn; R_EAX=fn(emu, *(void**)(R_ESP + 4), *(int32_t*)(R_ESP + 8), *(void**)(R_ESP + 12), *(void**)(R_ESP + 16)); }
void iFEpupV(x86emu_t *emu, uintptr_t fcn) { iFEpupV_t fn = (iFEpupV_t)fcn; R_EAX=fn(emu, *(void**)(R_ESP + 4), *(uint32_t*)(R_ESP + 8), *(void**)(R_ESP + 12), (void*)(R_ESP + 16)); }
void iFEppip(x86emu_t *emu, uintptr_t fcn) { iFEppip_t fn = (iFEppip_t)fcn; R_EAX=fn(emu, *(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(int32_t*)(R_ESP + 12), *(void**)(R_ESP + 16)); }
void iFEpppi(x86emu_t *emu, uintptr_t fcn) { iFEpppi_t fn = (iFEpppi_t)fcn; R_EAX=fn(emu, *(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(void**)(R_ESP + 12), *(int32_t*)(R_ESP + 16)); }
void iFEpppp(x86emu_t *emu, uintptr_t fcn) { iFEpppp_t fn = (iFEpppp_t)fcn; R_EAX=fn(emu, *(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(void**)(R_ESP + 12), *(void**)(R_ESP + 16)); }
void iFEpppV(x86emu_t *emu, uintptr_t fcn) { iFEpppV_t fn = (iFEpppV_t)fcn; R_EAX=fn(emu, *(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(void**)(R_ESP + 12), (void*)(R_ESP + 16)); }
void iFEppVV(x86emu_t *emu, uintptr_t fcn) { iFEppVV_t fn = (iFEppVV_t)fcn; R_EAX=fn(emu, *(void**)(R_ESP + 4), *(void**)(R_ESP + 8), (void*)(R_ESP + 12), (void*)(R_ESP + 12)); }
@ -1572,7 +1545,6 @@ void vFppiiipii(x86emu_t *emu, uintptr_t fcn) { vFppiiipii_t fn = (vFppiiipii_t)
void vFppippppi(x86emu_t *emu, uintptr_t fcn) { vFppippppi_t fn = (vFppippppi_t)fcn; fn(*(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(int32_t*)(R_ESP + 12), *(void**)(R_ESP + 16), *(void**)(R_ESP + 20), *(void**)(R_ESP + 24), *(void**)(R_ESP + 28), *(int32_t*)(R_ESP + 32)); }
void vFppppiipi(x86emu_t *emu, uintptr_t fcn) { vFppppiipi_t fn = (vFppppiipi_t)fcn; fn(*(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(void**)(R_ESP + 12), *(void**)(R_ESP + 16), *(int32_t*)(R_ESP + 20), *(int32_t*)(R_ESP + 24), *(void**)(R_ESP + 28), *(int32_t*)(R_ESP + 32)); }
void iFEpippppp(x86emu_t *emu, uintptr_t fcn) { iFEpippppp_t fn = (iFEpippppp_t)fcn; R_EAX=fn(emu, *(void**)(R_ESP + 4), *(int32_t*)(R_ESP + 8), *(void**)(R_ESP + 12), *(void**)(R_ESP + 16), *(void**)(R_ESP + 20), *(void**)(R_ESP + 24), *(void**)(R_ESP + 28)); }
void iFEppiiiip(x86emu_t *emu, uintptr_t fcn) { iFEppiiiip_t fn = (iFEppiiiip_t)fcn; R_EAX=fn(emu, *(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(int32_t*)(R_ESP + 12), *(int32_t*)(R_ESP + 16), *(int32_t*)(R_ESP + 20), *(int32_t*)(R_ESP + 24), *(void**)(R_ESP + 28)); }
void iFiiiiiiip(x86emu_t *emu, uintptr_t fcn) { iFiiiiiiip_t fn = (iFiiiiiiip_t)fcn; R_EAX=fn(*(int32_t*)(R_ESP + 4), *(int32_t*)(R_ESP + 8), *(int32_t*)(R_ESP + 12), *(int32_t*)(R_ESP + 16), *(int32_t*)(R_ESP + 20), *(int32_t*)(R_ESP + 24), *(int32_t*)(R_ESP + 28), *(void**)(R_ESP + 32)); }
void iFiiippppp(x86emu_t *emu, uintptr_t fcn) { iFiiippppp_t fn = (iFiiippppp_t)fcn; R_EAX=fn(*(int32_t*)(R_ESP + 4), *(int32_t*)(R_ESP + 8), *(int32_t*)(R_ESP + 12), *(void**)(R_ESP + 16), *(void**)(R_ESP + 20), *(void**)(R_ESP + 24), *(void**)(R_ESP + 28), *(void**)(R_ESP + 32)); }
void iFiiuuuuuu(x86emu_t *emu, uintptr_t fcn) { iFiiuuuuuu_t fn = (iFiiuuuuuu_t)fcn; R_EAX=fn(*(int32_t*)(R_ESP + 4), *(int32_t*)(R_ESP + 8), *(uint32_t*)(R_ESP + 12), *(uint32_t*)(R_ESP + 16), *(uint32_t*)(R_ESP + 20), *(uint32_t*)(R_ESP + 24), *(uint32_t*)(R_ESP + 28), *(uint32_t*)(R_ESP + 32)); }

View File

@ -57,7 +57,6 @@ void dFi(x86emu_t *emu, uintptr_t fnc);
void dFd(x86emu_t *emu, uintptr_t fnc);
void dFp(x86emu_t *emu, uintptr_t fnc);
void DFD(x86emu_t *emu, uintptr_t fnc);
void LFL(x86emu_t *emu, uintptr_t fnc);
void pFE(x86emu_t *emu, uintptr_t fnc);
void pFv(x86emu_t *emu, uintptr_t fnc);
void pFi(x86emu_t *emu, uintptr_t fnc);
@ -101,7 +100,6 @@ void iFpU(x86emu_t *emu, uintptr_t fnc);
void iFpd(x86emu_t *emu, uintptr_t fnc);
void iFpp(x86emu_t *emu, uintptr_t fnc);
void iFpV(x86emu_t *emu, uintptr_t fnc);
void IFEp(x86emu_t *emu, uintptr_t fnc);
void IFpi(x86emu_t *emu, uintptr_t fnc);
void IFpu(x86emu_t *emu, uintptr_t fnc);
void CFui(x86emu_t *emu, uintptr_t fnc);
@ -122,7 +120,6 @@ void fFfi(x86emu_t *emu, uintptr_t fnc);
void fFff(x86emu_t *emu, uintptr_t fnc);
void fFfp(x86emu_t *emu, uintptr_t fnc);
void fFpp(x86emu_t *emu, uintptr_t fnc);
void dFEp(x86emu_t *emu, uintptr_t fnc);
void dFuu(x86emu_t *emu, uintptr_t fnc);
void dFdi(x86emu_t *emu, uintptr_t fnc);
void dFdd(x86emu_t *emu, uintptr_t fnc);
@ -132,8 +129,6 @@ void dFpp(x86emu_t *emu, uintptr_t fnc);
void DFDD(x86emu_t *emu, uintptr_t fnc);
void DFDp(x86emu_t *emu, uintptr_t fnc);
void DFpp(x86emu_t *emu, uintptr_t fnc);
void LFLL(x86emu_t *emu, uintptr_t fnc);
void LFLp(x86emu_t *emu, uintptr_t fnc);
void pFEp(x86emu_t *emu, uintptr_t fnc);
void pFii(x86emu_t *emu, uintptr_t fnc);
void pFip(x86emu_t *emu, uintptr_t fnc);
@ -192,8 +187,6 @@ void vFppp(x86emu_t *emu, uintptr_t fnc);
void vGppp(x86emu_t *emu, uintptr_t fnc);
void iFEup(x86emu_t *emu, uintptr_t fnc);
void iFEpi(x86emu_t *emu, uintptr_t fnc);
void iFEpI(x86emu_t *emu, uintptr_t fnc);
void iFEpd(x86emu_t *emu, uintptr_t fnc);
void iFEpp(x86emu_t *emu, uintptr_t fnc);
void iFiii(x86emu_t *emu, uintptr_t fnc);
void iFiiu(x86emu_t *emu, uintptr_t fnc);
@ -226,7 +219,6 @@ void iFppu(x86emu_t *emu, uintptr_t fnc);
void iFppd(x86emu_t *emu, uintptr_t fnc);
void iFppp(x86emu_t *emu, uintptr_t fnc);
void iFppV(x86emu_t *emu, uintptr_t fnc);
void IFEpi(x86emu_t *emu, uintptr_t fnc);
void IFiIi(x86emu_t *emu, uintptr_t fnc);
void IFpIi(x86emu_t *emu, uintptr_t fnc);
void IFppi(x86emu_t *emu, uintptr_t fnc);
@ -252,7 +244,6 @@ void UFppi(x86emu_t *emu, uintptr_t fnc);
void fFuii(x86emu_t *emu, uintptr_t fnc);
void fFppu(x86emu_t *emu, uintptr_t fnc);
void fFppp(x86emu_t *emu, uintptr_t fnc);
void dFEpi(x86emu_t *emu, uintptr_t fnc);
void dFppu(x86emu_t *emu, uintptr_t fnc);
void dFppp(x86emu_t *emu, uintptr_t fnc);
void DFppu(x86emu_t *emu, uintptr_t fnc);
@ -490,13 +481,9 @@ void vFppiip(x86emu_t *emu, uintptr_t fnc);
void vFpppii(x86emu_t *emu, uintptr_t fnc);
void vFppppi(x86emu_t *emu, uintptr_t fnc);
void vFppppp(x86emu_t *emu, uintptr_t fnc);
void iFEiiip(x86emu_t *emu, uintptr_t fnc);
void iFEipii(x86emu_t *emu, uintptr_t fnc);
void iFEippp(x86emu_t *emu, uintptr_t fnc);
void iFEpipp(x86emu_t *emu, uintptr_t fnc);
void iFEpupV(x86emu_t *emu, uintptr_t fnc);
void iFEppip(x86emu_t *emu, uintptr_t fnc);
void iFEpppi(x86emu_t *emu, uintptr_t fnc);
void iFEpppp(x86emu_t *emu, uintptr_t fnc);
void iFEpppV(x86emu_t *emu, uintptr_t fnc);
void iFEppVV(x86emu_t *emu, uintptr_t fnc);
@ -742,7 +729,6 @@ void vFppiiipii(x86emu_t *emu, uintptr_t fnc);
void vFppippppi(x86emu_t *emu, uintptr_t fnc);
void vFppppiipi(x86emu_t *emu, uintptr_t fnc);
void iFEpippppp(x86emu_t *emu, uintptr_t fnc);
void iFEppiiiip(x86emu_t *emu, uintptr_t fnc);
void iFiiiiiiip(x86emu_t *emu, uintptr_t fnc);
void iFiiippppp(x86emu_t *emu, uintptr_t fnc);
void iFiiuuuuuu(x86emu_t *emu, uintptr_t fnc);