Implement main thread stack

This commit is contained in:
wheremyfoodat 2022-09-15 17:50:14 +03:00
parent 275c6dfd0c
commit c33d7e5dfb
3 changed files with 20 additions and 2 deletions

View file

@ -38,6 +38,7 @@ bool Emulator::loadELF(std::filesystem::path& path) {
if (!entrypoint.has_value())
return false;
cpu.setReg(13, VirtualAddrs::StackTop); // Set initial SP
cpu.setReg(15, entrypoint.value()); // Set initial PC
return true;
}