DSPLLE - SR_10 flag implemented (no idea what name should it have or how/when this is supposed to be used)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5075 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Marko Pusljar
2010-02-17 19:10:31 +00:00
parent 634f6e512e
commit 377ece3294
4 changed files with 60 additions and 34 deletions

View File

@ -30,8 +30,8 @@ bool CheckCondition(u8 _Condition);
int GetMultiplyModifier();
void Update_SR_Register16(s16 _Value, bool carry = false, bool overflow = false);
void Update_SR_Register64(s64 _Value, bool carry = false, bool overflow = false);
void Update_SR_Register16(s16 _Value, bool carry = false, bool overflow = false, bool sr10 = false);
void Update_SR_Register64(s64 _Value, bool carry = false, bool overflow = false, bool sr10 = false);
void Update_SR_LZ(bool value);
inline bool isAddCarry(u64 val, u64 result) {
@ -46,6 +46,11 @@ inline bool isOverflow(s64 val1, s64 val2, s64 res) {
return ((val1 ^ res) & (val2 ^ res)) < 0;
}
inline bool isSR10(s64 acc) {
return (((u64)acc >= 0x80000000ULL) && ((u64)acc < 0xffffffff80000000ULL)) ? true : false;
//return (_abs64(acc) < 0x80000000) ? false : true; // working too - easier to understand
}
} // namespace
#endif // _GDSP_CONDITION_CODES_H