summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2015-07-19 22:30:39 -0400
committerGravatar Lioncash2015-07-19 22:30:39 -0400
commit25652e5cd5f8c3bcf2e4e4eb8c63162a9cc4b797 (patch)
tree0319859f690d80419b1e689fa70eed6edd47c306 /src
parentMerge pull request #949 from yuriks/fix-st (diff)
parentdyncom: Properly retrieve the PC value in BX if used. (diff)
downloadyuzu-25652e5cd5f8c3bcf2e4e4eb8c63162a9cc4b797.tar.gz
yuzu-25652e5cd5f8c3bcf2e4e4eb8c63162a9cc4b797.tar.xz
yuzu-25652e5cd5f8c3bcf2e4e4eb8c63162a9cc4b797.zip
Merge pull request #950 from lioncash/bx
dyncom: Properly retrieve the PC value in BX if used.
Diffstat (limited to 'src')
-rw-r--r--src/core/arm/dyncom/arm_dyncom_interpreter.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
index 34cfb8cb2..e40f3fa93 100644
--- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
+++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
@@ -4144,11 +4144,13 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) {
4144 if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) { 4144 if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
4145 bx_inst* const inst_cream = (bx_inst*)inst_base->component; 4145 bx_inst* const inst_cream = (bx_inst*)inst_base->component;
4146 4146
4147 u32 address = RM;
4148
4147 if (inst_cream->Rm == 15) 4149 if (inst_cream->Rm == 15)
4148 LOG_WARNING(Core_ARM11, "BX at pc %x: use of Rm = R15 is discouraged", cpu->Reg[15]); 4150 address += 2 * GET_INST_SIZE(cpu);
4149 4151
4150 cpu->TFlag = cpu->Reg[inst_cream->Rm] & 0x1; 4152 cpu->TFlag = address & 1;
4151 cpu->Reg[15] = cpu->Reg[inst_cream->Rm] & 0xfffffffe; 4153 cpu->Reg[15] = address & 0xfffffffe;
4152 INC_PC(sizeof(bx_inst)); 4154 INC_PC(sizeof(bx_inst));
4153 goto DISPATCH; 4155 goto DISPATCH;
4154 } 4156 }