Skip to content

Commit

Permalink
Added more wrapped signature to libnuma and libxcb (should help #531)
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitSeb committed Dec 24, 2023
1 parent 4ee6ae5 commit eb70f6d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/wrapped/generated/functions_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1618,6 +1618,7 @@
#() lFpuipC
#() lFpuuLL
#() lFppupp
#() lFppLpL
#() lFppLpp
#() LFELppi
#() LFEpppp
Expand Down Expand Up @@ -2579,7 +2580,6 @@
#() pFpipiiiip
#() pFpCCuuwwC
#() pFpCuwwWWu
#() pFpCuuuCup
#() pFpWWiCpup
#() pFpuuWWCuu
#() pFpuuuuupp
Expand Down Expand Up @@ -2723,6 +2723,7 @@
#() pFpLppLLiLi
#() pFppiiiiiip
#() pFppipppppp
#() pFppCuuuCup
#() pFpppiiiiii
#() pFpppWWWWWp
#() pFpppuipppp
Expand Down
7 changes: 5 additions & 2 deletions src/wrapped/generated/wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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*);
Expand Down Expand Up @@ -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*);
Expand Down Expand Up @@ -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*);
Expand Down Expand Up @@ -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); }
Expand Down Expand Up @@ -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)); }
Expand Down Expand Up @@ -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)); }
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/wrapped/generated/wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/wrapped/wrappedlibnuma_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/wrapped/wrappedlibxcb_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit eb70f6d

Please sign in to comment.