diff options
author | Lioncash <mathew1800@gmail.com> | 2014-12-18 22:50:41 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2014-12-18 22:54:01 +0100 |
commit | e683f654ce2b143fb34c3a36d889d08af310db9c (patch) | |
tree | 31a79f607aec155b53d909428e109631cce21a6f | |
parent | armemu: More concise names for USAT16-related variables (diff) | |
download | yuzu-e683f654ce2b143fb34c3a36d889d08af310db9c.tar yuzu-e683f654ce2b143fb34c3a36d889d08af310db9c.tar.gz yuzu-e683f654ce2b143fb34c3a36d889d08af310db9c.tar.bz2 yuzu-e683f654ce2b143fb34c3a36d889d08af310db9c.tar.lz yuzu-e683f654ce2b143fb34c3a36d889d08af310db9c.tar.xz yuzu-e683f654ce2b143fb34c3a36d889d08af310db9c.tar.zst yuzu-e683f654ce2b143fb34c3a36d889d08af310db9c.zip |
-rw-r--r-- | src/core/arm/interpreter/armemu.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/arm/interpreter/armemu.cpp b/src/core/arm/interpreter/armemu.cpp index ae865aa72..99fc6c45d 100644 --- a/src/core/arm/interpreter/armemu.cpp +++ b/src/core/arm/interpreter/armemu.cpp @@ -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; } |