diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index 288fb7f8b..cd24377ce 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -961,8 +961,11 @@ #() LFpLpp #() LFppii #() LFppip +#() LFppLu +#() LFppLL #() LFppLp #() LFpppi +#() LFpppL #() LFpppp #() pFEipi #() pFEipp @@ -1336,6 +1339,7 @@ #() lFppiip #() LFEpppp #() LFuiCiu +#() LFLpppL #() LFLpppp #() LFpuipp #() LFpuppi @@ -2775,6 +2779,8 @@ wrappedglib2: - g_spawn_async_with_pipes wrappedgmodule2: wrappedgmp: +- vFppp: + - __gmp_get_memory_functions wrappedgnutls: - vFp: - gnutls_global_set_log_function diff --git a/src/wrapped/generated/wrappedgmptypes.h b/src/wrapped/generated/wrappedgmptypes.h index ae5ee09f5..5de90ad00 100644 --- a/src/wrapped/generated/wrappedgmptypes.h +++ b/src/wrapped/generated/wrappedgmptypes.h @@ -11,7 +11,9 @@ #define ADDED_FUNCTIONS() #endif +typedef void (*vFppp_t)(void*, void*, void*); -#define SUPER() ADDED_FUNCTIONS() +#define SUPER() ADDED_FUNCTIONS() \ + GO(__gmp_get_memory_functions, vFppp_t) #endif // __wrappedgmpTYPES_H_ diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c index 64c5ca825..51c726e4c 100644 --- a/src/wrapped/generated/wrapper.c +++ b/src/wrapped/generated/wrapper.c @@ -1033,8 +1033,11 @@ typedef uintptr_t (*LFpLpL_t)(void*, uintptr_t, void*, uintptr_t); typedef uintptr_t (*LFpLpp_t)(void*, uintptr_t, void*, void*); typedef uintptr_t (*LFppii_t)(void*, void*, int32_t, int32_t); typedef uintptr_t (*LFppip_t)(void*, void*, int32_t, void*); +typedef uintptr_t (*LFppLu_t)(void*, void*, uintptr_t, uint32_t); +typedef uintptr_t (*LFppLL_t)(void*, void*, uintptr_t, uintptr_t); typedef uintptr_t (*LFppLp_t)(void*, void*, uintptr_t, void*); typedef uintptr_t (*LFpppi_t)(void*, void*, void*, int32_t); +typedef uintptr_t (*LFpppL_t)(void*, void*, void*, uintptr_t); typedef uintptr_t (*LFpppp_t)(void*, void*, void*, void*); typedef void* (*pFEipi_t)(x86emu_t*, int32_t, void*, int32_t); typedef void* (*pFEipp_t)(x86emu_t*, int32_t, void*, void*); @@ -1408,6 +1411,7 @@ typedef intptr_t (*lFpuipC_t)(void*, uint32_t, int32_t, void*, uint8_t); typedef intptr_t (*lFppiip_t)(void*, void*, int32_t, int32_t, void*); typedef uintptr_t (*LFEpppp_t)(x86emu_t*, void*, void*, void*, void*); typedef uintptr_t (*LFuiCiu_t)(uint32_t, int32_t, uint8_t, int32_t, uint32_t); +typedef uintptr_t (*LFLpppL_t)(uintptr_t, void*, void*, void*, uintptr_t); typedef uintptr_t (*LFLpppp_t)(uintptr_t, void*, void*, void*, void*); typedef uintptr_t (*LFpuipp_t)(void*, uint32_t, int32_t, void*, void*); typedef uintptr_t (*LFpuppi_t)(void*, uint32_t, void*, void*, int32_t); @@ -3424,8 +3428,11 @@ void LFpLpL(x86emu_t *emu, uintptr_t fcn) { LFpLpL_t fn = (LFpLpL_t)fcn; R_EAX=( void LFpLpp(x86emu_t *emu, uintptr_t fcn) { LFpLpp_t fn = (LFpLpp_t)fcn; R_EAX=(uintptr_t)fn(*(void**)(R_ESP + 4), *(uintptr_t*)(R_ESP + 8), *(void**)(R_ESP + 12), *(void**)(R_ESP + 16)); } void LFppii(x86emu_t *emu, uintptr_t fcn) { LFppii_t fn = (LFppii_t)fcn; R_EAX=(uintptr_t)fn(*(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(int32_t*)(R_ESP + 12), *(int32_t*)(R_ESP + 16)); } void LFppip(x86emu_t *emu, uintptr_t fcn) { LFppip_t fn = (LFppip_t)fcn; R_EAX=(uintptr_t)fn(*(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(int32_t*)(R_ESP + 12), *(void**)(R_ESP + 16)); } +void LFppLu(x86emu_t *emu, uintptr_t fcn) { LFppLu_t fn = (LFppLu_t)fcn; R_EAX=(uintptr_t)fn(*(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(uintptr_t*)(R_ESP + 12), *(uint32_t*)(R_ESP + 16)); } +void LFppLL(x86emu_t *emu, uintptr_t fcn) { LFppLL_t fn = (LFppLL_t)fcn; R_EAX=(uintptr_t)fn(*(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(uintptr_t*)(R_ESP + 12), *(uintptr_t*)(R_ESP + 16)); } void LFppLp(x86emu_t *emu, uintptr_t fcn) { LFppLp_t fn = (LFppLp_t)fcn; R_EAX=(uintptr_t)fn(*(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(uintptr_t*)(R_ESP + 12), *(void**)(R_ESP + 16)); } void LFpppi(x86emu_t *emu, uintptr_t fcn) { LFpppi_t fn = (LFpppi_t)fcn; R_EAX=(uintptr_t)fn(*(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(void**)(R_ESP + 12), *(int32_t*)(R_ESP + 16)); } +void LFpppL(x86emu_t *emu, uintptr_t fcn) { LFpppL_t fn = (LFpppL_t)fcn; R_EAX=(uintptr_t)fn(*(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(void**)(R_ESP + 12), *(uintptr_t*)(R_ESP + 16)); } void LFpppp(x86emu_t *emu, uintptr_t fcn) { LFpppp_t fn = (LFpppp_t)fcn; R_EAX=(uintptr_t)fn(*(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(void**)(R_ESP + 12), *(void**)(R_ESP + 16)); } void pFEipi(x86emu_t *emu, uintptr_t fcn) { pFEipi_t fn = (pFEipi_t)fcn; R_EAX=(uintptr_t)fn(emu, *(int32_t*)(R_ESP + 4), *(void**)(R_ESP + 8), *(int32_t*)(R_ESP + 12)); } void pFEipp(x86emu_t *emu, uintptr_t fcn) { pFEipp_t fn = (pFEipp_t)fcn; R_EAX=(uintptr_t)fn(emu, *(int32_t*)(R_ESP + 4), *(void**)(R_ESP + 8), *(void**)(R_ESP + 12)); } @@ -3799,6 +3806,7 @@ void lFpuipC(x86emu_t *emu, uintptr_t fcn) { lFpuipC_t fn = (lFpuipC_t)fcn; R_EA void lFppiip(x86emu_t *emu, uintptr_t fcn) { lFppiip_t fn = (lFppiip_t)fcn; R_EAX=(intptr_t)fn(*(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(int32_t*)(R_ESP + 12), *(int32_t*)(R_ESP + 16), *(void**)(R_ESP + 20)); } void LFEpppp(x86emu_t *emu, uintptr_t fcn) { LFEpppp_t fn = (LFEpppp_t)fcn; R_EAX=(uintptr_t)fn(emu, *(void**)(R_ESP + 4), *(void**)(R_ESP + 8), *(void**)(R_ESP + 12), *(void**)(R_ESP + 16)); } void LFuiCiu(x86emu_t *emu, uintptr_t fcn) { LFuiCiu_t fn = (LFuiCiu_t)fcn; R_EAX=(uintptr_t)fn(*(uint32_t*)(R_ESP + 4), *(int32_t*)(R_ESP + 8), *(uint8_t*)(R_ESP + 12), *(int32_t*)(R_ESP + 16), *(uint32_t*)(R_ESP + 20)); } +void LFLpppL(x86emu_t *emu, uintptr_t fcn) { LFLpppL_t fn = (LFLpppL_t)fcn; R_EAX=(uintptr_t)fn(*(uintptr_t*)(R_ESP + 4), *(void**)(R_ESP + 8), *(void**)(R_ESP + 12), *(void**)(R_ESP + 16), *(uintptr_t*)(R_ESP + 20)); } void LFLpppp(x86emu_t *emu, uintptr_t fcn) { LFLpppp_t fn = (LFLpppp_t)fcn; R_EAX=(uintptr_t)fn(*(uintptr_t*)(R_ESP + 4), *(void**)(R_ESP + 8), *(void**)(R_ESP + 12), *(void**)(R_ESP + 16), *(void**)(R_ESP + 20)); } void LFpuipp(x86emu_t *emu, uintptr_t fcn) { LFpuipp_t fn = (LFpuipp_t)fcn; R_EAX=(uintptr_t)fn(*(void**)(R_ESP + 4), *(uint32_t*)(R_ESP + 8), *(int32_t*)(R_ESP + 12), *(void**)(R_ESP + 16), *(void**)(R_ESP + 20)); } void LFpuppi(x86emu_t *emu, uintptr_t fcn) { LFpuppi_t fn = (LFpuppi_t)fcn; R_EAX=(uintptr_t)fn(*(void**)(R_ESP + 4), *(uint32_t*)(R_ESP + 8), *(void**)(R_ESP + 12), *(void**)(R_ESP + 16), *(int32_t*)(R_ESP + 20)); } diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h index f582db589..4ed4537fe 100644 --- a/src/wrapped/generated/wrapper.h +++ b/src/wrapped/generated/wrapper.h @@ -993,8 +993,11 @@ void LFpLpL(x86emu_t *emu, uintptr_t fnc); void LFpLpp(x86emu_t *emu, uintptr_t fnc); void LFppii(x86emu_t *emu, uintptr_t fnc); void LFppip(x86emu_t *emu, uintptr_t fnc); +void LFppLu(x86emu_t *emu, uintptr_t fnc); +void LFppLL(x86emu_t *emu, uintptr_t fnc); void LFppLp(x86emu_t *emu, uintptr_t fnc); void LFpppi(x86emu_t *emu, uintptr_t fnc); +void LFpppL(x86emu_t *emu, uintptr_t fnc); void LFpppp(x86emu_t *emu, uintptr_t fnc); void pFEipi(x86emu_t *emu, uintptr_t fnc); void pFEipp(x86emu_t *emu, uintptr_t fnc); @@ -1368,6 +1371,7 @@ void lFpuipC(x86emu_t *emu, uintptr_t fnc); void lFppiip(x86emu_t *emu, uintptr_t fnc); void LFEpppp(x86emu_t *emu, uintptr_t fnc); void LFuiCiu(x86emu_t *emu, uintptr_t fnc); +void LFLpppL(x86emu_t *emu, uintptr_t fnc); void LFLpppp(x86emu_t *emu, uintptr_t fnc); void LFpuipp(x86emu_t *emu, uintptr_t fnc); void LFpuppi(x86emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped/wrappedgmp.c b/src/wrapped/wrappedgmp.c index 117001644..70c42ecc4 100644 --- a/src/wrapped/wrappedgmp.c +++ b/src/wrapped/wrappedgmp.c @@ -11,8 +11,109 @@ #include "bridge.h" #include "librarian/library_private.h" #include "x86emu.h" +#include "emu/x86emu_private.h" +#include "callback.h" +#include "librarian.h" +#include "box86context.h" +#include "emu/x86emu_private.h" +#include "callback.h" const char* gmpName = "libgmp.so.10"; #define LIBNAME gmp +#include "generated/wrappedgmptypes.h" + +#include "wrappercallback.h" + +// utility functions +#define SUPER() \ +GO(0) \ +GO(1) \ +GO(2) \ +GO(3) \ +GO(4) + +// alloc_func +#define GO(A) \ +static uintptr_t my_alloc_func_fct_##A = 0; \ +static void* my_alloc_func_##A(size_t a) \ +{ \ + return (void*)RunFunctionFmt(my_alloc_func_fct_##A, "L", a); \ +} +SUPER() +#undef GO +static void* find_alloc_func_Fct(void* fct) +{ + if(!fct) return NULL; + void* p; + if((p = GetNativeFnc((uintptr_t)fct))) return p; + #define GO(A) if(my_alloc_func_fct_##A == (uintptr_t)fct) return my_alloc_func_##A; + SUPER() + #undef GO + #define GO(A) if(my_alloc_func_fct_##A == 0) {my_alloc_func_fct_##A = (uintptr_t)fct; return my_alloc_func_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libgmp.so.10 alloc_func callback\n"); + return NULL; +} +// realloc_func +#define GO(A) \ +static uintptr_t my_realloc_func_fct_##A = 0; \ +static void* my_realloc_func_##A(void* a, size_t b) \ +{ \ + return (void*)RunFunctionFmt(my_realloc_func_fct_##A, "pL", a, b); \ +} +SUPER() +#undef GO +static void* find_realloc_func_Fct(void* fct) +{ + if(!fct) return NULL; + void* p; + if((p = GetNativeFnc((uintptr_t)fct))) return p; + #define GO(A) if(my_realloc_func_fct_##A == (uintptr_t)fct) return my_realloc_func_##A; + SUPER() + #undef GO + #define GO(A) if(my_realloc_func_fct_##A == 0) {my_realloc_func_fct_##A = (uintptr_t)fct; return my_realloc_func_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libgmp.so.10 realloc_func callback\n"); + return NULL; +} +// free_func +#define GO(A) \ +static uintptr_t my_free_func_fct_##A = 0; \ +static void my_free_func_##A(void* a) \ +{ \ + RunFunctionFmt(my_free_func_fct_##A, "p", a); \ +} +SUPER() +#undef GO +static void* find_free_func_Fct(void* fct) +{ + if(!fct) return NULL; + void* p; + if((p = GetNativeFnc((uintptr_t)fct))) return p; + #define GO(A) if(my_free_func_fct_##A == (uintptr_t)fct) return my_free_func_##A; + SUPER() + #undef GO + #define GO(A) if(my_free_func_fct_##A == 0) {my_free_func_fct_##A = (uintptr_t)fct; return my_free_func_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libgmp.so.10 free_func callback\n"); + return NULL; +} + +#undef SUPER + +EXPORT void my___gmp_get_memory_functions(x86emu_t* emu, void* f_alloc, void* f_realloc, void* f_free) +{ + my->__gmp_get_memory_functions(find_alloc_func_Fct(f_alloc), find_realloc_func_Fct(f_realloc), find_free_func_Fct(f_free)); +} + +#define CUSTOM_INIT \ + getMy(lib); + +#define CUSTOM_FINI \ + freeMy(); + #include "wrappedlib_init.h" diff --git a/src/wrapped/wrappedgmp_private.h b/src/wrapped/wrappedgmp_private.h index 1a28497d2..953dbdcb8 100644 --- a/src/wrapped/wrappedgmp_private.h +++ b/src/wrapped/wrappedgmp_private.h @@ -2,6 +2,8 @@ #error meh! #endif +// mp_bitcnt_t unsigned long int + //DATA(__gmp_allocate_func, //GO(__gmp_asprintf, //GO(__gmp_asprintf_final, @@ -95,7 +97,7 @@ //GO(__gmpf_ui_div, //GO(__gmpf_ui_sub, //GO(__gmpf_urandomb, -//GO(__gmp_get_memory_functions, +GOM(__gmp_get_memory_functions, vFEppp) //GO(__gmp_init_primesieve, //GO(__gmp_invalid_operation, //DATAB(__gmp_junk, @@ -107,8 +109,8 @@ //GO(__gmpn_add_err3_n, //GO(__gmpn_addlsh1_n, //GO(__gmpn_addlsh2_n, -//GO(__gmpn_addmul_1, -//GO(__gmpn_add_n, +GO(__gmpn_addmul_1, LFppLL) +GO(__gmpn_add_n, LFpppL) //GO(__gmpn_add_nc, //GO(__gmpn_add_n_sub_n, //GO(__gmpn_and_n, @@ -129,13 +131,13 @@ //GO(__gmpn_bsqrt, //GO(__gmpn_bsqrtinv, //GO(__gmpn_cmp, -//GO(__gmpn_cnd_add_n, -//GO(__gmpn_cnd_sub_n, +GO(__gmpn_cnd_add_n, LFLpppL) +GO(__gmpn_cnd_sub_n, LFLpppL) //GO(__gmpn_cnd_swap, //GO(__gmpn_com, //GO(__gmpn_compute_powtab, -//GO(__gmpn_copyd, -//GO(__gmpn_copyi, +GO(__gmpn_copyd, vFppL) +GO(__gmpn_copyi, vFppL) //GO(__gmpn_dcpi1_bdiv_q, //GO(__gmpn_dcpi1_bdiv_qr, //GO(__gmpn_dcpi1_bdiv_qr_n, @@ -229,7 +231,7 @@ //GO(__gmpn_mu_div_qr, //GO(__gmpn_mu_div_qr_itch, //GO(__gmpn_mul, -//GO(__gmpn_mul_1, +GO(__gmpn_mul_1, LFppLL) //GO(__gmpn_mul_1c, //GO(__gmpn_mul_basecase, //GO(__gmpn_mul_fft, @@ -240,14 +242,14 @@ //GO(__gmpn_mulmid_n, //GO(__gmpn_mulmod_bnm1, //GO(__gmpn_mulmod_bnm1_next_size, -//GO(__gmpn_mul_n, +GO(__gmpn_mul_n, vFpppL) //GO(__gmpn_nand_n, //GO(__gmpn_neg, //GO(__gmpn_ni_invertappr, //GO(__gmpn_nior_n, //GO(__gmpn_nussbaumer_mul, //GO(__gmpn_perfect_power_p, -//GO(__gmpn_perfect_square_p, +GO(__gmpn_perfect_square_p, iFpL) //GO(__gmpn_pi1_bdiv_q_1, //GO(__gmpn_popcount, //GO(__gmpn_pow_1, @@ -268,7 +270,7 @@ //GO(__gmpn_rsblsh2_n, //GO(__gmpn_rsh1add_n, //GO(__gmpn_rsh1sub_n, -//GO(__gmpn_rshift, +GO(__gmpn_rshift, LFppLu) //GO(__gmpn_sbpi1_bdiv_q, //GO(__gmpn_sbpi1_bdiv_qr, //GO(__gmpn_sbpi1_bdiv_r, @@ -298,7 +300,7 @@ //GO(__gmpn_sec_tabselect, //GO(__gmpn_set_str, //GO(__gmpn_sizeinbase, -//GO(__gmpn_sqr, +GO(__gmpn_sqr, vFppL) //GO(__gmpn_sqr_basecase, //GO(__gmpn_sqr_diag_addlsh1, //GO(__gmpn_sqrlo, @@ -314,8 +316,8 @@ //GO(__gmpn_sub_err3_n, //GO(__gmpn_sublsh1_n, //GO(__gmpn_sublsh2_n, -//GO(__gmpn_submul_1, -//GO(__gmpn_sub_n, +GO(__gmpn_submul_1, LFppLL) +GO(__gmpn_sub_n, LFpppL) //GO(__gmpn_sub_nc, //GO(__gmpn_tdiv_qr, //GO(__gmpn_toom22_mul, @@ -353,7 +355,7 @@ //GO(__gmpn_trialdiv, //GO(__gmpn_xnor_n, //GO(__gmpn_xor_n, -//GO(__gmpn_zero, +GO(__gmpn_zero, vFpL) //GO(__gmpn_zero_p, //GO(__gmp_obstack_printf, //DATA(__gmp_obstack_printf_funs, @@ -435,16 +437,16 @@ //GO(__gmp_vsscanf, //GO(__gmpz_2fac_ui, //GO(__gmpz_abs, -//GO(__gmpz_add, +GO(__gmpz_add, vFppp) //GO(__gmpz_addmul, //GO(__gmpz_addmul_ui, -//GO(__gmpz_add_ui, +GO(__gmpz_add_ui, vFppL) //GO(__gmpz_and, //GO(__gmpz_aorsmul_1, //GO(__gmpz_array_init, //GO(__gmpz_bin_ui, //GO(__gmpz_bin_uiui, -//GO(__gmpz_cdiv_q, +GO(__gmpz_cdiv_q, vFppp) //GO(__gmpz_cdiv_q_2exp, //GO(__gmpz_cdiv_qr, //GO(__gmpz_cdiv_qr_ui, @@ -463,10 +465,10 @@ GO(__gmpz_cmp, iFpp) //GO(__gmpz_cmp_d, //GO(__gmpz_cmp_si, GO(__gmpz_cmp_ui, iFpu) -//GO(__gmpz_com, +GO(__gmpz_com, vFpp) //GO(__gmpz_combit, //GO(__gmpz_congruent_2exp_p, -//GO(__gmpz_congruent_p, +GO(__gmpz_congruent_p, iFppp) //GO(__gmpz_congruent_ui_p, //GO(__gmpz_divexact, //GO(__gmpz_divexact_gcd, @@ -477,13 +479,13 @@ GO(__gmpz_cmp_ui, iFpu) //GO(__gmpz_dump, GO(__gmpz_export, vFppiLiLp) //GO(__gmpz_fac_ui, -//GO(__gmpz_fdiv_q, -//GO(__gmpz_fdiv_q_2exp, +GO(__gmpz_fdiv_q, vFppp) +GO(__gmpz_fdiv_q_2exp, vFppL) //GO(__gmpz_fdiv_qr, //GO(__gmpz_fdiv_qr_ui, //GO(__gmpz_fdiv_q_ui, -//GO(__gmpz_fdiv_r, -//GO(__gmpz_fdiv_r_2exp, +GO(__gmpz_fdiv_r, vFppp) +GO(__gmpz_fdiv_r_2exp, vFppL) //GO(__gmpz_fdiv_r_ui, //GO(__gmpz_fdiv_ui, //GO(__gmpz_fib2_ui, @@ -494,7 +496,7 @@ GO(__gmpz_export, vFppiLiLp) //GO(__gmpz_fits_uint_p, //GO(__gmpz_fits_ulong_p, //GO(__gmpz_fits_ushort_p, -//GO(__gmpz_gcd, +GO(__gmpz_gcd, vFppp) //GO(__gmpz_gcdext, //GO(__gmpz_gcd_ui, //GO(__gmpz_get_d, @@ -508,15 +510,15 @@ GO(__gmpz_import, vFpLiLiLp) GO(__gmpz_init, vFp) //GO(__gmpz_init2, //GO(__gmpz_inits, -//GO(__gmpz_init_set, +GO(__gmpz_init_set, vFpp) //GO(__gmpz_init_set_d, //GO(__gmpz_init_set_si, //GO(__gmpz_init_set_str, -//GO(__gmpz_init_set_ui, +GO(__gmpz_init_set_ui, vFpL) //GO(__gmpz_inp_raw, //GO(__gmpz_inp_str, //GO(__gmpz_inp_str_nowhite, -//GO(__gmpz_invert, +GO(__gmpz_invert, iFppp) //GO(__gmpz_ior, //GO(__gmpz_jacobi, //GO(__gmpz_kronecker_si, @@ -524,20 +526,20 @@ GO(__gmpz_init, vFp) //GO(__gmpz_lcm, //GO(__gmpz_lcm_ui, //GO(__gmpz_legendre, -//GO(__gmpz_limbs_finish, -//GO(__gmpz_limbs_modify, -//GO(__gmpz_limbs_read, -//GO(__gmpz_limbs_write, +GO(__gmpz_limbs_finish, vFpL) +GO(__gmpz_limbs_modify, pFpL) +GO(__gmpz_limbs_read, pFp) +GO(__gmpz_limbs_write, pFpL) //GO(__gmpz_lucas_mod, //GO(__gmpz_lucnum2_ui, //GO(__gmpz_lucnum_ui, //GO(__gmpz_mfac_uiui, //GO(__gmpz_millerrabin, GO(__gmpz_mod, vFppp) -//GO(__gmpz_mul, -//GO(__gmpz_mul_2exp, +GO(__gmpz_mul, vFppp) +GO(__gmpz_mul_2exp, vFppL) //GO(__gmpz_mul_si, -//GO(__gmpz_mul_ui, +GO(__gmpz_mul_ui, vFppL) //GO(__gmpz_neg, //GO(__gmpz_nextprime, //GO(__gmpz_n_pow_ui, @@ -548,52 +550,52 @@ GO(__gmpz_mod, vFppp) //GO(__gmpz_perfect_square_p, //GO(__gmpz_popcount, GO(__gmpz_powm, vFpppp) -//GO(__gmpz_powm_sec, -//GO(__gmpz_powm_ui, +GO(__gmpz_powm_sec, vFpppp) +GO(__gmpz_powm_ui, vFppLp) //GO(__gmpz_pow_ui, //GO(__gmpz_primorial_ui, -//GO(__gmpz_probab_prime_p, +GO(__gmpz_probab_prime_p, iFpi) //GO(__gmpz_prodlimbs, //GO(__gmpz_random, //GO(__gmpz_random2, //GO(__gmpz_realloc, //GO(__gmpz_realloc2, //GO(__gmpz_remove, -//GO(__gmpz_roinit_n, +GO(__gmpz_roinit_n, pFppL) //GO(__gmpz_root, //GO(__gmpz_rootrem, //GO(__gmpz_rrandomb, //GO(__gmpz_scan0, -//GO(__gmpz_scan1, -//GO(__gmpz_set, -//GO(__gmpz_setbit, +GO(__gmpz_scan1, LFpL) +GO(__gmpz_set, vFpp) +GO(__gmpz_setbit, vFpL) //GO(__gmpz_set_d, //GO(__gmpz_set_f, //GO(__gmpz_set_q, //GO(__gmpz_set_si, //GO(__gmpz_set_str, -//GO(__gmpz_set_ui, +GO(__gmpz_set_ui, vFpL) //GO(__gmpz_si_kronecker, //GO(__gmpz_size, GO(__gmpz_sizeinbase, LFpi) //GO(__gmpz_sqrt, //GO(__gmpz_sqrtrem, //GO(__gmpz_stronglucas, -//GO(__gmpz_sub, +GO(__gmpz_sub, vFppp) //GO(__gmpz_submul, -//GO(__gmpz_submul_ui, +GO(__gmpz_submul_ui, vFppL) GO(__gmpz_sub_ui, vFppu) //GO(__gmpz_swap, //GO(__gmpz_tdiv_q, -//GO(__gmpz_tdiv_q_2exp, -//GO(__gmpz_tdiv_qr, +GO(__gmpz_tdiv_q_2exp, vFppL) +GO(__gmpz_tdiv_qr, vFpppp) //GO(__gmpz_tdiv_qr_ui, //GO(__gmpz_tdiv_q_ui, //GO(__gmpz_tdiv_r, //GO(__gmpz_tdiv_r_2exp, //GO(__gmpz_tdiv_r_ui, //GO(__gmpz_tdiv_ui, -//GO(__gmpz_tstbit, +GO(__gmpz_tstbit, iFpL) //GO(__gmpz_ui_kronecker, //GO(__gmpz_ui_pow_ui, //GO(__gmpz_ui_sub,