Final A32 refactor

This commit is contained in:
MerryMage 2018-01-04 21:12:02 +00:00
parent 455757d7b6
commit 9d15e0a8e1
29 changed files with 447 additions and 342 deletions

View file

@ -11,27 +11,29 @@
#include <memory>
#include <string>
#include <dynarmic/callbacks.h>
#include <dynarmic/A32/callbacks.h>
namespace Dynarmic {
struct Context;
namespace IR {
class LocationDescriptor;
}
}
namespace Dynarmic {
namespace A32 {
struct Context;
class Jit final {
public:
explicit Jit(Dynarmic::UserCallbacks callbacks);
explicit Jit(UserCallbacks callbacks);
~Jit();
/**
* Runs the emulated CPU for about cycle_count cycles.
* Runs the emulated CPU.
* Cannot be recursively called.
* @param cycle_count Estimated number of cycles to run the CPU for.
*/
void Run(std::size_t cycle_count);
void Run();
/**
* Clears the code cache of all compiled code.
@ -97,4 +99,5 @@ private:
std::unique_ptr<Impl> impl;
};
} // namespace A32
} // namespace Dynarmic

View file

@ -12,6 +12,7 @@
#include <memory>
namespace Dynarmic {
namespace A32 {
class Coprocessor;
class Jit;
@ -66,4 +67,5 @@ struct UserCallbacks {
std::array<std::shared_ptr<Coprocessor>, 16> coprocessors;
};
} // namespace A32
} // namespace Dynarmic

View file

@ -11,6 +11,7 @@
#include <memory>
namespace Dynarmic {
namespace A32 {
struct Context {
public:
@ -41,4 +42,5 @@ private:
std::unique_ptr<Impl> impl;
};
} // namespace A32
} // namespace Dynarmic

View file

@ -11,9 +11,10 @@
#include <boost/optional.hpp>
#include <boost/variant.hpp>
#include <dynarmic/coprocessor_util.h>
#include <dynarmic/A32/coprocessor_util.h>
namespace Dynarmic {
namespace A32 {
class Jit;
@ -21,8 +22,6 @@ class Coprocessor {
public:
virtual ~Coprocessor() = default;
using CoprocReg = A32::CoprocReg;
struct Callback {
/**
* @param jit CPU state
@ -109,4 +108,5 @@ public:
virtual boost::optional<Callback> CompileStoreWords(bool two, bool long_transfer, CoprocReg CRd, boost::optional<std::uint8_t> option) = 0;
};
} // namespace A32
} // namespace Dynarmic

View file

@ -10,10 +10,10 @@
#include <string>
namespace Dynarmic {
namespace Arm {
namespace A32 {
std::string DisassembleArm(std::uint32_t instruction);
std::string DisassembleThumb16(std::uint16_t instruction);
} // namespace Arm
} // namespace A32
} // namespace Dynarmic