mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-23 06:10:03 -06:00
ehhh got that one wrong, now it should be right
This commit is contained in:
@ -46,16 +46,16 @@ inline bool OverflowSub(u32 a, u32 b)
|
|||||||
|
|
||||||
inline bool OverflowAdc(u32 a, u32 b, u32 carry)
|
inline bool OverflowAdc(u32 a, u32 b, u32 carry)
|
||||||
{
|
{
|
||||||
s64 fullResult = (s64)(s32)(a) + (s64)(s32)b + carry;
|
s64 fullResult = (s64)(s32)a + (s32)b + carry;
|
||||||
u32 res = a + b + carry;
|
u32 res = a + b + carry;
|
||||||
return (res & 0x80000000) != ((u32)fullResult & 0x80000000);
|
return (s32)res != fullResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool OverflowSbc(u32 a, u32 b, u32 carry)
|
inline bool OverflowSbc(u32 a, u32 b, u32 carry)
|
||||||
{
|
{
|
||||||
s64 fullResult = (s64)(s32)(a) - (s64)(s32)b - carry;
|
s64 fullResult = (s64)(s32)a - (s32)b - carry;
|
||||||
u32 res = a - b - carry;
|
u32 res = a - b - carry;
|
||||||
return (res & 0x80000000) != ((u32)fullResult & 0x80000000);
|
return (s32)res != fullResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LSL_IMM(x, s) \
|
#define LSL_IMM(x, s) \
|
||||||
|
Reference in New Issue
Block a user