summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2014-12-18 04:06:27 +0100
committerbunnei <bunneidev@gmail.com>2014-12-18 04:06:27 +0100
commit797efbde1ae722653a894ec4e3d2fa64bb6a68fd (patch)
treeb5f9e73f1c730943e25f3b3d09e94533ee1e9a88 /src/core
parentMerge pull request #295 from lioncash/umaal (diff)
parentarmemu: Unset GE flags for UADD8 if results are < 0x100 (diff)
downloadyuzu-797efbde1ae722653a894ec4e3d2fa64bb6a68fd.tar
yuzu-797efbde1ae722653a894ec4e3d2fa64bb6a68fd.tar.gz
yuzu-797efbde1ae722653a894ec4e3d2fa64bb6a68fd.tar.bz2
yuzu-797efbde1ae722653a894ec4e3d2fa64bb6a68fd.tar.lz
yuzu-797efbde1ae722653a894ec4e3d2fa64bb6a68fd.tar.xz
yuzu-797efbde1ae722653a894ec4e3d2fa64bb6a68fd.tar.zst
yuzu-797efbde1ae722653a894ec4e3d2fa64bb6a68fd.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/arm/interpreter/armemu.cpp26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/core/arm/interpreter/armemu.cpp b/src/core/arm/interpreter/armemu.cpp
index a36035e96..3b1a36bdd 100644
--- a/src/core/arm/interpreter/armemu.cpp
+++ b/src/core/arm/interpreter/armemu.cpp
@@ -5958,11 +5958,29 @@ L_stm_s_takeabort:
b2 = ((u8)(from >> 8) + (u8)(to >> 8));
b3 = ((u8)(from >> 16) + (u8)(to >> 16));
b4 = ((u8)(from >> 24) + (u8)(to >> 24));
- if (b1 & 0xffffff00) state->Cpsr |= (1 << 16);
- if (b2 & 0xffffff00) state->Cpsr |= (1 << 17);
- if (b3 & 0xffffff00) state->Cpsr |= (1 << 18);
- if (b4 & 0xffffff00) state->Cpsr |= (1 << 19);
+
+ if (b1 & 0xffffff00)
+ state->Cpsr |= (1 << 16);
+ 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);
return 1;
}