summaryrefslogtreecommitdiffstats
path: root/src/core/arm/dyncom
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-07-30 16:44:50 +0200
committerbunnei <bunneidev@gmail.com>2015-07-30 16:44:50 +0200
commitce65925bc384632a39bb066e5ff581100d1beb69 (patch)
tree63c5ea1e9d315ee21ca5731dd4404d0a8e9b6b11 /src/core/arm/dyncom
parentMerge pull request #1006 from yuriks/fb-commit-profile (diff)
parentdyncom: Handle the case where PC is the source register for STR/VSTM/VLDM (diff)
downloadyuzu-ce65925bc384632a39bb066e5ff581100d1beb69.tar
yuzu-ce65925bc384632a39bb066e5ff581100d1beb69.tar.gz
yuzu-ce65925bc384632a39bb066e5ff581100d1beb69.tar.bz2
yuzu-ce65925bc384632a39bb066e5ff581100d1beb69.tar.lz
yuzu-ce65925bc384632a39bb066e5ff581100d1beb69.tar.xz
yuzu-ce65925bc384632a39bb066e5ff581100d1beb69.tar.zst
yuzu-ce65925bc384632a39bb066e5ff581100d1beb69.zip
Diffstat (limited to 'src/core/arm/dyncom')
-rw-r--r--src/core/arm/dyncom/arm_dyncom_interpreter.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
index bb0cbb4dc..b88b74752 100644
--- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
+++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
@@ -5994,7 +5994,12 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) {
ldst_inst* inst_cream = (ldst_inst*)inst_base->component;
inst_cream->get_addr(cpu, inst_cream->inst, addr);
- unsigned int value = cpu->Reg[BITS(inst_cream->inst, 12, 15)];
+ unsigned int reg = BITS(inst_cream->inst, 12, 15);
+ unsigned int value = cpu->Reg[reg];
+
+ if (reg == 15)
+ value += 2 * cpu->GetInstructionSize();
+
cpu->WriteMemory32(addr, value);
}
cpu->Reg[15] += cpu->GetInstructionSize();