summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2017-02-20 04:45:46 +0100
committerGitHub <noreply@github.com>2017-02-20 04:45:46 +0100
commitbb448ae66fc1ac2bf44c4875fefdc98ba3647c50 (patch)
treecbc5698b8191304af3746c72d3c825d886751e3b /src/core
parentMerge pull request #2580 from yuriks/qt-cleanup2 (diff)
parentdyncom: Correct SXTAB16 and SXTB16 (diff)
downloadyuzu-bb448ae66fc1ac2bf44c4875fefdc98ba3647c50.tar
yuzu-bb448ae66fc1ac2bf44c4875fefdc98ba3647c50.tar.gz
yuzu-bb448ae66fc1ac2bf44c4875fefdc98ba3647c50.tar.bz2
yuzu-bb448ae66fc1ac2bf44c4875fefdc98ba3647c50.tar.lz
yuzu-bb448ae66fc1ac2bf44c4875fefdc98ba3647c50.tar.xz
yuzu-bb448ae66fc1ac2bf44c4875fefdc98ba3647c50.tar.zst
yuzu-bb448ae66fc1ac2bf44c4875fefdc98ba3647c50.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/arm/dyncom/arm_dyncom_interpreter.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
index 67c45640a..273bc8167 100644
--- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
+++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
@@ -3928,13 +3928,13 @@ SXTB16_INST : {
if (inst_cream->Rn == 15) {
u32 lo = (u32)(s8)rm_val;
u32 hi = (u32)(s8)(rm_val >> 16);
- RD = (lo | (hi << 16));
+ RD = (lo & 0xFFFF) | (hi << 16);
}
// SXTAB16
else {
- u32 lo = (rn_val & 0xFFFF) + (u32)(s8)(rm_val & 0xFF);
- u32 hi = ((rn_val >> 16) & 0xFFFF) + (u32)(s8)((rm_val >> 16) & 0xFF);
- RD = (lo | (hi << 16));
+ u32 lo = rn_val + (u32)(s8)(rm_val & 0xFF);
+ u32 hi = (rn_val >> 16) + (u32)(s8)((rm_val >> 16) & 0xFF);
+ RD = (lo & 0xFFFF) | (hi << 16);
}
}