From eb70f6d18e24e150957990ec3ba172035dc4c078 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Sun, 24 Dec 2023 14:00:13 +0100 Subject: [PATCH] Added more wrapped signature to libnuma and libxcb (should help #531) --- src/wrapped/generated/functions_list.txt | 3 ++- src/wrapped/generated/wrapper.c | 7 +++++-- src/wrapped/generated/wrapper.h | 3 ++- src/wrapped/wrappedlibnuma_private.h | 2 +- src/wrapped/wrappedlibxcb_private.h | 4 ++-- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index 1f7cef035..098a823cf 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -1618,6 +1618,7 @@ #() lFpuipC #() lFpuuLL #() lFppupp +#() lFppLpL #() lFppLpp #() LFELppi #() LFEpppp @@ -2579,7 +2580,6 @@ #() pFpipiiiip #() pFpCCuuwwC #() pFpCuwwWWu -#() pFpCuuuCup #() pFpWWiCpup #() pFpuuWWCuu #() pFpuuuuupp @@ -2723,6 +2723,7 @@ #() pFpLppLLiLi #() pFppiiiiiip #() pFppipppppp +#() pFppCuuuCup #() pFpppiiiiii #() pFpppWWWWWp #() pFpppuipppp diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c index 0c9d1d0eb..207856e08 100644 --- a/src/wrapped/generated/wrapper.c +++ b/src/wrapped/generated/wrapper.c @@ -1654,6 +1654,7 @@ typedef intptr_t (*lFipLpp_t)(int32_t, void*, uintptr_t, void*, void*); typedef intptr_t (*lFpuipC_t)(void*, uint32_t, int32_t, void*, uint8_t); typedef intptr_t (*lFpuuLL_t)(void*, uint32_t, uint32_t, uintptr_t, uintptr_t); typedef intptr_t (*lFppupp_t)(void*, void*, uint32_t, void*, void*); +typedef intptr_t (*lFppLpL_t)(void*, void*, uintptr_t, void*, uintptr_t); typedef intptr_t (*lFppLpp_t)(void*, void*, uintptr_t, void*, void*); typedef uintptr_t (*LFELppi_t)(x64emu_t*, uintptr_t, void*, void*, int32_t); typedef uintptr_t (*LFEpppp_t)(x64emu_t*, void*, void*, void*, void*); @@ -2615,7 +2616,6 @@ typedef void* (*pFpiUdiiUi_t)(void*, int32_t, uint64_t, double, int32_t, int32_t typedef void* (*pFpipiiiip_t)(void*, int32_t, void*, int32_t, int32_t, int32_t, int32_t, void*); typedef void* (*pFpCCuuwwC_t)(void*, uint8_t, uint8_t, uint32_t, uint32_t, int16_t, int16_t, uint8_t); typedef void* (*pFpCuwwWWu_t)(void*, uint8_t, uint32_t, int16_t, int16_t, uint16_t, uint16_t, uint32_t); -typedef void* (*pFpCuuuCup_t)(void*, uint8_t, uint32_t, uint32_t, uint32_t, uint8_t, uint32_t, void*); typedef void* (*pFpWWiCpup_t)(void*, uint16_t, uint16_t, int32_t, uint8_t, void*, uint32_t, void*); typedef void* (*pFpuuWWCuu_t)(void*, uint32_t, uint32_t, uint16_t, uint16_t, uint8_t, uint32_t, uint32_t); typedef void* (*pFpuuuuupp_t)(void*, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, void*, void*); @@ -2759,6 +2759,7 @@ typedef void* (*pFpLpLLipui_t)(void*, uintptr_t, void*, uintptr_t, uintptr_t, in typedef void* (*pFpLppLLiLi_t)(void*, uintptr_t, void*, void*, uintptr_t, uintptr_t, int32_t, uintptr_t, int32_t); typedef void* (*pFppiiiiiip_t)(void*, void*, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, void*); typedef void* (*pFppipppppp_t)(void*, void*, int32_t, void*, void*, void*, void*, void*, void*); +typedef void* (*pFppCuuuCup_t)(void*, void*, uint8_t, uint32_t, uint32_t, uint32_t, uint8_t, uint32_t, void*); typedef void* (*pFpppiiiiii_t)(void*, void*, void*, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t); typedef void* (*pFpppWWWWWp_t)(void*, void*, void*, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, void*); typedef void* (*pFpppuipppp_t)(void*, void*, void*, uint32_t, int32_t, void*, void*, void*, void*); @@ -4645,6 +4646,7 @@ void lFipLpp(x64emu_t *emu, uintptr_t fcn) { lFipLpp_t fn = (lFipLpp_t)fcn; R_RA void lFpuipC(x64emu_t *emu, uintptr_t fcn) { lFpuipC_t fn = (lFpuipC_t)fcn; R_RAX=(intptr_t)fn((void*)R_RDI, (uint32_t)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (uint8_t)R_R8); } void lFpuuLL(x64emu_t *emu, uintptr_t fcn) { lFpuuLL_t fn = (lFpuuLL_t)fcn; R_RAX=(intptr_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uintptr_t)R_RCX, (uintptr_t)R_R8); } void lFppupp(x64emu_t *emu, uintptr_t fcn) { lFppupp_t fn = (lFppupp_t)fcn; R_RAX=(intptr_t)fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (void*)R_R8); } +void lFppLpL(x64emu_t *emu, uintptr_t fcn) { lFppLpL_t fn = (lFppLpL_t)fcn; R_RAX=(intptr_t)fn((void*)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX, (void*)R_RCX, (uintptr_t)R_R8); } void lFppLpp(x64emu_t *emu, uintptr_t fcn) { lFppLpp_t fn = (lFppLpp_t)fcn; R_RAX=(intptr_t)fn((void*)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX, (void*)R_RCX, (void*)R_R8); } void LFELppi(x64emu_t *emu, uintptr_t fcn) { LFELppi_t fn = (LFELppi_t)fcn; R_RAX=(uintptr_t)fn(emu, (uintptr_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX); } void LFEpppp(x64emu_t *emu, uintptr_t fcn) { LFEpppp_t fn = (LFEpppp_t)fcn; R_RAX=(uintptr_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX); } @@ -5606,7 +5608,6 @@ void pFpiUdiiUi(x64emu_t *emu, uintptr_t fcn) { pFpiUdiiUi_t fn = (pFpiUdiiUi_t) void pFpipiiiip(x64emu_t *emu, uintptr_t fcn) { pFpipiiiip_t fn = (pFpipiiiip_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(int32_t*)(R_RSP + 8), *(void**)(R_RSP + 16)); } void pFpCCuuwwC(x64emu_t *emu, uintptr_t fcn) { pFpCCuuwwC_t fn = (pFpCCuuwwC_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint8_t)R_RSI, (uint8_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (int16_t)R_R9, *(int16_t*)(R_RSP + 8), *(uint8_t*)(R_RSP + 16)); } void pFpCuwwWWu(x64emu_t *emu, uintptr_t fcn) { pFpCuwwWWu_t fn = (pFpCuwwWWu_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint8_t)R_RSI, (uint32_t)R_RDX, (int16_t)R_RCX, (int16_t)R_R8, (uint16_t)R_R9, *(uint16_t*)(R_RSP + 8), *(uint32_t*)(R_RSP + 16)); } -void pFpCuuuCup(x64emu_t *emu, uintptr_t fcn) { pFpCuuuCup_t fn = (pFpCuuuCup_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint8_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (uint8_t)R_R9, *(uint32_t*)(R_RSP + 8), *(void**)(R_RSP + 16)); } void pFpWWiCpup(x64emu_t *emu, uintptr_t fcn) { pFpWWiCpup_t fn = (pFpWWiCpup_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint16_t)R_RSI, (uint16_t)R_RDX, (int32_t)R_RCX, (uint8_t)R_R8, (void*)R_R9, *(uint32_t*)(R_RSP + 8), *(void**)(R_RSP + 16)); } void pFpuuWWCuu(x64emu_t *emu, uintptr_t fcn) { pFpuuWWCuu_t fn = (pFpuuWWCuu_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint16_t)R_RCX, (uint16_t)R_R8, (uint8_t)R_R9, *(uint32_t*)(R_RSP + 8), *(uint32_t*)(R_RSP + 16)); } void pFpuuuuupp(x64emu_t *emu, uintptr_t fcn) { pFpuuuuupp_t fn = (pFpuuuuupp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); } @@ -5750,6 +5751,7 @@ void pFpLpLLipui(x64emu_t *emu, uintptr_t fcn) { pFpLpLLipui_t fn = (pFpLpLLipui void pFpLppLLiLi(x64emu_t *emu, uintptr_t fcn) { pFpLppLLiLi_t fn = (pFpLppLLiLi_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (uintptr_t)R_R8, (uintptr_t)R_R9, *(int32_t*)(R_RSP + 8), *(uintptr_t*)(R_RSP + 16), *(int32_t*)(R_RSP + 24)); } void pFppiiiiiip(x64emu_t *emu, uintptr_t fcn) { pFppiiiiiip_t fn = (pFppiiiiiip_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(int32_t*)(R_RSP + 8), *(int32_t*)(R_RSP + 16), *(void**)(R_RSP + 24)); } void pFppipppppp(x64emu_t *emu, uintptr_t fcn) { pFppipppppp_t fn = (pFppipppppp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24)); } +void pFppCuuuCup(x64emu_t *emu, uintptr_t fcn) { pFppCuuuCup_t fn = (pFppCuuuCup_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (uint8_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9, *(uint8_t*)(R_RSP + 8), *(uint32_t*)(R_RSP + 16), *(void**)(R_RSP + 24)); } void pFpppiiiiii(x64emu_t *emu, uintptr_t fcn) { pFpppiiiiii_t fn = (pFpppiiiiii_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(int32_t*)(R_RSP + 8), *(int32_t*)(R_RSP + 16), *(int32_t*)(R_RSP + 24)); } void pFpppWWWWWp(x64emu_t *emu, uintptr_t fcn) { pFpppWWWWWp_t fn = (pFpppWWWWWp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint16_t)R_RCX, (uint16_t)R_R8, (uint16_t)R_R9, *(uint16_t*)(R_RSP + 8), *(uint16_t*)(R_RSP + 16), *(void**)(R_RSP + 24)); } void pFpppuipppp(x64emu_t *emu, uintptr_t fcn) { pFpppuipppp_t fn = (pFpppuipppp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (int32_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24)); } @@ -7390,6 +7392,7 @@ int isSimpleWrapper(wrapper_t fun) { if (fun == &lFpuipC) return 1; if (fun == &lFpuuLL) return 1; if (fun == &lFppupp) return 1; + if (fun == &lFppLpL) return 1; if (fun == &lFppLpp) return 1; if (fun == &LFuiCiu) return 1; if (fun == &LFLpppL) return 1; diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h index 2b08a4a64..5ab9c63bf 100644 --- a/src/wrapped/generated/wrapper.h +++ b/src/wrapped/generated/wrapper.h @@ -1655,6 +1655,7 @@ void lFipLpp(x64emu_t *emu, uintptr_t fnc); void lFpuipC(x64emu_t *emu, uintptr_t fnc); void lFpuuLL(x64emu_t *emu, uintptr_t fnc); void lFppupp(x64emu_t *emu, uintptr_t fnc); +void lFppLpL(x64emu_t *emu, uintptr_t fnc); void lFppLpp(x64emu_t *emu, uintptr_t fnc); void LFELppi(x64emu_t *emu, uintptr_t fnc); void LFEpppp(x64emu_t *emu, uintptr_t fnc); @@ -2616,7 +2617,6 @@ void pFpiUdiiUi(x64emu_t *emu, uintptr_t fnc); void pFpipiiiip(x64emu_t *emu, uintptr_t fnc); void pFpCCuuwwC(x64emu_t *emu, uintptr_t fnc); void pFpCuwwWWu(x64emu_t *emu, uintptr_t fnc); -void pFpCuuuCup(x64emu_t *emu, uintptr_t fnc); void pFpWWiCpup(x64emu_t *emu, uintptr_t fnc); void pFpuuWWCuu(x64emu_t *emu, uintptr_t fnc); void pFpuuuuupp(x64emu_t *emu, uintptr_t fnc); @@ -2760,6 +2760,7 @@ void pFpLpLLipui(x64emu_t *emu, uintptr_t fnc); void pFpLppLLiLi(x64emu_t *emu, uintptr_t fnc); void pFppiiiiiip(x64emu_t *emu, uintptr_t fnc); void pFppipppppp(x64emu_t *emu, uintptr_t fnc); +void pFppCuuuCup(x64emu_t *emu, uintptr_t fnc); void pFpppiiiiii(x64emu_t *emu, uintptr_t fnc); void pFpppWWWWWp(x64emu_t *emu, uintptr_t fnc); void pFpppuipppp(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped/wrappedlibnuma_private.h b/src/wrapped/wrappedlibnuma_private.h index 554cdcbdb..feecd1332 100644 --- a/src/wrapped/wrappedlibnuma_private.h +++ b/src/wrapped/wrappedlibnuma_private.h @@ -5,7 +5,7 @@ GO(copy_bitmask_to_bitmask, vFpp) GO(copy_bitmask_to_nodemask, vFpp) GO(copy_nodemask_to_bitmask, vFpp) -//GOW(get_mempolicy, +GOW(get_mempolicy, lFppLpL) GOW(mbind, iFpLipLu) //GOW(migrate_pages, //GOW(move_pages, diff --git a/src/wrapped/wrappedlibxcb_private.h b/src/wrapped/wrappedlibxcb_private.h index 1ae141d6b..96c6f8588 100644 --- a/src/wrapped/wrappedlibxcb_private.h +++ b/src/wrapped/wrappedlibxcb_private.h @@ -76,8 +76,8 @@ GO(xcb_change_keyboard_control, pFpup) //GO(xcb_change_keyboard_mapping_sizeof, //GO(xcb_change_pointer_control, //GO(xcb_change_pointer_control_checked, -GO(xcb_change_property, pFpCuuuCup) -GO(xcb_change_property_checked, pFpCuuuCup) +GO(xcb_change_property, pFppCuuuCup) +GO(xcb_change_property_checked, pFppCuuuCup) //GO(xcb_change_property_data, //GO(xcb_change_property_data_end, //GO(xcb_change_property_data_length,