aboutsummaryrefslogtreecommitdiff
path: root/source/arm_dynarec/armfn.h
diff options
context:
space:
mode:
authorneonloop2022-02-09 07:15:14 +0000
committerneonloop2022-02-09 07:15:14 +0000
commitce34e879e348cecd4e21329be5974cc4162fa6c4 (patch)
tree6bc241b726fc554a31d778642f45a2d1ea2309b4 /source/arm_dynarec/armfn.h
parent874c431fdaff24413886416ed3ffa3455681ac01 (diff)
downloadsnes9x2005-ce34e879e348cecd4e21329be5974cc4162fa6c4.tar.gz
snes9x2005-ce34e879e348cecd4e21329be5974cc4162fa6c4.tar.bz2
snes9x2005-ce34e879e348cecd4e21329be5974cc4162fa6c4.zip
Adds experimental ARM dynarecdynarec
Supports ARMv5 and higher, enable with USE_DYNAREC Makefile variable
Diffstat (limited to 'source/arm_dynarec/armfn.h')
-rw-r--r--source/arm_dynarec/armfn.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/source/arm_dynarec/armfn.h b/source/arm_dynarec/armfn.h
new file mode 100644
index 0000000..4b859f9
--- /dev/null
+++ b/source/arm_dynarec/armfn.h
@@ -0,0 +1,50 @@
+#ifndef ARMFN_H
+#define ARMFN_H
+
+#include <stdint.h>
+
+int BlockEnter(uint8_t *addr);
+void UpdateSection(void);
+
+/* Below can only be called from generated code */
+
+void S9xRegsToMem(void);
+void S9xMemToRegs(void);
+
+void JumpIndirect(uint8_t *pc);
+void JumpDirect(uint8_t *pc);
+void JumpDirectChecks(uint8_t *pc);
+
+uint16_t S9xGetByteFast(uint32_t Address, uint8_t *StartPC);
+uint16_t S9xGetWordFast(uint32_t Address, uint8_t *StartPC);
+void S9xSetByteFastSA1(uint16_t Word, uint32_t Address);
+void S9xSetWordFastSA1(uint16_t Word, uint32_t Address);
+void S9xSetByteFastNoSA1(uint16_t Word, uint32_t Address);
+void S9xSetWordFastNoSA1(uint16_t Word, uint32_t Address);
+
+#define S9xSetByteFast (Settings.SA1 ? S9xSetByteFastSA1 : S9xSetByteFastNoSA1)
+#define S9xSetWordFast (Settings.SA1 ? S9xSetWordFastSA1 : S9xSetWordFastNoSA1)
+
+void S9xCallUnpackStatusFast(void);
+void S9xCallUpdateSection(void);
+
+void S9xCallSA1MainLoop(void);
+void S9xCallSetPCBase(uint32_t Address);
+
+void S9xCallHandleChecksWFISFX(void);
+void S9xCallHandleChecksWFINoSFX(void);
+void S9xCallHandleChecksNoWFISFX(void);
+void S9xCallHandleChecksNoWFINoSFX(void);
+
+#define S9xCallHandleChecksWFI (Settings.SuperFX ? S9xCallHandleChecksWFISFX : S9xCallHandleChecksWFINoSFX)
+#define S9xCallHandleChecksNoWFI (Settings.SuperFX ? S9xCallHandleChecksNoWFISFX : S9xCallHandleChecksNoWFINoSFX)
+
+void S9xCallFixCycles(void);
+void S9xCallCPUShutdown(void);
+void S9xCallWAIShutdown(void);
+
+#ifndef NDEBUG
+void S9xCallCheckInstruction(uint8_t opcode, uint8_t *pc);
+#endif
+
+#endif /* ARMFN_H */