mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-11 08:27:58 -05:00
armemu: Set the Q flag properly for SMLAD/SMUAD
This commit is contained in:
@ -444,6 +444,14 @@ ARMul_AddOverflow (ARMul_State * state, ARMword a, ARMword b, ARMword result)
|
||||
ASSIGNV (AddOverflow (a, b, result));
|
||||
}
|
||||
|
||||
/* Assigns the Q flag if the given result is considered an overflow from the addition of a and b */
|
||||
void ARMul_AddOverflowQ(ARMul_State* state, ARMword a, ARMword b)
|
||||
{
|
||||
u32 result = a + b;
|
||||
if (((result ^ a) & (u32)0x80000000) && ((a ^ b) & (u32)0x80000000) == 0)
|
||||
SETQ;
|
||||
}
|
||||
|
||||
/* Assigns the C flag after an subtraction of a and b to give result. */
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user