1
Fork 0
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:
Andreas Kling 2020-07-11 16:30:17 +02:00
parent 76b9fb258d
commit 0eab5659f8

View file

@ -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)