{a32,a64}_interface: Predict entrypoint

This commit is contained in:
MerryMage 2018-01-26 22:54:03 +00:00
parent 7734cf1050
commit af793c2527
2 changed files with 15 additions and 2 deletions

View file

@ -60,8 +60,14 @@ struct Jit::Impl {
bool invalidate_entire_cache = false;
void Execute() {
const u32 new_rsb_ptr = (jit_state.rsb_ptr - 1) & A32JitState::RSBPtrMask;
if (jit_state.GetUniqueHash() == jit_state.rsb_location_descriptors[new_rsb_ptr]) {
jit_state.rsb_ptr = new_rsb_ptr;
block_of_code.RunCodeFrom(&jit_state, reinterpret_cast<CodePtr>(jit_state.rsb_codeptrs[new_rsb_ptr]));
} else {
block_of_code.RunCode(&jit_state);
}
}
std::string Disassemble(const IR::LocationDescriptor& descriptor) {
auto block = GetBasicBlock(descriptor);

View file

@ -50,7 +50,14 @@ public:
jit_state.halt_requested = false;
// TODO: Check code alignment
const u32 new_rsb_ptr = (jit_state.rsb_ptr - 1) & A64JitState::RSBPtrMask;
if (jit_state.GetUniqueHash() == jit_state.rsb_location_descriptors[new_rsb_ptr]) {
jit_state.rsb_ptr = new_rsb_ptr;
block_of_code.RunCodeFrom(&jit_state, reinterpret_cast<CodePtr>(jit_state.rsb_codeptrs[new_rsb_ptr]));
} else {
block_of_code.RunCode(&jit_state);
}
PerformRequestedCacheInvalidation();
}