physical_core: Make use of std::make_unique instead of std::make_shared in ctor

We can also allow unicorn to be constructed in 32-bit mode or 64-bit
mode to satisfy the need for both interpreter instances.

Allows this code to compile successfully of non x86-64 architectures.
This commit is contained in:
Lioncash 2020-04-24 00:07:38 -04:00
parent 26f2820ae3
commit cc84b48ce5
4 changed files with 15 additions and 8 deletions

View file

@ -185,10 +185,9 @@ void ARM_Dynarmic_64::Step() {
ARM_Dynarmic_64::ARM_Dynarmic_64(System& system, ExclusiveMonitor& exclusive_monitor,
std::size_t core_index)
: ARM_Interface{system},
cb(std::make_unique<DynarmicCallbacks64>(*this)), inner_unicorn{system},
core_index{core_index}, exclusive_monitor{
dynamic_cast<DynarmicExclusiveMonitor&>(exclusive_monitor)} {}
: ARM_Interface{system}, cb(std::make_unique<DynarmicCallbacks64>(*this)),
inner_unicorn{system, ARM_Unicorn::Arch::AArch64}, core_index{core_index},
exclusive_monitor{dynamic_cast<DynarmicExclusiveMonitor&>(exclusive_monitor)} {}
ARM_Dynarmic_64::~ARM_Dynarmic_64() = default;