From e74b2575d7f8491dac3b0b613ee1cb1a5eddedaf Mon Sep 17 00:00:00 2001 From: SachinVin Date: Sun, 23 Oct 2022 11:55:00 +0530 Subject: [PATCH] clang format --- src/core/arm/dynarmic/arm_dynarmic.h | 6 +++--- src/core/arm/dynarmic/arm_exclusive_monitor.cpp | 3 ++- src/core/arm/dynarmic/arm_exclusive_monitor.h | 2 +- src/core/arm/dyncom/arm_dyncom.h | 2 +- src/core/core.cpp | 4 ++-- src/core/core.h | 2 +- src/core/memory.cpp | 6 ++++-- 7 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/core/arm/dynarmic/arm_dynarmic.h b/src/core/arm/dynarmic/arm_dynarmic.h index 797d070afd..45d7a4ac68 100644 --- a/src/core/arm/dynarmic/arm_dynarmic.h +++ b/src/core/arm/dynarmic/arm_dynarmic.h @@ -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 timer, - Core::ExclusiveMonitor& exclusive_monitor_); + std::shared_ptr timer, + Core::ExclusiveMonitor& exclusive_monitor_); ~ARM_Dynarmic() override; void Run() override; diff --git a/src/core/arm/dynarmic/arm_exclusive_monitor.cpp b/src/core/arm/dynarmic/arm_exclusive_monitor.cpp index 67dfbbb9c5..b8ac82582c 100644 --- a/src/core/arm/dynarmic/arm_exclusive_monitor.cpp +++ b/src/core/arm/dynarmic/arm_exclusive_monitor.cpp @@ -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; diff --git a/src/core/arm/dynarmic/arm_exclusive_monitor.h b/src/core/arm/dynarmic/arm_exclusive_monitor.h index 1da9264ac7..05f9f391f8 100644 --- a/src/core/arm/dynarmic/arm_exclusive_monitor.h +++ b/src/core/arm/dynarmic/arm_exclusive_monitor.h @@ -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; diff --git a/src/core/arm/dyncom/arm_dyncom.h b/src/core/arm/dyncom/arm_dyncom.h index 9863237c71..75f25bebfd 100644 --- a/src/core/arm/dyncom/arm_dyncom.h +++ b/src/core/arm/dyncom/arm_dyncom.h @@ -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; diff --git a/src/core/core.cpp b/src/core/core.cpp index 478a404554..1ed72a3d93 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -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(this, *memory, i, timing->GetTimer(i), *exclusive_monitor)); + cpu_cores.push_back(std::make_shared( + this, *memory, i, timing->GetTimer(i), *exclusive_monitor)); } #else for (u32 i = 0; i < num_cores; ++i) { diff --git a/src/core/core.h b/src/core/core.h index e48a0f3abc..1ea2d9b55c 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -364,7 +364,7 @@ private: std::unique_ptr kernel; std::unique_ptr timing; - std::unique_ptr exclusive_monitor; + std::unique_ptr exclusive_monitor; private: static System s_instance; diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 2bc2a815bc..5f4963485c 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -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(&page_pointer[vaddr & PAGE_MASK]); + const auto volatile_pointer = + reinterpret_cast(&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(GetPointerForRasterizerCache(vaddr).GetPtr()); + const auto volatile_pointer = + reinterpret_cast(GetPointerForRasterizerCache(vaddr).GetPtr()); return Common::AtomicCompareAndSwap(volatile_pointer, data, expected); } case PageType::Special: