Pretty sure ARM/Thread serialization works now

This commit is contained in:
Hamish Milne 2020-01-20 21:32:38 +00:00 committed by zhupengfei
parent c983528862
commit 246ae84a52
8 changed files with 40 additions and 13 deletions

View file

@ -94,10 +94,16 @@ void ARM_DynCom::InvalidateCacheRange(u32, std::size_t) {
ClearInstructionCache();
}
void ARM_DynCom::PageTableChanged() {
void ARM_DynCom::SetPageTable(const std::shared_ptr<Memory::PageTable>& page_table) {
ClearInstructionCache();
}
std::shared_ptr<Memory::PageTable> ARM_DynCom::GetPageTable() const {
return nullptr;
}
void ARM_DynCom::PurgeState() {}
void ARM_DynCom::SetPC(u32 pc) {
state->Reg[15] = pc;
}

View file

@ -29,7 +29,6 @@ public:
void ClearInstructionCache() override;
void InvalidateCacheRange(u32 start_address, std::size_t length) override;
void PageTableChanged() override;
void SetPC(u32 pc) override;
u32 GetPC() const override;
@ -48,7 +47,10 @@ public:
void SaveContext(const std::unique_ptr<ThreadContext>& arg) override;
void LoadContext(const std::unique_ptr<ThreadContext>& arg) override;
void SetPageTable(const std::shared_ptr<Memory::PageTable>& page_table) override;
std::shared_ptr<Memory::PageTable> GetPageTable() const override;
void PrepareReschedule() override;
void PurgeState() override;
private:
void ExecuteInstructions(u64 num_instructions);