JitX64: Implement ARM_Jit::ClearCache()

This commit is contained in:
MerryMage 2016-03-20 17:53:06 +00:00
parent 02c3484dbc
commit 5331b7c4a5
4 changed files with 13 additions and 4 deletions

View File

@ -217,9 +217,9 @@ void ARM_Jit::PrepareReschedule() {
}
void ARM_Jit::ClearCache() {
UNIMPLEMENTED();
// compiler.ClearCache();
this->state->cpu_state.instruction_cache.clear();
compiler.ClearCache();
block_of_code.ClearCodeSpace();
state->cpu_state.instruction_cache.clear();
}
}

View File

@ -40,7 +40,7 @@ public:
void PrepareReschedule() override;
void ExecuteInstructions(int num_instructions) override;
void ClearCache();
void ClearCache() override;
private:
bool reschedule;

View File

@ -2,6 +2,7 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include "core/arm/dyncom/arm_dyncom_interpreter.h"
#include "core/arm/jit_x64/jit_x64.h"
#include "core/memory.h"
@ -11,6 +12,12 @@ using namespace Gen;
JitX64::JitX64(XEmitter* code_) : code(code_) {}
void JitX64::ClearCache() {
basic_blocks.clear();
patch_jmp_locations.clear();
InterpreterClearCache();
}
CodePtr JitX64::GetBB(u32 pc, bool TFlag, bool EFlag) {
const LocationDescriptor desc = { pc, TFlag, EFlag };

View File

@ -48,6 +48,8 @@ public:
JitX64(Gen::XEmitter* code_);
virtual ~JitX64() override {}
void ClearCache();
CodePtr GetBB(u32 pc, bool TFlag, bool EFlag);
/// Returns a pointer to the compiled basic block.