yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

Merge pull request #9005 from liamwhite/micro-fit

macro_jit_x64: cancel exit for taken branch
This commit is contained in:
bunnei 2022-10-04 20:08:02 -07:00 committed by GitHub
commit fc0ace6048
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 11 deletions

View File

@ -401,17 +401,11 @@ void MacroJITx64Impl::Compile_Branch(Macro::Opcode opcode) {
Xbyak::Label handle_post_exit{}; Xbyak::Label handle_post_exit{};
Xbyak::Label skip{}; Xbyak::Label skip{};
jmp(skip, T_NEAR); jmp(skip, T_NEAR);
if (opcode.is_exit) {
L(handle_post_exit); L(handle_post_exit);
// Execute 1 instruction xor_(BRANCH_HOLDER, BRANCH_HOLDER);
mov(BRANCH_HOLDER, end_of_code); jmp(labels[jump_address], T_NEAR);
// Jump to next instruction to skip delay slot check
jmp(labels[jump_address], T_NEAR);
} else {
L(handle_post_exit);
xor_(BRANCH_HOLDER, BRANCH_HOLDER);
jmp(labels[jump_address], T_NEAR);
}
L(skip); L(skip);
mov(BRANCH_HOLDER, handle_post_exit); mov(BRANCH_HOLDER, handle_post_exit);
jmp(delay_skip[pc], T_NEAR); jmp(delay_skip[pc], T_NEAR);