summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2014-12-17 23:53:53 +0100
committerLioncash <mathew1800@gmail.com>2014-12-17 23:54:49 +0100
commit41fee1c94005f5848addb3da253b4f883b4b1a71 (patch)
treea739796d0c8cec59a83b2e41624343c7d7af8812
parentMerge pull request #293 from lioncash/sops (diff)
downloadyuzu-41fee1c94005f5848addb3da253b4f883b4b1a71.tar
yuzu-41fee1c94005f5848addb3da253b4f883b4b1a71.tar.gz
yuzu-41fee1c94005f5848addb3da253b4f883b4b1a71.tar.bz2
yuzu-41fee1c94005f5848addb3da253b4f883b4b1a71.tar.lz
yuzu-41fee1c94005f5848addb3da253b4f883b4b1a71.tar.xz
yuzu-41fee1c94005f5848addb3da253b4f883b4b1a71.tar.zst
yuzu-41fee1c94005f5848addb3da253b4f883b4b1a71.zip
-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 1a589e39c..b207416dd 100644
--- a/src/core/arm/interpreter/armemu.cpp
+++ b/src/core/arm/interpreter/armemu.cpp
@@ -5930,11 +5930,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;
}