about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-03-06 12:17:46 +0100
committerptitSeb <sebastien.chev@gmail.com>2021-03-06 12:17:46 +0100
commit5b50e43d056c58bc21a468871cdc47a8755fdf2c (patch)
treea13b262cae23f9feb81b3742e89bf48803981bef /src
parentd94237100cbf9b7e1e3d7b9dc46e3fdfc7196f76 (diff)
downloadbox64-5b50e43d056c58bc21a468871cdc47a8755fdf2c.tar.gz
box64-5b50e43d056c58bc21a468871cdc47a8755fdf2c.zip
Added some local wrapped functions
Diffstat (limited to 'src')
-rw-r--r--src/wrapped/generated/functions_list.txt2
-rw-r--r--src/wrapped/generated/wrapper.c4
-rw-r--r--src/wrapped/generated/wrapper.h2
-rwxr-xr-xsrc/wrapped/wrappedlibc_private.h10
4 files changed, 13 insertions, 5 deletions
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt
index 3ee0e4eb..91d0ddce 100644
--- a/src/wrapped/generated/functions_list.txt
+++ b/src/wrapped/generated/functions_list.txt
@@ -18,6 +18,7 @@
 #() lFp
 #() LFv
 #() pFE
+#() pFu
 #() pFL
 #() pFp
 #() vFEp
@@ -37,6 +38,7 @@
 #() dFdd
 #() dFdp
 #() pFEp
+#() pFup
 #() pFLL
 #() pFpV
 #() vFEpu
diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c
index ecb4dfaa..d8e2f897 100644
--- a/src/wrapped/generated/wrapper.c
+++ b/src/wrapped/generated/wrapper.c
@@ -89,6 +89,7 @@ typedef double (*dFp_t)(void*);
 typedef intptr_t (*lFp_t)(void*);
 typedef uintptr_t (*LFv_t)(void);
 typedef void* (*pFE_t)(x64emu_t*);
+typedef void* (*pFu_t)(uint32_t);
 typedef void* (*pFL_t)(uintptr_t);
 typedef void* (*pFp_t)(void*);
 typedef void (*vFEp_t)(x64emu_t*, void*);
@@ -108,6 +109,7 @@ typedef double (*dFdi_t)(double, int32_t);
 typedef double (*dFdd_t)(double, double);
 typedef double (*dFdp_t)(double, void*);
 typedef void* (*pFEp_t)(x64emu_t*, void*);
+typedef void* (*pFup_t)(uint32_t, void*);
 typedef void* (*pFLL_t)(uintptr_t, uintptr_t);
 typedef void* (*pFpV_t)(void*, void*);
 typedef void (*vFEpu_t)(x64emu_t*, void*, uint32_t);
@@ -166,6 +168,7 @@ void dFp(x64emu_t *emu, uintptr_t fcn) { dFp_t fn = (dFp_t)fcn; emu->xmm[0].d[0]
 void lFp(x64emu_t *emu, uintptr_t fcn) { lFp_t fn = (lFp_t)fcn; R_RAX=(intptr_t)fn((void*)R_RDI); }
 void LFv(x64emu_t *emu, uintptr_t fcn) { LFv_t fn = (LFv_t)fcn; R_RAX=(uintptr_t)fn(); }
 void pFE(x64emu_t *emu, uintptr_t fcn) { pFE_t fn = (pFE_t)fcn; R_RAX=(uintptr_t)fn(emu); }
+void pFu(x64emu_t *emu, uintptr_t fcn) { pFu_t fn = (pFu_t)fcn; R_RAX=(uintptr_t)fn((uint32_t)R_RDI); }
 void pFL(x64emu_t *emu, uintptr_t fcn) { pFL_t fn = (pFL_t)fcn; R_RAX=(uintptr_t)fn((uintptr_t)R_RDI); }
 void pFp(x64emu_t *emu, uintptr_t fcn) { pFp_t fn = (pFp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI); }
 void vFEp(x64emu_t *emu, uintptr_t fcn) { vFEp_t fn = (vFEp_t)fcn; fn(emu, (void*)R_RDI); }
@@ -185,6 +188,7 @@ void dFdi(x64emu_t *emu, uintptr_t fcn) { dFdi_t fn = (dFdi_t)fcn; emu->xmm[0].d
 void dFdd(x64emu_t *emu, uintptr_t fcn) { dFdd_t fn = (dFdd_t)fcn; emu->xmm[0].d[0]=fn(emu->xmm[0].d[0], emu->xmm[1].d[0]); }
 void dFdp(x64emu_t *emu, uintptr_t fcn) { dFdp_t fn = (dFdp_t)fcn; emu->xmm[0].d[0]=fn(emu->xmm[0].d[0], (void*)R_RDI); }
 void pFEp(x64emu_t *emu, uintptr_t fcn) { pFEp_t fn = (pFEp_t)fcn; R_RAX=(uintptr_t)fn(emu, (void*)R_RDI); }
+void pFup(x64emu_t *emu, uintptr_t fcn) { pFup_t fn = (pFup_t)fcn; R_RAX=(uintptr_t)fn((uint32_t)R_RDI, (void*)R_RSI); }
 void pFLL(x64emu_t *emu, uintptr_t fcn) { pFLL_t fn = (pFLL_t)fcn; R_RAX=(uintptr_t)fn((uintptr_t)R_RDI, (uintptr_t)R_RSI); }
 void pFpV(x64emu_t *emu, uintptr_t fcn) { pFpV_t fn = (pFpV_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)(R_RSP + 8)); }
 void vFEpu(x64emu_t *emu, uintptr_t fcn) { vFEpu_t fn = (vFEpu_t)fcn; fn(emu, (void*)R_RDI, (uint32_t)R_RSI); }
diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h
index 245526ee..5a3cb8a2 100644
--- a/src/wrapped/generated/wrapper.h
+++ b/src/wrapped/generated/wrapper.h
@@ -50,6 +50,7 @@ void dFp(x64emu_t *emu, uintptr_t fnc);
 void lFp(x64emu_t *emu, uintptr_t fnc);
 void LFv(x64emu_t *emu, uintptr_t fnc);
 void pFE(x64emu_t *emu, uintptr_t fnc);
+void pFu(x64emu_t *emu, uintptr_t fnc);
 void pFL(x64emu_t *emu, uintptr_t fnc);
 void pFp(x64emu_t *emu, uintptr_t fnc);
 void vFEp(x64emu_t *emu, uintptr_t fnc);
@@ -69,6 +70,7 @@ void dFdi(x64emu_t *emu, uintptr_t fnc);
 void dFdd(x64emu_t *emu, uintptr_t fnc);
 void dFdp(x64emu_t *emu, uintptr_t fnc);
 void pFEp(x64emu_t *emu, uintptr_t fnc);
+void pFup(x64emu_t *emu, uintptr_t fnc);
 void pFLL(x64emu_t *emu, uintptr_t fnc);
 void pFpV(x64emu_t *emu, uintptr_t fnc);
 void vFEpu(x64emu_t *emu, uintptr_t fnc);
diff --git a/src/wrapped/wrappedlibc_private.h b/src/wrapped/wrappedlibc_private.h
index 47a7b90e..4f9a7f1b 100755
--- a/src/wrapped/wrappedlibc_private.h
+++ b/src/wrapped/wrappedlibc_private.h
@@ -1192,9 +1192,9 @@ GOW(newlocale, pFipp)
 //GOW(ngettext, 
 //GO(nice, 
 //DATAB(_nl_domain_bindings, 
-//GO(nl_langinfo, 
-//GO(__nl_langinfo_l, 
-//GOW(nl_langinfo_l, 
+GO(nl_langinfo, pFu)
+GO(__nl_langinfo_l, pFup)
+GOW(nl_langinfo_l, pFup)
 //DATAB(_nl_msg_cat_cntr, 
 //GO(nrand48, 
 //GOW(nrand48_r, 
@@ -1978,8 +1978,8 @@ GOW(tzset, vFv)
 //GOW(updwtmp, 
 //GO(updwtmpx, 
 //GO(uselib, 
-//GO(__uselocale, 
-//GOW(uselocale, 
+GO(__uselocale, pFp)
+GOW(uselocale, pFp)
 //GO(user2netname, 
 GO(usleep, iFu)
 //GO(ustat,