From 31e61da40d0203d17f3dd61a330824f790bda87d Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Thu, 29 Oct 2009 04:01:31 +0000 Subject: [PATCH] fix Jit64::fmrx (well, fixes soul calibur 2 SPS at least) cottonvibes wrote this :) fmrx can do some different behavior depending on the current mode of the fpr, but we *seem* to not have a problem ignoring this behavior... add a tiny comment to the PECopy register - some sources call the half_scale bit "mipmap" git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4476 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/PowerPC/Jit64/Jit_FloatingPoint.cpp | 9 ++++++--- Source/Core/VideoCommon/Src/BPMemory.h | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit_FloatingPoint.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit_FloatingPoint.cpp index a6ad81afa6..71dc2a8948 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit_FloatingPoint.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit_FloatingPoint.cpp @@ -194,16 +194,19 @@ void Jit64::fsign(UGeckoInstruction inst) void Jit64::fmrx(UGeckoInstruction inst) { + INSTRUCTION_START if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITFloatingPointOff) {Default(inst); return;} // turn off from debugger - INSTRUCTION_START; if (inst.Rc) { Default(inst); return; } int d = inst.FD; int b = inst.FB; - fpr.LoadToX64(d, true); // we don't want to destroy the high bit - MOVSD(fpr.RX(d), fpr.R(b)); + fpr.Lock(b, d); + fpr.LoadToX64(d, true, true); + MOVSD(XMM0, fpr.R(b)); + MOVSD(fpr.R(d), XMM0); + fpr.UnlockAll(); } void Jit64::fcmpx(UGeckoInstruction inst) diff --git a/Source/Core/VideoCommon/Src/BPMemory.h b/Source/Core/VideoCommon/Src/BPMemory.h index 89238d8ac7..cb022893fd 100644 --- a/Source/Core/VideoCommon/Src/BPMemory.h +++ b/Source/Core/VideoCommon/Src/BPMemory.h @@ -813,7 +813,7 @@ union UPE_Copy unsigned : 1; unsigned target_pixel_format : 4; // realformat is (fmt/2)+((fmt&1)*8).... for some reason the msb is the lsb unsigned gamma : 2; - unsigned half_scale : 1; // real size should be 2x smaller (run a gauss filter?) + unsigned half_scale : 1; // real size should be 2x smaller (run a gauss filter?) "mipmap" unsigned scale_invert : 1; unsigned clear : 1; unsigned frame_to_field : 2;