DSPInterpreter: Replace IsConditionA with IsConditionB

Although it's not clear what the xA and xB conditions are intended to do, the pattern indicates that xB is the regular version and xA is the inverted version, so for consistency, IsConditionB should be the main function.
This commit is contained in:
Pokechu22 2021-08-19 11:56:41 -07:00
parent e5d130c4b3
commit a30a186d30
1 changed files with 4 additions and 4 deletions

View File

@ -253,8 +253,8 @@ bool Interpreter::CheckCondition(u8 condition) const
const auto IsLess = [this] { return IsSRFlagSet(SR_OVERFLOW) != IsSRFlagSet(SR_SIGN); };
const auto IsZero = [this] { return IsSRFlagSet(SR_ARITH_ZERO); };
const auto IsLogicZero = [this] { return IsSRFlagSet(SR_LOGIC_ZERO); };
const auto IsConditionA = [this] {
return (IsSRFlagSet(SR_OVER_S32) || IsSRFlagSet(SR_TOP2BITS)) && !IsSRFlagSet(SR_ARITH_ZERO);
const auto IsConditionB = [this] {
return (!(IsSRFlagSet(SR_OVER_S32) || IsSRFlagSet(SR_TOP2BITS))) || IsSRFlagSet(SR_ARITH_ZERO);
};
switch (condition & 0xf)
@ -282,9 +282,9 @@ bool Interpreter::CheckCondition(u8 condition) const
case 0x9: // ? - Over s32
return IsOverS32();
case 0xa: // ?
return IsConditionA();
return !IsConditionB();
case 0xb: // ?
return !IsConditionA();
return IsConditionB();
case 0xc: // LNZ - Logic Not Zero
return !IsLogicZero();
case 0xd: // LZ - Logic Zero