diff --git a/core/rec-ARM64/rec_arm64.cpp b/core/rec-ARM64/rec_arm64.cpp index d8660c976..cc35f57b6 100644 --- a/core/rec-ARM64/rec_arm64.cpp +++ b/core/rec-ARM64/rec_arm64.cpp @@ -617,31 +617,25 @@ public: break; case shop_pref: - Mov(w0, regalloc.MapRegister(op.rs1)); - //if (op.flags != 0x1337) { Lsr(w1, regalloc.MapRegister(op.rs1), 26); Cmp(w1, 0x38); - } + Label not_sqw; + B(¬_sqw, ne); + Mov(w0, regalloc.MapRegister(op.rs1)); - if (CCN_MMUCR.AT) - { - Ldr(x9, reinterpret_cast(&do_sqw_mmu)); - } - else - { - Sub(x9, x28, offsetof(Sh4RCB, cntx) - offsetof(Sh4RCB, do_sqw_nommu)); - Ldr(x9, MemOperand(x9)); - Sub(x1, x28, offsetof(Sh4RCB, cntx) - offsetof(Sh4RCB, sq_buffer)); - } - //if (op.flags == 0x1337) - // Blr(x9); - //else - { - Label no_branch; - B(&no_branch, ne); + if (CCN_MMUCR.AT) + { + Ldr(x9, reinterpret_cast(&do_sqw_mmu)); + } + else + { + Sub(x9, x28, offsetof(Sh4RCB, cntx) - offsetof(Sh4RCB, do_sqw_nommu)); + Ldr(x9, MemOperand(x9)); + Sub(x1, x28, offsetof(Sh4RCB, cntx) - offsetof(Sh4RCB, sq_buffer)); + } Blr(x9); - Bind(&no_branch); + Bind(¬_sqw); } break;