From 1f4c000ae68450fc5b46fbbc28ce376eb3988e38 Mon Sep 17 00:00:00 2001 From: nakeee Date: Tue, 28 Apr 2009 09:12:29 +0000 Subject: [PATCH] DSP: updated condition code git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3099 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DSPCore/Src/gdsp_condition_codes.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Source/Core/DSPCore/Src/gdsp_condition_codes.cpp b/Source/Core/DSPCore/Src/gdsp_condition_codes.cpp index ab886a330d..f60e083be0 100644 --- a/Source/Core/DSPCore/Src/gdsp_condition_codes.cpp +++ b/Source/Core/DSPCore/Src/gdsp_condition_codes.cpp @@ -89,9 +89,8 @@ int GetMultiplyModifier() return 2; } - inline bool isSign() { - return ((g_dsp.r[DSP_REG_SR] & 0x02) || (g_dsp.r[DSP_REG_SR] & 0x08)); + return ((g_dsp.r[DSP_REG_SR] & 0x02) != (g_dsp.r[DSP_REG_SR] & 0x08)); } inline bool isZero() { @@ -115,7 +114,7 @@ bool CheckCondition(u8 _Condition) break; case 0x2: // G - GREATER - if (! isSign() && ! isZero()) + if (! isSign() || g_dsp.r[DSP_REG_SR] & SR_CARRY) taken = true; break; @@ -137,12 +136,12 @@ bool CheckCondition(u8 _Condition) break; case 0x6: // L - LESS - if (isSign()) + if (g_dsp.r[DSP_REG_SR] & 0x02) taken = true; break; case 0x7: // GE - GREATER EQUAL - if (! isSign() || isZero()) + if (g_dsp.r[DSP_REG_SR] & SR_CARRY) taken = true; break;