aboutsummaryrefslogtreecommitdiff
path: root/src/ARMJIT_x64/ARMJIT_GenOffsets.cpp
diff options
context:
space:
mode:
authorRSDuck <rsduck@users.noreply.github.com>2020-04-25 13:40:51 +0200
committerRSDuck <rsduck@users.noreply.github.com>2020-06-16 11:59:06 +0200
commit1c07932b40e6e072c6ea66c49889860252e45186 (patch)
treeece7f27fbf0f74855926d704d77acf5baf466431 /src/ARMJIT_x64/ARMJIT_GenOffsets.cpp
parent1ad90cb334125090a0317efe522c36c6f285e556 (diff)
implement block linking + some refactoring
currently only supported for x64
Diffstat (limited to 'src/ARMJIT_x64/ARMJIT_GenOffsets.cpp')
-rw-r--r--src/ARMJIT_x64/ARMJIT_GenOffsets.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ARMJIT_x64/ARMJIT_GenOffsets.cpp b/src/ARMJIT_x64/ARMJIT_GenOffsets.cpp
new file mode 100644
index 0000000..9696d22
--- /dev/null
+++ b/src/ARMJIT_x64/ARMJIT_GenOffsets.cpp
@@ -0,0 +1,15 @@
+#include "../ARM.h"
+
+int main(int argc, char* argv[])
+{
+ FILE* f = fopen("ARMJIT_Offsets.h", "w");
+#define writeOffset(field) \
+ fprintf(f, "#define ARM_" #field "_offset 0x%x\n", offsetof(ARM, field))
+
+ writeOffset(CPSR);
+ writeOffset(Cycles);
+ writeOffset(StopExecution);
+
+ fclose(f);
+ return 0;
+} \ No newline at end of file