diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/wrapped/generated/functions_list.txt | 11 | ||||
| -rw-r--r-- | src/wrapped/generated/wrappedlibmtypes.h | 3 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.c | 20 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.h | 8 | ||||
| -rw-r--r-- | src/wrapped/wrappedlibm_private.h | 65 |
5 files changed, 86 insertions, 21 deletions
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index e88a5261..6da78940 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -3019,11 +3019,19 @@ #() vFpppppppppppppppppppppppp #() iFpppppppppppppppppppppppppppppppppp #defined(HAVE_LD80BITS) DFD +#defined(HAVE_LD80BITS) lFD #defined(HAVE_LD80BITS) IFED +#defined(HAVE_LD80BITS) DFiD +#defined(HAVE_LD80BITS) lFDD +#defined(HAVE_LD80BITS) DFDDD #!defined(HAVE_LD80BITS) KFK +#!defined(HAVE_LD80BITS) lFK #!defined(HAVE_LD80BITS) IFEK +#!defined(HAVE_LD80BITS) KFiK #!defined(HAVE_LD80BITS) KFKK #!defined(HAVE_LD80BITS) KFKp +#!defined(HAVE_LD80BITS) lFKK +#!defined(HAVE_LD80BITS) KFKKK #defined(NOALIGN) iFipiip #!defined(NOALIGN) iFEiiip #!defined(NOALIGN) iFEipii @@ -4536,9 +4544,6 @@ wrappedlibm: - __sqrt_finite - nearbyint - rint -- xFx: - - catanf - - catanhf - fFff: - __atan2f_finite - __fmodf_finite diff --git a/src/wrapped/generated/wrappedlibmtypes.h b/src/wrapped/generated/wrappedlibmtypes.h index ff1f3d1f..5a7d1cd3 100644 --- a/src/wrapped/generated/wrappedlibmtypes.h +++ b/src/wrapped/generated/wrappedlibmtypes.h @@ -21,7 +21,6 @@ typedef int64_t (*IFD_t)(long double); typedef int64_t (*IFK_t)(double); typedef float (*fFf_t)(float); typedef double (*dFd_t)(double); -typedef complexf_t (*xFx_t)(complexf_t); typedef float (*fFff_t)(float, float); typedef double (*dFdd_t)(double, double); @@ -60,8 +59,6 @@ typedef double (*dFdd_t)(double, double); GO(__sqrt_finite, dFd_t) \ GO(nearbyint, dFd_t) \ GO(rint, dFd_t) \ - GO(catanf, xFx_t) \ - GO(catanhf, xFx_t) \ GO(__atan2f_finite, fFff_t) \ GO(__fmodf_finite, fFff_t) \ GO(__hypotf_finite, fFff_t) \ diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c index 43fac0a6..2ed15a4d 100644 --- a/src/wrapped/generated/wrapper.c +++ b/src/wrapped/generated/wrapper.c @@ -3059,14 +3059,22 @@ typedef int32_t (*iFpppppppppppppppppppppppppppppppppp_t)(void*, void*, void*, v #if defined(HAVE_LD80BITS) typedef long double (*DFD_t)(long double); +typedef intptr_t (*lFD_t)(long double); typedef int64_t (*IFED_t)(x64emu_t*, long double); +typedef long double (*DFiD_t)(int32_t, long double); +typedef intptr_t (*lFDD_t)(long double, long double); +typedef long double (*DFDDD_t)(long double, long double, long double); #endif #if !defined(HAVE_LD80BITS) typedef double (*KFK_t)(double); +typedef intptr_t (*lFK_t)(double); typedef int64_t (*IFEK_t)(x64emu_t*, double); +typedef double (*KFiK_t)(int32_t, double); typedef double (*KFKK_t)(double, double); typedef double (*KFKp_t)(double, void*); +typedef intptr_t (*lFKK_t)(double, double); +typedef double (*KFKKK_t)(double, double, double); #endif #if defined(NOALIGN) @@ -6102,14 +6110,22 @@ void iFpppppppppppppppppppppppppppppppppp(x64emu_t *emu, uintptr_t fcn) { iFpppp #if defined(HAVE_LD80BITS) void DFD(x64emu_t *emu, uintptr_t fcn) { DFD_t fn = (DFD_t)fcn; long double ld=fn(LD2localLD((void*)(R_RSP + 8))); fpu_do_push(emu); ST0val = ld; } +void lFD(x64emu_t *emu, uintptr_t fcn) { lFD_t fn = (lFD_t)fcn; R_RAX=(intptr_t)fn(LD2localLD((void*)(R_RSP + 8))); } void IFED(x64emu_t *emu, uintptr_t fcn) { IFED_t fn = (IFED_t)fcn; R_RAX=(int64_t)fn(emu, LD2localLD((void*)(R_RSP + 8))); } +void DFiD(x64emu_t *emu, uintptr_t fcn) { DFiD_t fn = (DFiD_t)fcn; long double ld=fn((int32_t)R_RDI, LD2localLD((void*)(R_RSP + 8))); fpu_do_push(emu); ST0val = ld; } +void lFDD(x64emu_t *emu, uintptr_t fcn) { lFDD_t fn = (lFDD_t)fcn; R_RAX=(intptr_t)fn(LD2localLD((void*)(R_RSP + 8)), LD2localLD((void*)(R_RSP + 24))); } +void DFDDD(x64emu_t *emu, uintptr_t fcn) { DFDDD_t fn = (DFDDD_t)fcn; long double ld=fn(LD2localLD((void*)(R_RSP + 8)), LD2localLD((void*)(R_RSP + 24)), LD2localLD((void*)(R_RSP + 40))); fpu_do_push(emu); ST0val = ld; } #endif #if !defined(HAVE_LD80BITS) void KFK(x64emu_t *emu, uintptr_t fcn) { KFK_t fn = (KFK_t)fcn; double db=fn(FromLD((void*)(R_RSP + 8))); fpu_do_push(emu); ST0val = db; } +void lFK(x64emu_t *emu, uintptr_t fcn) { lFK_t fn = (lFK_t)fcn; R_RAX=(intptr_t)fn(FromLD((void*)(R_RSP + 8))); } void IFEK(x64emu_t *emu, uintptr_t fcn) { IFEK_t fn = (IFEK_t)fcn; R_RAX=(int64_t)fn(emu, FromLD((void*)(R_RSP + 8))); } +void KFiK(x64emu_t *emu, uintptr_t fcn) { KFiK_t fn = (KFiK_t)fcn; double db=fn((int32_t)R_RDI, FromLD((void*)(R_RSP + 8))); fpu_do_push(emu); ST0val = db; } void KFKK(x64emu_t *emu, uintptr_t fcn) { KFKK_t fn = (KFKK_t)fcn; double db=fn(FromLD((void*)(R_RSP + 8)), FromLD((void*)(R_RSP + 24))); fpu_do_push(emu); ST0val = db; } void KFKp(x64emu_t *emu, uintptr_t fcn) { KFKp_t fn = (KFKp_t)fcn; double db=fn(FromLD((void*)(R_RSP + 8)), (void*)R_RDI); fpu_do_push(emu); ST0val = db; } +void lFKK(x64emu_t *emu, uintptr_t fcn) { lFKK_t fn = (lFKK_t)fcn; R_RAX=(intptr_t)fn(FromLD((void*)(R_RSP + 8)), FromLD((void*)(R_RSP + 24))); } +void KFKKK(x64emu_t *emu, uintptr_t fcn) { KFKKK_t fn = (KFKKK_t)fcn; double db=fn(FromLD((void*)(R_RSP + 8)), FromLD((void*)(R_RSP + 24)), FromLD((void*)(R_RSP + 40))); fpu_do_push(emu); ST0val = db; } #endif #if defined(NOALIGN) @@ -8321,11 +8337,15 @@ int isRetX87Wrapper(wrapper_t fun) { if (fun == &DFppp) return 1; #if defined(HAVE_LD80BITS) if (fun == &DFD) return 1; + if (fun == &DFiD) return 1; + if (fun == &DFDDD) return 1; #endif #if !defined(HAVE_LD80BITS) if (fun == &KFK) return 1; + if (fun == &KFiK) return 1; if (fun == &KFKK) return 1; if (fun == &KFKp) return 1; + if (fun == &KFKKK) return 1; #endif return 0; } diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h index df9a83ab..7b807acf 100644 --- a/src/wrapped/generated/wrapper.h +++ b/src/wrapped/generated/wrapper.h @@ -3059,14 +3059,22 @@ void iFpppppppppppppppppppppppppppppppppp(x64emu_t *emu, uintptr_t fnc); #if defined(HAVE_LD80BITS) void DFD(x64emu_t *emu, uintptr_t fnc); +void lFD(x64emu_t *emu, uintptr_t fnc); void IFED(x64emu_t *emu, uintptr_t fnc); +void DFiD(x64emu_t *emu, uintptr_t fnc); +void lFDD(x64emu_t *emu, uintptr_t fnc); +void DFDDD(x64emu_t *emu, uintptr_t fnc); #endif #if !defined(HAVE_LD80BITS) void KFK(x64emu_t *emu, uintptr_t fnc); +void lFK(x64emu_t *emu, uintptr_t fnc); void IFEK(x64emu_t *emu, uintptr_t fnc); +void KFiK(x64emu_t *emu, uintptr_t fnc); void KFKK(x64emu_t *emu, uintptr_t fnc); void KFKp(x64emu_t *emu, uintptr_t fnc); +void lFKK(x64emu_t *emu, uintptr_t fnc); +void KFKKK(x64emu_t *emu, uintptr_t fnc); #endif #if defined(NOALIGN) diff --git a/src/wrapped/wrappedlibm_private.h b/src/wrapped/wrappedlibm_private.h index d6b289ce..8f28123a 100644 --- a/src/wrapped/wrappedlibm_private.h +++ b/src/wrapped/wrappedlibm_private.h @@ -41,7 +41,11 @@ GOW(atan2, dFdd) GOW(atan2f, fFff) GOM(__atan2f_finite, fFff) GOM(__atan2_finite, dFdd) -// atan2l // Weak +#ifdef HAVE_LD80BITS +GOW(atan2l, lFDD) +#else +GO2(atan2l, lFKK, atan2) +#endif GOW(atanf, fFf) GOW(atanh, dFd) GOW(atanhf, fFf) @@ -49,10 +53,11 @@ GOW(atanhf, fFf) // __atanh_finite #ifdef HAVE_LD80BITS GOW(atanhl, DFD) +GOW(atanl, DFD) #else GO2(atanhl, KFK, atanh) +GO2(atanl, KFK, atan) #endif -// atanl // Weak GOW(cabs, XFX) GOW(cabsf, xFx) // cabsl // Weak @@ -71,10 +76,10 @@ GOW(casinh, XFX) GOW(casinhf, xFx) // casinhl // Weak // casinl // Weak -GOS(catan, XFX) -GOM(catanf, xFx) -GOS(catanh, XFX) -GOM(catanhf, xFx) +GOW(catan, XFX) +GOW(catanf, xFx) +GOW(catanh, XFX) +GOW(catanhf, xFx) // catanhl // Weak // catanl // Weak GOW(cbrt, dFd) @@ -225,7 +230,11 @@ GO2(floorl, KFK, floor) #endif GOW(fma, dFddd) GOW(fmaf, fFfff) -// fmal // Weak +#ifdef HAVE_LD80BITS +GOW(fmal, DFDDD) +#else +GO2(fmal, KFKKK, fma) +#endif GOW(fmax, dFdd) GOW(fmaxf, fFff) // fmaxl // Weak @@ -282,7 +291,11 @@ GO(jn, dFid) GO(jnf, fFif) // __jnf_finite // __jn_finite -// jnl +#ifdef HAVE_LD80BITS +GO(jnl, DFiD) +#else +GO2(jnl, KFiK, jn) +#endif GOW(ldexp, dFdi) GOW(ldexpf, fFfi) #ifdef HAVE_LD80BITS @@ -351,7 +364,11 @@ GOWM(lrintf, iFEf) // lrintl // Weak GOW(lround, iFd) GOW(lroundf, iFf) -// lroundl // Weak +#ifdef HAVE_LD80BITS +GOW(lroundl, lFD) +#else +GO2(lroundl, lFK, lround) +#endif // matherr // Weak GOW(modf, dFdp) GOW(modff, fFfp) @@ -400,7 +417,11 @@ GOW(roundf, fFf) GO(roundeven, dFd) //since C23 GO(roundevenf, fFf) //GO(roundevenl, DFD) -// roundl // Weak +#ifdef HAVE_LD80BITS +GOW(roundl, DFD) +#else +GO2(roundl, KFK, round) +#endif // scalb // Weak // scalbf // Weak // __scalbf_finite @@ -427,8 +448,13 @@ GOW(sinh, dFd) GOW(sinhf, fFf) GOM(__sinhf_finite, fFf) GOM(__sinh_finite, dFd) -// sinhl // Weak -// sinl // Weak +#ifdef HAVE_LD80BITS +GOW(sinhl, DFD) +GOW(sinl, DFD) +#else +GO2(sinhl, KFK, sinh) +GO2(sinl, KFK, sin) +#endif GOW(sqrt, dFd) GOW(sqrtf, fFf) GOM(__sqrtf_finite, fFf) @@ -442,8 +468,13 @@ GO(tan, dFd) GOW(tanf, fFf) GOW(tanh, dFd) GOW(tanhf, fFf) -// tanhl // Weak -// tanl // Weak +#ifdef HAVE_LD80BITS +GOW(tanhl, DFD) +GOW(tanl, DFD) +#else +GO2(tanhl, KFK, tanh) +GO2(tanl, KFK, tan) +#endif GOW(tgamma, dFd) GOW(tgammaf, fFf) #ifdef HAVE_LD80BITS @@ -468,4 +499,8 @@ GO(yn, dFid) GO(ynf, fFif) // __ynf_finite // __yn_finite -// ynl +#ifdef HAVE_LD80BITS +GO(ynl, DFiD) +#else +GO2(ynl, KFiK, yn) +#endif |