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