diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/arm/dyncom/arm_dyncom_interpreter.cpp | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp index cfa6de8fc..a1a3119a5 100644 --- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp +++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp | |||
| @@ -2156,7 +2156,22 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(revsh)(unsigned int inst, int index) | |||
| 2156 | return INTERPRETER_TRANSLATE(rev)(inst, index); | 2156 | return INTERPRETER_TRANSLATE(rev)(inst, index); |
| 2157 | } | 2157 | } |
| 2158 | 2158 | ||
| 2159 | static ARM_INST_PTR INTERPRETER_TRANSLATE(rfe)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("RFE"); } | 2159 | static ARM_INST_PTR INTERPRETER_TRANSLATE(rfe)(unsigned int inst, int index) |
| 2160 | { | ||
| 2161 | arm_inst* const inst_base = (arm_inst*)AllocBuffer(sizeof(arm_inst) + sizeof(ldst_inst)); | ||
| 2162 | ldst_inst* const inst_cream = (ldst_inst*)inst_base->component; | ||
| 2163 | |||
| 2164 | inst_base->cond = AL; | ||
| 2165 | inst_base->idx = index; | ||
| 2166 | inst_base->br = INDIRECT_BRANCH; | ||
| 2167 | inst_base->load_r15 = 0; | ||
| 2168 | |||
| 2169 | inst_cream->inst = inst; | ||
| 2170 | inst_cream->get_addr = get_calc_addr_op(inst); | ||
| 2171 | |||
| 2172 | return inst_base; | ||
| 2173 | } | ||
| 2174 | |||
| 2160 | static ARM_INST_PTR INTERPRETER_TRANSLATE(rsb)(unsigned int inst, int index) | 2175 | static ARM_INST_PTR INTERPRETER_TRANSLATE(rsb)(unsigned int inst, int index) |
| 2161 | { | 2176 | { |
| 2162 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(rsb_inst)); | 2177 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(rsb_inst)); |
| @@ -5293,6 +5308,20 @@ unsigned InterpreterMainLoop(ARMul_State* state) { | |||
| 5293 | } | 5308 | } |
| 5294 | 5309 | ||
| 5295 | RFE_INST: | 5310 | RFE_INST: |
| 5311 | { | ||
| 5312 | // RFE is unconditional | ||
| 5313 | ldst_inst* const inst_cream = (ldst_inst*)inst_base->component; | ||
| 5314 | |||
| 5315 | u32 address = 0; | ||
| 5316 | inst_cream->get_addr(cpu, inst_cream->inst, address, 1); | ||
| 5317 | |||
| 5318 | cpu->Cpsr = ReadMemory32(cpu, address); | ||
| 5319 | cpu->Reg[15] = ReadMemory32(cpu, address + 4); | ||
| 5320 | |||
| 5321 | INC_PC(sizeof(ldst_inst)); | ||
| 5322 | goto DISPATCH; | ||
| 5323 | } | ||
| 5324 | |||
| 5296 | RSB_INST: | 5325 | RSB_INST: |
| 5297 | { | 5326 | { |
| 5298 | if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) { | 5327 | if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) { |