diff options
author | Andreas Kling <kling@serenityos.org> | 2020-07-11 16:30:17 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-11 16:30:17 +0200 |
commit | 0eab5659f82594e8bf49ffa58814f22f293988a5 (patch) | |
tree | 97da0bf4be939fb6809c8bcda3eae826da19ec7c | |
parent | 76b9fb258dd3f15d6ae3977bc3b756a9f2b34e73 (diff) | |
download | serenity-0eab5659f82594e8bf49ffa58814f22f293988a5.zip |
UserspaceEmulator: Set up a very basic program entry stack
-rw-r--r-- | DevTools/UserspaceEmulator/Emulator.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/DevTools/UserspaceEmulator/Emulator.cpp b/DevTools/UserspaceEmulator/Emulator.cpp index f8dc12f254..624c6768e3 100644 --- a/DevTools/UserspaceEmulator/Emulator.cpp +++ b/DevTools/UserspaceEmulator/Emulator.cpp @@ -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) |