mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-30 10:42:47 +01:00
armemu: Fix lower-bound signed saturation clamping for QADD16/QSUB16.
This commit is contained in:
parent
49817e89d9
commit
4c53799229
1 changed files with 2 additions and 2 deletions
|
@ -5867,12 +5867,12 @@ L_stm_s_takeabort:
|
||||||
|
|
||||||
if (lo_result > 0x7FFF)
|
if (lo_result > 0x7FFF)
|
||||||
lo_result = 0x7FFF;
|
lo_result = 0x7FFF;
|
||||||
else if (lo_result < 0x7FFF)
|
else if (lo_result < -0x8000)
|
||||||
lo_result = -0x8000;
|
lo_result = -0x8000;
|
||||||
|
|
||||||
if (hi_result > 0x7FFF)
|
if (hi_result > 0x7FFF)
|
||||||
hi_result = 0x7FFF;
|
hi_result = 0x7FFF;
|
||||||
else if (hi_result < 0x7FFF)
|
else if (hi_result < -0x8000)
|
||||||
hi_result = -0x8000;
|
hi_result = -0x8000;
|
||||||
|
|
||||||
state->Reg[rd_idx] = (lo_result & 0xFFFF) | ((hi_result & 0xFFFF) << 16);
|
state->Reg[rd_idx] = (lo_result & 0xFFFF) | ((hi_result & 0xFFFF) << 16);
|
||||||
|
|
Loading…
Reference in a new issue