about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2022-02-10 22:36:37 +0100
committerptitSeb <sebastien.chev@gmail.com>2022-02-10 22:36:37 +0100
commit30050fd7ecb43cac6a8e632c538b8c01cfd247cd (patch)
tree59d702477ae47ad33d023394e3974a626f73c30a /src
parenta7da85764659c2363e93970ced79b9712aad5b75 (diff)
downloadbox64-30050fd7ecb43cac6a8e632c538b8c01cfd247cd.tar.gz
box64-30050fd7ecb43cac6a8e632c538b8c01cfd247cd.zip
Added wrapped lldiv (for Ion Fury)
Diffstat (limited to 'src')
-rw-r--r--src/wrapped/generated/functions_list.txt1
-rw-r--r--src/wrapped/generated/wrapper.c2
-rw-r--r--src/wrapped/generated/wrapper.h1
-rwxr-xr-xsrc/wrapped/wrappedlibc_private.h2
4 files changed, 5 insertions, 1 deletions
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt
index f602bc7e..d40a2217 100644
--- a/src/wrapped/generated/functions_list.txt
+++ b/src/wrapped/generated/functions_list.txt
@@ -247,6 +247,7 @@
 #() pFpp
 #() pFpV
 #() pFSi
+#() HFII
 #() HFll
 #() HFpi
 #() vFEpi
diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c
index a70f0051..1dfb7efb 100644
--- a/src/wrapped/generated/wrapper.c
+++ b/src/wrapped/generated/wrapper.c
@@ -281,6 +281,7 @@ typedef void* (*pFpL_t)(void*, uintptr_t);
 typedef void* (*pFpp_t)(void*, void*);
 typedef void* (*pFpV_t)(void*, void*);
 typedef void* (*pFSi_t)(void*, int64_t);
+typedef unsigned __int128 (*HFII_t)(int64_t, int64_t);
 typedef unsigned __int128 (*HFll_t)(intptr_t, intptr_t);
 typedef unsigned __int128 (*HFpi_t)(void*, int64_t);
 typedef void (*vFEpi_t)(x64emu_t*, void*, int64_t);
@@ -2320,6 +2321,7 @@ void pFpL(x64emu_t *emu, uintptr_t fcn) { pFpL_t fn = (pFpL_t)fcn; R_RAX=(uintpt
 void pFpp(x64emu_t *emu, uintptr_t fcn) { pFpp_t fn = (pFpp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)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 pFSi(x64emu_t *emu, uintptr_t fcn) { pFSi_t fn = (pFSi_t)fcn; R_RAX=(uintptr_t)fn(io_convert((void*)R_RDI), (int64_t)R_RSI); }
+void HFII(x64emu_t *emu, uintptr_t fcn) { HFII_t fn = (HFII_t)fcn; unsigned __int128 u128 = fn((int64_t)R_RDI, (int64_t)R_RSI); R_RAX=(u128&0xFFFFFFFFFFFFFFFFL); R_RDX=(u128>>64)&0xFFFFFFFFFFFFFFFFL; }
 void HFll(x64emu_t *emu, uintptr_t fcn) { HFll_t fn = (HFll_t)fcn; unsigned __int128 u128 = fn((intptr_t)R_RDI, (intptr_t)R_RSI); R_RAX=(u128&0xFFFFFFFFFFFFFFFFL); R_RDX=(u128>>64)&0xFFFFFFFFFFFFFFFFL; }
 void HFpi(x64emu_t *emu, uintptr_t fcn) { HFpi_t fn = (HFpi_t)fcn; unsigned __int128 u128 = fn((void*)R_RDI, (int64_t)R_RSI); R_RAX=(u128&0xFFFFFFFFFFFFFFFFL); R_RDX=(u128>>64)&0xFFFFFFFFFFFFFFFFL; }
 void vFEpi(x64emu_t *emu, uintptr_t fcn) { vFEpi_t fn = (vFEpi_t)fcn; fn(emu, (void*)R_RDI, (int64_t)R_RSI); }
diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h
index 7943a050..c414c0c8 100644
--- a/src/wrapped/generated/wrapper.h
+++ b/src/wrapped/generated/wrapper.h
@@ -280,6 +280,7 @@ void pFpL(x64emu_t *emu, uintptr_t fnc);
 void pFpp(x64emu_t *emu, uintptr_t fnc);
 void pFpV(x64emu_t *emu, uintptr_t fnc);
 void pFSi(x64emu_t *emu, uintptr_t fnc);
+void HFII(x64emu_t *emu, uintptr_t fnc);
 void HFll(x64emu_t *emu, uintptr_t fnc);
 void HFpi(x64emu_t *emu, uintptr_t fnc);
 void vFEpi(x64emu_t *emu, uintptr_t fnc);
diff --git a/src/wrapped/wrappedlibc_private.h b/src/wrapped/wrappedlibc_private.h
index a0f15231..dd74e44f 100755
--- a/src/wrapped/wrappedlibc_private.h
+++ b/src/wrapped/wrappedlibc_private.h
@@ -1078,7 +1078,7 @@ GO(linkat, iFipipi)
 GOW(listen, iFii)
 GO(listxattr, lFppL)
 GO(llabs, IFI)
-//GO(lldiv, ?FII)
+GO(lldiv, HFII)
 GO(llistxattr, lFppL)
 //GO(llseek, // Deprecated
 //DATAB(loc1,