From 0a6f822d76ac685885b228ca9227bc2bac657113 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Sat, 27 Jul 2019 08:28:39 +0100 Subject: [PATCH] a32_emit_x64: GenTerminalHandlers: Remove unnecessary mov --- src/backend/x64/a32_emit_x64.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/backend/x64/a32_emit_x64.cpp b/src/backend/x64/a32_emit_x64.cpp index de72f00c..5a54ea05 100644 --- a/src/backend/x64/a32_emit_x64.cpp +++ b/src/backend/x64/a32_emit_x64.cpp @@ -216,7 +216,7 @@ void A32EmitX64::GenMemoryAccessors() { } void A32EmitX64::GenTerminalHandlers() { - // location_descriptor ends up in rbx + // PC ends up in ebp, location_descriptor ends up in rbx const auto calculate_location_descriptor = [this] { // This calculation has to match up with IREmitter::PushRSB code.mov(ebx, dword[r15 + offsetof(A32JitState, upper_location_descriptor)]); @@ -251,11 +251,10 @@ void A32EmitX64::GenTerminalHandlers() { calculate_location_descriptor(); code.L(rsb_cache_miss); code.mov(r12, reinterpret_cast(fast_dispatch_table.data())); - code.mov(rbp, rbx); if (code.DoesCpuSupport(Xbyak::util::Cpu::tSSE42)) { - code.crc32(rbp, r12); + code.crc32(ebp, r12d); } - code.and_(rbp, fast_dispatch_table_mask); + code.and_(ebp, fast_dispatch_table_mask); code.lea(rbp, ptr[r12 + rbp]); code.cmp(rbx, qword[rbp + offsetof(FastDispatchEntry, location_descriptor)]); code.jne(fast_dispatch_cache_miss);