1
0
Fork 0

clang format

This commit is contained in:
SachinVin 2022-10-23 11:55:00 +05:30
parent ae6b7edc25
commit e74b2575d7
7 changed files with 14 additions and 11 deletions

View File

@ -20,15 +20,15 @@ namespace Core {
class DynarmicExclusiveMonitor;
class ExclusiveMonitor;
class System;
}
} // namespace Core
class DynarmicUserCallbacks;
class ARM_Dynarmic final : public ARM_Interface {
public:
explicit ARM_Dynarmic(Core::System* system_, Memory::MemorySystem& memory_, u32 core_id_,
std::shared_ptr<Core::Timing::Timer> timer,
Core::ExclusiveMonitor& exclusive_monitor_);
std::shared_ptr<Core::Timing::Timer> timer,
Core::ExclusiveMonitor& exclusive_monitor_);
~ARM_Dynarmic() override;
void Run() override;

View File

@ -6,7 +6,8 @@
namespace Core {
DynarmicExclusiveMonitor::DynarmicExclusiveMonitor(Memory::MemorySystem& memory_, std::size_t core_count_)
DynarmicExclusiveMonitor::DynarmicExclusiveMonitor(Memory::MemorySystem& memory_,
std::size_t core_count_)
: monitor{core_count_}, memory{memory_} {}
DynarmicExclusiveMonitor::~DynarmicExclusiveMonitor() = default;

View File

@ -17,7 +17,7 @@ namespace Core {
class DynarmicExclusiveMonitor final : public ExclusiveMonitor {
public:
explicit DynarmicExclusiveMonitor( Memory::MemorySystem& memory_, std::size_t core_count_);
explicit DynarmicExclusiveMonitor(Memory::MemorySystem& memory_, std::size_t core_count_);
~DynarmicExclusiveMonitor() override;
u8 ExclusiveRead8(std::size_t core_index, VAddr addr) override;

View File

@ -30,7 +30,7 @@ public:
void ClearInstructionCache() override;
void InvalidateCacheRange(u32 start_address, std::size_t length) override;
void ClearExclusiveState() override {};
void ClearExclusiveState() override{};
void SetPC(u32 pc) override;
u32 GetPC() const override;

View File

@ -369,8 +369,8 @@ System::ResultStatus System::Init(Frontend::EmuWindow& emu_window, u32 system_mo
if (Settings::values.use_cpu_jit) {
#if defined(ARCHITECTURE_x86_64) || defined(ARCHITECTURE_arm64)
for (u32 i = 0; i < num_cores; ++i) {
cpu_cores.push_back(
std::make_shared<ARM_Dynarmic>(this, *memory, i, timing->GetTimer(i), *exclusive_monitor));
cpu_cores.push_back(std::make_shared<ARM_Dynarmic>(
this, *memory, i, timing->GetTimer(i), *exclusive_monitor));
}
#else
for (u32 i = 0; i < num_cores; ++i) {

View File

@ -364,7 +364,7 @@ private:
std::unique_ptr<Kernel::KernelSystem> kernel;
std::unique_ptr<Timing> timing;
std::unique_ptr<Core::ExclusiveMonitor> exclusive_monitor;
std::unique_ptr<Core::ExclusiveMonitor> exclusive_monitor;
private:
static System s_instance;

View File

@ -379,7 +379,8 @@ bool MemorySystem::WriteExclusive(const VAddr vaddr, const T data, const T expec
u8* page_pointer = impl->current_page_table->pointers[vaddr >> PAGE_BITS];
if (page_pointer) {
const auto volatile_pointer = reinterpret_cast<volatile T*>(&page_pointer[vaddr & PAGE_MASK]);
const auto volatile_pointer =
reinterpret_cast<volatile T*>(&page_pointer[vaddr & PAGE_MASK]);
return Common::AtomicCompareAndSwap(volatile_pointer, data, expected);
}
@ -394,7 +395,8 @@ bool MemorySystem::WriteExclusive(const VAddr vaddr, const T data, const T expec
return true;
case PageType::RasterizerCachedMemory: {
RasterizerFlushVirtualRegion(vaddr, sizeof(T), FlushMode::Invalidate);
const auto volatile_pointer = reinterpret_cast<volatile T*>(GetPointerForRasterizerCache(vaddr).GetPtr());
const auto volatile_pointer =
reinterpret_cast<volatile T*>(GetPointerForRasterizerCache(vaddr).GetPtr());
return Common::AtomicCompareAndSwap(volatile_pointer, data, expected);
}
case PageType::Special: