summaryrefslogtreecommitdiffstats
path: root/src/core/arm/dyncom
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-02-01 06:28:29 +0100
committerbunnei <bunneidev@gmail.com>2015-02-01 06:28:29 +0100
commita4b1e8ce5239793814a19905ef912c10d3869e49 (patch)
treec80ea3a4035a20810fb5914f3bfc99f392376939 /src/core/arm/dyncom
parentMerge pull request #522 from lioncash/adios (diff)
parentarm: Clean up ARMul_State (diff)
downloadyuzu-a4b1e8ce5239793814a19905ef912c10d3869e49.tar
yuzu-a4b1e8ce5239793814a19905ef912c10d3869e49.tar.gz
yuzu-a4b1e8ce5239793814a19905ef912c10d3869e49.tar.bz2
yuzu-a4b1e8ce5239793814a19905ef912c10d3869e49.tar.lz
yuzu-a4b1e8ce5239793814a19905ef912c10d3869e49.tar.xz
yuzu-a4b1e8ce5239793814a19905ef912c10d3869e49.tar.zst
yuzu-a4b1e8ce5239793814a19905ef912c10d3869e49.zip
Diffstat (limited to 'src/core/arm/dyncom')
-rw-r--r--src/core/arm/dyncom/arm_dyncom.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/core/arm/dyncom/arm_dyncom.cpp b/src/core/arm/dyncom/arm_dyncom.cpp
index 01ffbcc87..f6628ca33 100644
--- a/src/core/arm/dyncom/arm_dyncom.cpp
+++ b/src/core/arm/dyncom/arm_dyncom.cpp
@@ -36,9 +36,8 @@ ARM_DynCom::ARM_DynCom() {
state->NextInstr = RESUME; // NOTE: This will be overwritten by LoadContext
state->Emulate = 3;
- state->pc = state->Reg[15] = 0x00000000;
+ state->Reg[15] = 0x00000000;
state->Reg[13] = 0x10000000; // Set stack pointer to the top of the stack
- state->servaddr = 0xFFFF0000;
state->NirqSig = HIGH;
VFPInit(state.get()); // Initialize the VFP
@@ -50,7 +49,7 @@ ARM_DynCom::~ARM_DynCom() {
}
void ARM_DynCom::SetPC(u32 pc) {
- state->pc = state->Reg[15] = pc;
+ state->Reg[15] = pc;
}
u32 ARM_DynCom::GetPC() const {
@@ -106,7 +105,6 @@ void ARM_DynCom::SaveContext(Core::ThreadContext& ctx) {
ctx.fpscr = state->VFP[1];
ctx.fpexc = state->VFP[2];
- ctx.reg_15 = state->Reg[15];
ctx.mode = state->NextInstr;
}
@@ -116,13 +114,12 @@ void ARM_DynCom::LoadContext(const Core::ThreadContext& ctx) {
state->Reg[13] = ctx.sp;
state->Reg[14] = ctx.lr;
- state->pc = ctx.pc;
+ state->Reg[15] = ctx.pc;
state->Cpsr = ctx.cpsr;
state->VFP[1] = ctx.fpscr;
state->VFP[2] = ctx.fpexc;
- state->Reg[15] = ctx.reg_15;
state->NextInstr = ctx.mode;
}