mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 14:35:07 +00:00
UserspaceEmulator: Set up a very basic program entry stack
This commit is contained in:
parent
76b9fb258d
commit
0eab5659f8
1 changed files with 5 additions and 0 deletions
|
@ -100,6 +100,11 @@ void Emulator::setup_stack()
|
|||
auto stack_region = make<SimpleRegion>(stack_location, stack_size);
|
||||
m_mmu.add_region(move(stack_region));
|
||||
m_cpu.set_esp(stack_location + stack_size);
|
||||
|
||||
m_cpu.push32(0);
|
||||
m_cpu.push32(0);
|
||||
m_cpu.push32(0);
|
||||
m_cpu.push32(0);
|
||||
}
|
||||
|
||||
int Emulator::exec(X86::SimpleInstructionStream& stream, u32 base)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue