Skip to content
Snippets Groups Projects
Commit 0f941d02 authored by Lioncash's avatar Lioncash
Browse files

dyncom: Reset the context into user mode correctly

The other mode was system mode.
parent 3c383190
No related branches found
No related tags found
No related merge requests found
...@@ -93,7 +93,7 @@ void ARM_DynCom::ResetContext(Core::ThreadContext& context, u32 stack_top, u32 e ...@@ -93,7 +93,7 @@ void ARM_DynCom::ResetContext(Core::ThreadContext& context, u32 stack_top, u32 e
context.cpu_registers[0] = arg; context.cpu_registers[0] = arg;
context.pc = entry_point; context.pc = entry_point;
context.sp = stack_top; context.sp = stack_top;
context.cpsr = 0x1F | ((entry_point & 1) << 5); // Usermode and THUMB mode context.cpsr = USER32MODE | ((entry_point & 1) << 5); // Usermode and THUMB mode
} }
void ARM_DynCom::SaveContext(Core::ThreadContext& ctx) { void ARM_DynCom::SaveContext(Core::ThreadContext& ctx) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment