about summary refs log tree commit diff stats
path: root/src/dynarec/dynarec_native_functions.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dynarec/dynarec_native_functions.h')
-rw-r--r--src/dynarec/dynarec_native_functions.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/dynarec/dynarec_native_functions.h b/src/dynarec/dynarec_native_functions.h
new file mode 100644
index 00000000..4cbd71a7
--- /dev/null
+++ b/src/dynarec/dynarec_native_functions.h
@@ -0,0 +1,70 @@
+#ifndef __DYNAREC_NATIVE_FUNCTIONS_H__
+#define __DYNAREC_NATIVE_FUNCTIONS_H__
+
+#include <stdint.h>
+
+#include "dynarec_arch.h"
+
+typedef struct x64emu_s x64emu_t;
+
+void native_fstp(x64emu_t* emu, void* p);
+
+void native_print_armreg(x64emu_t* emu, uintptr_t reg, uintptr_t n);
+
+void native_f2xm1(x64emu_t* emu);
+void native_fyl2x(x64emu_t* emu);
+void native_ftan(x64emu_t* emu);
+void native_fpatan(x64emu_t* emu);
+void native_fxtract(x64emu_t* emu);
+void native_fprem(x64emu_t* emu);
+void native_fyl2xp1(x64emu_t* emu);
+void native_fsincos(x64emu_t* emu);
+void native_frndint(x64emu_t* emu);
+void native_fscale(x64emu_t* emu);
+void native_fsin(x64emu_t* emu);
+void native_fcos(x64emu_t* emu);
+void native_fbld(x64emu_t* emu, uint8_t* ed);
+void native_fild64(x64emu_t* emu, int64_t* ed);
+void native_fbstp(x64emu_t* emu, uint8_t* ed);
+void native_fistp64(x64emu_t* emu, int64_t* ed);
+void native_fistt64(x64emu_t* emu, int64_t* ed);
+void native_fld(x64emu_t* emu, uint8_t* ed);
+void native_fsave(x64emu_t* emu, uint8_t* ed);
+void native_frstor(x64emu_t* emu, uint8_t* ed);
+void native_fprem1(x64emu_t* emu);
+
+void native_aesd(x64emu_t* emu, int xmm);
+void native_aese(x64emu_t* emu, int xmm);
+void native_aesdlast(x64emu_t* emu, int xmm);
+void native_aeselast(x64emu_t* emu, int xmm);
+void native_aesimc(x64emu_t* emu, int xmm);
+void native_aeskeygenassist(x64emu_t* emu, int gx, int ex, void* p, uint32_t u8);
+void native_pclmul(x64emu_t* emu, int gx, int ex, void* p, uint32_t u8);
+
+void native_clflush(x64emu_t* emu, void* p);
+
+void native_ud(x64emu_t* emu);
+void native_priv(x64emu_t* emu);
+
+// Caches transformation (for loops) // Specific, need to be writen par backend
+int CacheNeedsTransform(dynarec_native_t* dyn, int i1);
+
+// predecessor access
+int isPred(dynarec_native_t* dyn, int ninst, int pred);
+int getNominalPred(dynarec_native_t* dyn, int ninst);
+
+// Get if ED will have the correct parity. Not emiting anything. Parity is 2 for DWORD or 3 for QWORD
+int getedparity(dynarec_native_t* dyn, int ninst, uintptr_t addr, uint8_t nextop, int parity, int delta);
+// Do the GETED, but don't emit anything...
+uintptr_t fakeed(dynarec_native_t* dyn, uintptr_t addr, int ninst, uint8_t nextop);
+
+// Is what pointed at addr a native call? And if yes, to what function?
+int isNativeCall(dynarec_native_t* dyn, uintptr_t addr, uintptr_t* calladdress, int* retn);
+
+int isCacheEmpty(dynarec_native_t* dyn, int ninst);
+
+const char* getCacheName(int t, int n);
+
+ADDITIONNAL_DEFINITION()
+
+#endif //__DYNAREC_NATIVE_FUNCTIONS_H__
\ No newline at end of file