2014-09-12 22:34:51 +00:00
|
|
|
// Copyright 2014 Citra Emulator Project
|
2014-12-17 05:38:14 +00:00
|
|
|
// Licensed under GPLv2 or any later version
|
2014-11-19 08:49:13 +00:00
|
|
|
// Refer to the license.txt file included.
|
2014-09-12 22:34:51 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
#include "common/common_types.h"
|
|
|
|
|
|
|
|
#include "core/arm/arm_interface.h"
|
|
|
|
#include "core/arm/skyeye_common/armdefs.h"
|
|
|
|
|
|
|
|
class ARM_DynCom final : virtual public ARM_Interface {
|
|
|
|
public:
|
2015-02-12 20:11:39 +00:00
|
|
|
ARM_DynCom(PrivilegeMode initial_mode);
|
2014-09-12 22:34:51 +00:00
|
|
|
~ARM_DynCom();
|
|
|
|
|
2014-10-26 04:56:13 +00:00
|
|
|
void SetPC(u32 pc) override;
|
2014-12-24 03:45:52 +00:00
|
|
|
u32 GetPC() const override;
|
|
|
|
u32 GetReg(int index) const override;
|
2014-10-26 04:56:13 +00:00
|
|
|
void SetReg(int index, u32 value) override;
|
2014-12-24 03:45:52 +00:00
|
|
|
u32 GetCPSR() const override;
|
2014-10-26 04:56:13 +00:00
|
|
|
void SetCPSR(u32 cpsr) override;
|
2014-09-12 22:34:51 +00:00
|
|
|
|
2014-12-24 03:45:52 +00:00
|
|
|
void AddTicks(u64 ticks) override;
|
2014-09-12 22:34:51 +00:00
|
|
|
|
2015-01-26 06:56:17 +00:00
|
|
|
void ResetContext(Core::ThreadContext& context, u32 stack_top, u32 entry_point, u32 arg);
|
2014-12-22 06:30:09 +00:00
|
|
|
void SaveContext(Core::ThreadContext& ctx) override;
|
|
|
|
void LoadContext(const Core::ThreadContext& ctx) override;
|
2014-09-12 22:34:51 +00:00
|
|
|
|
2014-10-26 04:56:13 +00:00
|
|
|
void PrepareReschedule() override;
|
|
|
|
void ExecuteInstructions(int num_instructions) override;
|
2014-09-12 22:34:51 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::unique_ptr<ARMul_State> state;
|
|
|
|
};
|