aboutsummaryrefslogtreecommitdiff
path: root/src/ARMJIT_x64
diff options
context:
space:
mode:
authorRSDuck <RSDuck@users.noreply.github.com>2019-07-14 04:33:36 +0200
committerRSDuck <rsduck@users.noreply.github.com>2020-04-26 13:03:03 +0200
commit9d76d63af5d496e232018d6ddf8ee1e55ad440ad (patch)
treeba8948dd796d7d119543dc83cd3a4ce0db608d5a /src/ARMJIT_x64
parentdcf6e1cad2b38dc4fe0dcbdb789f92e01f802a4a (diff)
jit: make everything configurable
Diffstat (limited to 'src/ARMJIT_x64')
-rw-r--r--src/ARMJIT_x64/ARMJIT_Compiler.cpp14
-rw-r--r--src/ARMJIT_x64/ARMJIT_Compiler.h2
2 files changed, 10 insertions, 6 deletions
diff --git a/src/ARMJIT_x64/ARMJIT_Compiler.cpp b/src/ARMJIT_x64/ARMJIT_Compiler.cpp
index 2b7ccd2..fe23859 100644
--- a/src/ARMJIT_x64/ARMJIT_Compiler.cpp
+++ b/src/ARMJIT_x64/ARMJIT_Compiler.cpp
@@ -336,13 +336,15 @@ const Compiler::CompileFunc T_Comp[ARMInstrInfo::tk_Count] = {
};
#undef F
+void Compiler::Reset()
+{
+ SetCodePtr((u8*)ResetStart);
+}
+
CompiledBlock Compiler::CompileBlock(ARM* cpu, FetchedInstr instrs[], int instrsCount)
{
if (IsAlmostFull())
- {
- ResetBlocks();
- SetCodePtr((u8*)ResetStart);
- }
+ InvalidateBlockCache();
CompiledBlock res = (CompiledBlock)GetWritableCodePtr();
@@ -355,7 +357,7 @@ CompiledBlock Compiler::CompileBlock(ARM* cpu, FetchedInstr instrs[], int instrs
bool mergedThumbBL = false;
- ABI_PushRegistersAndAdjustStack(BitSet32(ABI_ALL_CALLEE_SAVED & ABI_ALL_GPRS & ~RSP), 8);
+ ABI_PushRegistersAndAdjustStack(BitSet32(ABI_ALL_CALLEE_SAVED & ABI_ALL_GPRS & ~BitSet32({RSP})), 8);
MOV(64, R(RCPU), ImmPtr(cpu));
@@ -469,7 +471,7 @@ CompiledBlock Compiler::CompileBlock(ARM* cpu, FetchedInstr instrs[], int instrs
MOV(32, R(RAX), Imm32(ConstantCycles));
- ABI_PopRegistersAndAdjustStack(BitSet32(ABI_ALL_CALLEE_SAVED & ABI_ALL_GPRS & ~RSP), 8);
+ ABI_PopRegistersAndAdjustStack(BitSet32(ABI_ALL_CALLEE_SAVED & ABI_ALL_GPRS & ~BitSet32({RSP})), 8);
RET();
return res;
diff --git a/src/ARMJIT_x64/ARMJIT_Compiler.h b/src/ARMJIT_x64/ARMJIT_Compiler.h
index e04f96a..cd58012 100644
--- a/src/ARMJIT_x64/ARMJIT_Compiler.h
+++ b/src/ARMJIT_x64/ARMJIT_Compiler.h
@@ -22,6 +22,8 @@ class Compiler : public Gen::X64CodeBlock
public:
Compiler();
+ void Reset();
+
CompiledBlock CompileBlock(ARM* cpu, FetchedInstr instrs[], int instrsCount);
void LoadReg(int reg, Gen::X64Reg nativeReg);