aboutsummaryrefslogtreecommitdiff
path: root/src/ARMJIT_x64/ARMJIT_Compiler.h
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-04-26 13:05:17 +0200
commit3787bab1f69ae22d3e8106d70598ce923e5efe70 (patch)
tree33f1f2133832cc75e4d82b0c75c4268441c6c0cf /src/ARMJIT_x64/ARMJIT_Compiler.h
parent5d0f244f3c86c2b1c65566bffa3972ae1dbac27b (diff)
implement block linking + some refactoring
currently only supported for x64
Diffstat (limited to 'src/ARMJIT_x64/ARMJIT_Compiler.h')
-rw-r--r--src/ARMJIT_x64/ARMJIT_Compiler.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/ARMJIT_x64/ARMJIT_Compiler.h b/src/ARMJIT_x64/ARMJIT_Compiler.h
index 2cb57dc..b428c33 100644
--- a/src/ARMJIT_x64/ARMJIT_Compiler.h
+++ b/src/ARMJIT_x64/ARMJIT_Compiler.h
@@ -51,7 +51,10 @@ public:
void Reset();
- JitBlockEntry CompileBlock(ARM* cpu, bool thumb, FetchedInstr instrs[], int instrsCount);
+ void LinkBlock(u32 offset, JitBlockEntry entry);
+ void UnlinkBlock(u32 offset);
+
+ JitBlockEntry CompileBlock(u32 translatedAddr, ARM* cpu, bool thumb, FetchedInstr instrs[], int instrsCount);
void LoadReg(int reg, Gen::X64Reg nativeReg);
void SaveReg(int reg, Gen::X64Reg nativeReg);
@@ -145,7 +148,7 @@ public:
void Comp_RetriveFlags(bool sign, bool retriveCV, bool carryUsed);
- void Comp_SpecialBranchBehaviour();
+ void Comp_SpecialBranchBehaviour(bool taken);
void* Gen_MemoryRoutine9(bool store, int size);
@@ -176,12 +179,24 @@ public:
return Gen::R(RegCache.Mapping[reg]);
}
+ JitBlockEntry AddEntryOffset(u32 offset)
+ {
+ return (JitBlockEntry)(ResetStart + offset);
+ }
+
+ u32 SubEntryOffset(JitBlockEntry entry)
+ {
+ return (u8*)entry - ResetStart;
+ }
+
u8* ResetStart;
u32 CodeMemSize;
bool Exit;
bool IrregularCycles;
+ void* BranchStub[2];
+
void* MemoryFuncs9[3][2];
void* MemoryFuncs7[3][2];