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"
|
2015-06-21 14:11:32 +00:00
|
|
|
#include "core/arm/skyeye_common/arm_regformat.h"
|
2015-07-26 01:10:41 +00:00
|
|
|
#include "core/arm/skyeye_common/armstate.h"
|
2015-06-21 14:11:32 +00:00
|
|
|
|
|
|
|
namespace Core {
|
|
|
|
struct ThreadContext;
|
|
|
|
}
|
2014-09-12 22:34:51 +00:00
|
|
|
|
|
|
|
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();
|
|
|
|
|
2016-06-27 18:38:49 +00:00
|
|
|
void ClearInstructionCache() override;
|
|
|
|
|
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;
|
2015-08-07 01:24:25 +00:00
|
|
|
u32 GetVFPReg(int index) const override;
|
|
|
|
void SetVFPReg(int index, u32 value) override;
|
|
|
|
u32 GetVFPSystemReg(VFPSystemRegister reg) const override;
|
|
|
|
void SetVFPSystemReg(VFPSystemRegister reg, 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;
|
2015-04-06 16:57:49 +00:00
|
|
|
u32 GetCP15Register(CP15Register reg) override;
|
|
|
|
void SetCP15Register(CP15Register reg, u32 value) 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-04-14 19:15:42 +00:00
|
|
|
void ResetContext(Core::ThreadContext& context, u32 stack_top, u32 entry_point, u32 arg) override;
|
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;
|
|
|
|
};
|