mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 13:25:45 +00:00
arm: ResetContext shouldn't be part of ARM_Interface.
This commit is contained in:
parent
5a7c1e9b5d
commit
acdc361fc0
6 changed files with 17 additions and 30 deletions
|
@ -93,15 +93,6 @@ void ARM_DynCom::ExecuteInstructions(int num_instructions) {
|
|||
AddTicks(ticks_executed);
|
||||
}
|
||||
|
||||
void ARM_DynCom::ResetContext(Core::ThreadContext& context, u32 stack_top, u32 entry_point, u32 arg) {
|
||||
memset(&context, 0, sizeof(Core::ThreadContext));
|
||||
|
||||
context.cpu_registers[0] = arg;
|
||||
context.pc = entry_point;
|
||||
context.sp = stack_top;
|
||||
context.cpsr = USER32MODE | ((entry_point & 1) << 5); // Usermode and THUMB mode
|
||||
}
|
||||
|
||||
void ARM_DynCom::SaveContext(Core::ThreadContext& ctx) {
|
||||
memcpy(ctx.cpu_registers, state->Reg.data(), sizeof(ctx.cpu_registers));
|
||||
memcpy(ctx.fpu_registers, state->ExtReg.data(), sizeof(ctx.fpu_registers));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue