From 2b08172a452324e340b7030043e4e3f789a5b37b Mon Sep 17 00:00:00 2001 From: skidau Date: Sun, 6 Oct 2013 16:31:34 +1100 Subject: [PATCH] Corrected the XMM0 processing for pairedStoreQuantized in the x86 build. Updated the PC for the fifo writes processing in the less common case. --- Source/Core/Core/Src/PowerPC/JitCommon/JitAsmCommon.cpp | 6 ++++-- Source/Core/Core/Src/PowerPC/JitCommon/Jit_Util.cpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/Core/Core/Src/PowerPC/JitCommon/JitAsmCommon.cpp b/Source/Core/Core/Src/PowerPC/JitCommon/JitAsmCommon.cpp index 51d9641363..fc9f402603 100644 --- a/Source/Core/Core/Src/PowerPC/JitCommon/JitAsmCommon.cpp +++ b/Source/Core/Core/Src/PowerPC/JitCommon/JitAsmCommon.cpp @@ -158,9 +158,9 @@ void CommonAsmRoutines::GenQuantizedStores() { #ifdef _M_X64 SHUFPS(XMM0, R(XMM0), 1); MOVQ_xmm(M(&psTemp[0]), XMM0); - MOV(64, R(RAX), M(&psTemp[0])); TEST(32, R(ECX), Imm32(0x0C000000)); FixupBranch too_complex = J_CC(CC_NZ, true); + MOV(64, R(RAX), M(&psTemp[0])); BSWAP(64, RAX); MOV(64, MComplex(RBX, RCX, SCALE_1, 0), R(RAX)); FixupBranch skip_complex = J(true); @@ -171,9 +171,9 @@ void CommonAsmRoutines::GenQuantizedStores() { SetJumpTarget(skip_complex); RET(); #else - MOVQ_xmm(M(&psTemp[0]), XMM0); TEST(32, R(ECX), Imm32(0x0C000000)); FixupBranch argh = J_CC(CC_NZ, true); + MOVQ_xmm(M(&psTemp[0]), XMM0); MOV(32, R(EAX), M(&psTemp)); BSWAP(32, EAX); AND(32, R(ECX), Imm32(Memory::MEMVIEW32_MASK)); @@ -183,6 +183,8 @@ void CommonAsmRoutines::GenQuantizedStores() { MOV(32, MDisp(ECX, 4+(u32)Memory::base), R(EAX)); FixupBranch arg2 = J(true); SetJumpTarget(argh); + SHUFPS(XMM0, R(XMM0), 1); + MOVQ_xmm(M(&psTemp[0]), XMM0); ABI_PushRegistersAndAdjustStack(QUANTIZED_REGS_TO_SAVE, true); ABI_CallFunctionR((void *)&WriteDual32, ECX); ABI_PopRegistersAndAdjustStack(QUANTIZED_REGS_TO_SAVE, true); diff --git a/Source/Core/Core/Src/PowerPC/JitCommon/Jit_Util.cpp b/Source/Core/Core/Src/PowerPC/JitCommon/Jit_Util.cpp index e240ae8062..fc699b2315 100644 --- a/Source/Core/Core/Src/PowerPC/JitCommon/Jit_Util.cpp +++ b/Source/Core/Core/Src/PowerPC/JitCommon/Jit_Util.cpp @@ -307,9 +307,9 @@ void EmuCodeBlock::SafeWriteRegToReg(X64Reg reg_value, X64Reg reg_addr, int acce } #endif + MOV(32, M(&PC), Imm32(jit->js.compilerPC)); // Helps external systems know which instruction triggered the write TEST(32, R(reg_addr), Imm32(mem_mask)); FixupBranch fast = J_CC(CC_Z, true); - MOV(32, M(&PC), Imm32(jit->js.compilerPC)); // Helps external systems know which instruction triggered the write bool noProlog = flags & SAFE_WRITE_NO_PROLOG; bool swap = !(flags & SAFE_WRITE_NO_SWAP); ABI_PushRegistersAndAdjustStack(registersInUse, noProlog);