mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-27 09:12:46 +01:00
armemu: Fix lower-bounds clamping for USAT16
This commit is contained in:
parent
6b632bbe37
commit
e683f654ce
1 changed files with 6 additions and 1 deletions
|
@ -6201,10 +6201,15 @@ L_stm_s_takeabort:
|
|||
|
||||
if (max < rn_lo)
|
||||
rn_lo = max;
|
||||
else if (rn_lo < 0)
|
||||
rn_lo = 0;
|
||||
|
||||
if (max < rn_hi)
|
||||
rn_hi = max;
|
||||
else if (rn_hi < 0)
|
||||
rn_hi = 0;
|
||||
|
||||
state->Reg[rd_idx] = (rn_lo & 0xFFFF) | (rn_hi);
|
||||
state->Reg[rd_idx] = (rn_lo & 0xFFFF) | ((rn_hi << 16) & 0xFFFF);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue