about summary refs log tree commit diff stats
path: root/src/include
diff options
context:
space:
mode:
authorYang Liu <liuyang22@iscas.ac.cn>2025-04-01 18:36:12 +0800
committerGitHub <noreply@github.com>2025-04-01 12:36:12 +0200
commit670876112e3ab4a36205223a6f0c4290a527c4a9 (patch)
tree7d13933149ff9b438ae1002621ec7db31676c4ee /src/include
parent495d3cc4c0ec521e932677ac3d2fcad2c3d80eca (diff)
downloadbox64-670876112e3ab4a36205223a6f0c4290a527c4a9.tar.gz
box64-670876112e3ab4a36205223a6f0c4290a527c4a9.zip
Some cosmetic changes to C header files (#2487)
* [DYNAREC] Move cosim functions to a new header

* Moved isNativeCall to elfloader
Diffstat (limited to 'src/include')
-rw-r--r--src/include/bridge.h5
-rw-r--r--src/include/dynarec.h5
-rw-r--r--src/include/elfloader.h3
-rw-r--r--src/include/x64run.h8
-rw-r--r--src/include/x64test.h7
5 files changed, 16 insertions, 12 deletions
diff --git a/src/include/bridge.h b/src/include/bridge.h
index 6202707d..e87e5d45 100644
--- a/src/include/bridge.h
+++ b/src/include/bridge.h
@@ -30,4 +30,7 @@ const char* getBridgeName(void* addr);
 void init_bridge_helper(void);
 void fini_bridge_helper(void);
 
-#endif //__BRIDGE_H_
\ No newline at end of file
+// Is what pointed at addr a native call? And if yes, to what function?
+int isNativeCall(uintptr_t addr, int is32bits, uintptr_t* calladdress, uint16_t* retn);
+
+#endif //__BRIDGE_H_
diff --git a/src/include/dynarec.h b/src/include/dynarec.h
index baebd72d..39360841 100644
--- a/src/include/dynarec.h
+++ b/src/include/dynarec.h
@@ -5,7 +5,4 @@ typedef struct x64emu_s x64emu_t;
 
 void DynaCall(x64emu_t* emu, uintptr_t addr); // try to use DynaRec... Fallback to EmuCall if no dynarec available
 
-void x64test_step(x64emu_t* ref, uintptr_t ip);
-void x64test_check(x64emu_t* ref, uintptr_t ip);
-
-#endif // __DYNAREC_H_
\ No newline at end of file
+#endif // __DYNAREC_H_
diff --git a/src/include/elfloader.h b/src/include/elfloader.h
index 969cb95b..4184788f 100644
--- a/src/include/elfloader.h
+++ b/src/include/elfloader.h
@@ -96,4 +96,7 @@ void* GetNativeSymbolUnversioned(void* lib, const char* name);
 
 void AddMainElfToLinkmap(elfheader_t* lib);
 
+void PltResolver32(x64emu_t* emu);
+void PltResolver64(x64emu_t* emu);
+
 #endif //__ELF_LOADER_H_
diff --git a/src/include/x64run.h b/src/include/x64run.h
index 9eed07c0..823a990c 100644
--- a/src/include/x64run.h
+++ b/src/include/x64run.h
@@ -8,12 +8,6 @@ int Run(x64emu_t *emu, int step); // 0 if run was successfull, 1 if error in x86
 int RunTest(x64test_t *test);
 void DynaRun(x64emu_t *emu);
 
-uint32_t LibSyscall(x64emu_t *emu);
-void PltResolver64(x64emu_t* emu);
-#ifdef BOX32
-void PltResolver32(x64emu_t* emu);
-#endif
-extern uintptr_t pltResolver64;
 int GetTID(void);
 
-#endif //__X64RUN_H_
\ No newline at end of file
+#endif //__X64RUN_H_
diff --git a/src/include/x64test.h b/src/include/x64test.h
new file mode 100644
index 00000000..48e2a935
--- /dev/null
+++ b/src/include/x64test.h
@@ -0,0 +1,7 @@
+#ifndef __X64TEST_H_
+#define __X64TEST_H_
+
+void x64test_step(x64emu_t* ref, uintptr_t ip);
+void x64test_check(x64emu_t* ref, uintptr_t ip);
+
+#endif // __X64TEST_H_