mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-27 17:22:46 +01:00
Merge pull request #298 from lioncash/flags
armemu: Unset GE flags for UADD8 if results are < 0x100
This commit is contained in:
commit
797efbde1a
1 changed files with 22 additions and 4 deletions
|
@ -5958,11 +5958,29 @@ L_stm_s_takeabort:
|
||||||
b2 = ((u8)(from >> 8) + (u8)(to >> 8));
|
b2 = ((u8)(from >> 8) + (u8)(to >> 8));
|
||||||
b3 = ((u8)(from >> 16) + (u8)(to >> 16));
|
b3 = ((u8)(from >> 16) + (u8)(to >> 16));
|
||||||
b4 = ((u8)(from >> 24) + (u8)(to >> 24));
|
b4 = ((u8)(from >> 24) + (u8)(to >> 24));
|
||||||
if (b1 & 0xffffff00) state->Cpsr |= (1 << 16);
|
|
||||||
if (b2 & 0xffffff00) state->Cpsr |= (1 << 17);
|
if (b1 & 0xffffff00)
|
||||||
if (b3 & 0xffffff00) state->Cpsr |= (1 << 18);
|
state->Cpsr |= (1 << 16);
|
||||||
if (b4 & 0xffffff00) state->Cpsr |= (1 << 19);
|
else
|
||||||
|
state->Cpsr &= ~(1 << 16);
|
||||||
|
|
||||||
|
if (b2 & 0xffffff00)
|
||||||
|
state->Cpsr |= (1 << 17);
|
||||||
|
else
|
||||||
|
state->Cpsr &= ~(1 << 17);
|
||||||
|
|
||||||
|
if (b3 & 0xffffff00)
|
||||||
|
state->Cpsr |= (1 << 18);
|
||||||
|
else
|
||||||
|
state->Cpsr &= ~(1 << 18);
|
||||||
|
|
||||||
|
|
||||||
|
if (b4 & 0xffffff00)
|
||||||
|
state->Cpsr |= (1 << 19);
|
||||||
|
else
|
||||||
|
state->Cpsr &= ~(1 << 19);
|
||||||
}
|
}
|
||||||
|
|
||||||
state->Reg[rd] = (u32)(b1 | (b2 & 0xff) << 8 | (b3 & 0xff) << 16 | (b4 & 0xff) << 24);
|
state->Reg[rd] = (u32)(b1 | (b2 & 0xff) << 8 | (b3 & 0xff) << 16 | (b4 & 0xff) << 24);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue