{a32,a64}_interface: Predict entrypoint
This commit is contained in:
parent
7734cf1050
commit
af793c2527
2 changed files with 15 additions and 2 deletions
|
@ -60,8 +60,14 @@ struct Jit::Impl {
|
||||||
bool invalidate_entire_cache = false;
|
bool invalidate_entire_cache = false;
|
||||||
|
|
||||||
void Execute() {
|
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);
|
block_of_code.RunCode(&jit_state);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::string Disassemble(const IR::LocationDescriptor& descriptor) {
|
std::string Disassemble(const IR::LocationDescriptor& descriptor) {
|
||||||
auto block = GetBasicBlock(descriptor);
|
auto block = GetBasicBlock(descriptor);
|
||||||
|
|
|
@ -50,7 +50,14 @@ public:
|
||||||
jit_state.halt_requested = false;
|
jit_state.halt_requested = false;
|
||||||
|
|
||||||
// TODO: Check code alignment
|
// 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);
|
block_of_code.RunCode(&jit_state);
|
||||||
|
}
|
||||||
|
|
||||||
PerformRequestedCacheInvalidation();
|
PerformRequestedCacheInvalidation();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue