summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2015-03-24 11:30:54 -0400
committerGravatar Lioncash2015-03-24 12:44:31 -0400
commita80d93685af509a58315c4ad41aafe19f59d75af (patch)
tree4fc5a1d5c3d22a02c83256e9bd94dea8972a2f32 /src
parentdyncom: Implement RFE (diff)
downloadyuzu-a80d93685af509a58315c4ad41aafe19f59d75af.tar.gz
yuzu-a80d93685af509a58315c4ad41aafe19f59d75af.tar.xz
yuzu-a80d93685af509a58315c4ad41aafe19f59d75af.zip
dyncom: Implement SRS
Diffstat (limited to 'src')
-rw-r--r--src/core/arm/dyncom/arm_dyncom_interpreter.cpp33
1 files changed, 32 insertions, 1 deletions
diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
index a1a3119a5..2765cb36e 100644
--- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
+++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
@@ -2585,7 +2585,23 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(smulw)(unsigned int inst, int index)
2585 inst_base->load_r15 = 1; 2585 inst_base->load_r15 = 1;
2586 return inst_base; 2586 return inst_base;
2587} 2587}
2588static ARM_INST_PTR INTERPRETER_TRANSLATE(srs)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SRS"); } 2588
2589static ARM_INST_PTR INTERPRETER_TRANSLATE(srs)(unsigned int inst, int index)
2590{
2591 arm_inst* const inst_base = (arm_inst*)AllocBuffer(sizeof(arm_inst) + sizeof(ldst_inst));
2592 ldst_inst* const inst_cream = (ldst_inst*)inst_base->component;
2593
2594 inst_base->cond = AL;
2595 inst_base->idx = index;
2596 inst_base->br = NON_BRANCH;
2597 inst_base->load_r15 = 0;
2598
2599 inst_cream->inst = inst;
2600 inst_cream->get_addr = get_calc_addr_op(inst);
2601
2602 return inst_base;
2603}
2604
2589static ARM_INST_PTR INTERPRETER_TRANSLATE(ssat)(unsigned int inst, int index) 2605static ARM_INST_PTR INTERPRETER_TRANSLATE(ssat)(unsigned int inst, int index)
2590{ 2606{
2591 arm_inst* const inst_base = (arm_inst*)AllocBuffer(sizeof(arm_inst) + sizeof(ssat_inst)); 2607 arm_inst* const inst_base = (arm_inst*)AllocBuffer(sizeof(arm_inst) + sizeof(ssat_inst));
@@ -5963,6 +5979,21 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
5963 } 5979 }
5964 5980
5965 SRS_INST: 5981 SRS_INST:
5982 {
5983 // SRS is unconditional
5984 ldst_inst* const inst_cream = (ldst_inst*)inst_base->component;
5985
5986 u32 address = 0;
5987 inst_cream->get_addr(cpu, inst_cream->inst, address, 1);
5988
5989 WriteMemory32(cpu, address + 0, cpu->Reg[14]);
5990 WriteMemory32(cpu, address + 4, cpu->Spsr_copy);
5991
5992 cpu->Reg[15] += GET_INST_SIZE(cpu);
5993 INC_PC(sizeof(ldst_inst));
5994 FETCH_INST;
5995 GOTO_NEXT_INST;
5996 }
5966 5997
5967 SSAT_INST: 5998 SSAT_INST:
5968 { 5999 {