Clang Format.
This commit is contained in:
parent
3714f2e471
commit
467d43570e
14 changed files with 49 additions and 48 deletions
|
@ -35,26 +35,26 @@ bool AtomicCompareAndSwap(u64 volatile* pointer, u64 value, u64 expected) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AtomicCompareAndSwap(u64 volatile* pointer, u128 value, u128 expected) {
|
bool AtomicCompareAndSwap(u64 volatile* pointer, u128 value, u128 expected) {
|
||||||
return _InterlockedCompareExchange128((__int64*)pointer, value[1], value[0], (__int64*)expected.data()) != 0;
|
return _InterlockedCompareExchange128((__int64*)pointer, value[1], value[0],
|
||||||
|
(__int64*)expected.data()) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
bool AtomicCompareAndSwap(u8 volatile* pointer, u8 value, u8 expected) {
|
bool AtomicCompareAndSwap(u8 volatile* pointer, u8 value, u8 expected) {
|
||||||
return __sync_bool_compare_and_swap (pointer, value, expected);
|
return __sync_bool_compare_and_swap(pointer, value, expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AtomicCompareAndSwap(u16 volatile* pointer, u16 value, u16 expected) {
|
bool AtomicCompareAndSwap(u16 volatile* pointer, u16 value, u16 expected) {
|
||||||
return __sync_bool_compare_and_swap (pointer, value, expected);
|
return __sync_bool_compare_and_swap(pointer, value, expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AtomicCompareAndSwap(u32 volatile* pointer, u32 value, u32 expected) {
|
bool AtomicCompareAndSwap(u32 volatile* pointer, u32 value, u32 expected) {
|
||||||
return __sync_bool_compare_and_swap (pointer, value, expected);
|
return __sync_bool_compare_and_swap(pointer, value, expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AtomicCompareAndSwap(u64 volatile* pointer, u64 value, u64 expected) {
|
bool AtomicCompareAndSwap(u64 volatile* pointer, u64 value, u64 expected) {
|
||||||
return __sync_bool_compare_and_swap (pointer, value, expected);
|
return __sync_bool_compare_and_swap(pointer, value, expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AtomicCompareAndSwap(u64 volatile* pointer, u128 value, u128 expected) {
|
bool AtomicCompareAndSwap(u64 volatile* pointer, u128 value, u128 expected) {
|
||||||
|
@ -62,7 +62,7 @@ bool AtomicCompareAndSwap(u64 volatile* pointer, u128 value, u128 expected) {
|
||||||
unsigned __int128 expected_a;
|
unsigned __int128 expected_a;
|
||||||
std::memcpy(&value_a, value.data(), sizeof(u128));
|
std::memcpy(&value_a, value.data(), sizeof(u128));
|
||||||
std::memcpy(&expected_a, expected.data(), sizeof(u128));
|
std::memcpy(&expected_a, expected.data(), sizeof(u128));
|
||||||
return __sync_bool_compare_and_swap ((unsigned __int128*)pointer, value_a, expected_a);
|
return __sync_bool_compare_and_swap((unsigned __int128*)pointer, value_a, expected_a);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
namespace Common {
|
namespace Common {
|
||||||
|
|
||||||
bool AtomicCompareAndSwap(u8 volatile * pointer, u8 value, u8 expected);
|
bool AtomicCompareAndSwap(u8 volatile* pointer, u8 value, u8 expected);
|
||||||
bool AtomicCompareAndSwap(u16 volatile* pointer, u16 value, u16 expected);
|
bool AtomicCompareAndSwap(u16 volatile* pointer, u16 value, u16 expected);
|
||||||
bool AtomicCompareAndSwap(u32 volatile* pointer, u32 value, u32 expected);
|
bool AtomicCompareAndSwap(u32 volatile* pointer, u32 value, u32 expected);
|
||||||
bool AtomicCompareAndSwap(u64 volatile* pointer, u64 value, u64 expected);
|
bool AtomicCompareAndSwap(u64 volatile* pointer, u64 value, u64 expected);
|
||||||
|
|
|
@ -63,8 +63,8 @@ static bool UnmappedMemoryHook(uc_engine* uc, uc_mem_type type, u64 addr, int si
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ARM_Unicorn::ARM_Unicorn(System& system, CPUInterrupts& interrupt_handlers,
|
ARM_Unicorn::ARM_Unicorn(System& system, CPUInterrupts& interrupt_handlers, bool uses_wall_clock,
|
||||||
bool uses_wall_clock, Arch architecture, std::size_t core_index)
|
Arch architecture, std::size_t core_index)
|
||||||
: ARM_Interface{system, interrupt_handlers, uses_wall_clock}, core_index{core_index} {
|
: ARM_Interface{system, interrupt_handlers, uses_wall_clock}, core_index{core_index} {
|
||||||
const auto arch = architecture == Arch::AArch32 ? UC_ARCH_ARM : UC_ARCH_ARM64;
|
const auto arch = architecture == Arch::AArch32 ? UC_ARCH_ARM : UC_ARCH_ARM64;
|
||||||
CHECKED(uc_open(arch, UC_MODE_ARM, &uc));
|
CHECKED(uc_open(arch, UC_MODE_ARM, &uc));
|
||||||
|
|
|
@ -20,8 +20,8 @@ public:
|
||||||
AArch64, // 64-bit ARM
|
AArch64, // 64-bit ARM
|
||||||
};
|
};
|
||||||
|
|
||||||
explicit ARM_Unicorn(System& system, CPUInterrupts& interrupt_handlers,
|
explicit ARM_Unicorn(System& system, CPUInterrupts& interrupt_handlers, bool uses_wall_clock,
|
||||||
bool uses_wall_clock, Arch architecture, std::size_t core_index);
|
Arch architecture, std::size_t core_index);
|
||||||
~ARM_Unicorn() override;
|
~ARM_Unicorn() override;
|
||||||
|
|
||||||
void SetPC(u64 pc) override;
|
void SetPC(u64 pc) override;
|
||||||
|
|
|
@ -148,8 +148,6 @@ public:
|
||||||
*/
|
*/
|
||||||
ResultStatus Pause();
|
ResultStatus Pause();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Step the CPU one instruction
|
* Step the CPU one instruction
|
||||||
* @return Result status, indicating whether or not the operation succeeded.
|
* @return Result status, indicating whether or not the operation succeeded.
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/core.h"
|
|
||||||
#include "core/hle/kernel/errors.h"
|
#include "core/hle/kernel/errors.h"
|
||||||
#include "core/hle/kernel/handle_table.h"
|
#include "core/hle/kernel/handle_table.h"
|
||||||
#include "core/hle/kernel/kernel.h"
|
#include "core/hle/kernel/kernel.h"
|
||||||
|
|
|
@ -29,7 +29,8 @@ public:
|
||||||
Handle requesting_thread_handle);
|
Handle requesting_thread_handle);
|
||||||
|
|
||||||
/// Unlocks a mutex for owner at address
|
/// Unlocks a mutex for owner at address
|
||||||
std::pair<ResultCode, std::shared_ptr<Thread>> Unlock(std::shared_ptr<Thread> owner, VAddr address);
|
std::pair<ResultCode, std::shared_ptr<Thread>> Unlock(std::shared_ptr<Thread> owner,
|
||||||
|
VAddr address);
|
||||||
|
|
||||||
/// Releases the mutex at the specified address.
|
/// Releases the mutex at the specified address.
|
||||||
ResultCode Release(VAddr address);
|
ResultCode Release(VAddr address);
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include "core/arm/cpu_interrupt_handler.h"
|
#include "core/arm/cpu_interrupt_handler.h"
|
||||||
|
|
||||||
namespace Common {
|
namespace Common {
|
||||||
class SpinLock;
|
class SpinLock;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Kernel {
|
namespace Kernel {
|
||||||
|
@ -27,8 +27,7 @@ namespace Kernel {
|
||||||
|
|
||||||
class PhysicalCore {
|
class PhysicalCore {
|
||||||
public:
|
public:
|
||||||
PhysicalCore(Core::System& system, std::size_t id,
|
PhysicalCore(Core::System& system, std::size_t id, Kernel::Scheduler& scheduler,
|
||||||
Kernel::Scheduler& scheduler,
|
|
||||||
Core::CPUInterruptHandler& interrupt_handler);
|
Core::CPUInterruptHandler& interrupt_handler);
|
||||||
~PhysicalCore();
|
~PhysicalCore();
|
||||||
|
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
#include "core/hle/kernel/hle_ipc.h"
|
#include "core/hle/kernel/hle_ipc.h"
|
||||||
#include "core/hle/kernel/kernel.h"
|
#include "core/hle/kernel/kernel.h"
|
||||||
#include "core/hle/kernel/process.h"
|
#include "core/hle/kernel/process.h"
|
||||||
|
#include "core/hle/kernel/scheduler.h"
|
||||||
#include "core/hle/kernel/server_session.h"
|
#include "core/hle/kernel/server_session.h"
|
||||||
#include "core/hle/kernel/session.h"
|
#include "core/hle/kernel/session.h"
|
||||||
#include "core/hle/kernel/scheduler.h"
|
|
||||||
#include "core/hle/kernel/thread.h"
|
#include "core/hle/kernel/thread.h"
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,6 @@ void EmuThread::run() {
|
||||||
|
|
||||||
gpu.ReleaseContext();
|
gpu.ReleaseContext();
|
||||||
|
|
||||||
|
|
||||||
// Holds whether the cpu was running during the last iteration,
|
// Holds whether the cpu was running during the last iteration,
|
||||||
// so that the DebugModeLeft signal can be emitted before the
|
// so that the DebugModeLeft signal can be emitted before the
|
||||||
// next execution step
|
// next execution step
|
||||||
|
|
|
@ -62,7 +62,8 @@ public:
|
||||||
if (!running) {
|
if (!running) {
|
||||||
running_wait.Set();
|
running_wait.Set();
|
||||||
/// Wait until effectively paused
|
/// Wait until effectively paused
|
||||||
while (running_guard);
|
while (running_guard)
|
||||||
|
;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,8 @@ std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeCallstack::GetChildren() cons
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto backtrace = Core::ARM_Interface::GetBacktraceFromContext(Core::System::GetInstance(), thread.GetContext64());
|
auto backtrace = Core::ARM_Interface::GetBacktraceFromContext(Core::System::GetInstance(),
|
||||||
|
thread.GetContext64());
|
||||||
|
|
||||||
for (auto& entry : backtrace) {
|
for (auto& entry : backtrace) {
|
||||||
std::string s = fmt::format("{:20}{:016X} {:016X} {:016X} {}", entry.module, entry.address,
|
std::string s = fmt::format("{:20}{:016X} {:016X} {:016X} {}", entry.module, entry.address,
|
||||||
|
|
|
@ -534,7 +534,8 @@ void GMainWindow::InitializeWidgets() {
|
||||||
if (emulation_running) {
|
if (emulation_running) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bool is_async = !Settings::values.use_asynchronous_gpu_emulation || Settings::values.use_multi_core;
|
bool is_async =
|
||||||
|
!Settings::values.use_asynchronous_gpu_emulation || Settings::values.use_multi_core;
|
||||||
Settings::values.use_asynchronous_gpu_emulation = is_async;
|
Settings::values.use_asynchronous_gpu_emulation = is_async;
|
||||||
async_status_button->setChecked(Settings::values.use_asynchronous_gpu_emulation);
|
async_status_button->setChecked(Settings::values.use_asynchronous_gpu_emulation);
|
||||||
Settings::Apply();
|
Settings::Apply();
|
||||||
|
@ -552,7 +553,8 @@ void GMainWindow::InitializeWidgets() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Settings::values.use_multi_core = !Settings::values.use_multi_core;
|
Settings::values.use_multi_core = !Settings::values.use_multi_core;
|
||||||
bool is_async = Settings::values.use_asynchronous_gpu_emulation || Settings::values.use_multi_core;
|
bool is_async =
|
||||||
|
Settings::values.use_asynchronous_gpu_emulation || Settings::values.use_multi_core;
|
||||||
Settings::values.use_asynchronous_gpu_emulation = is_async;
|
Settings::values.use_asynchronous_gpu_emulation = is_async;
|
||||||
async_status_button->setChecked(Settings::values.use_asynchronous_gpu_emulation);
|
async_status_button->setChecked(Settings::values.use_asynchronous_gpu_emulation);
|
||||||
multicore_status_button->setChecked(Settings::values.use_multi_core);
|
multicore_status_button->setChecked(Settings::values.use_multi_core);
|
||||||
|
@ -1958,7 +1960,8 @@ void GMainWindow::OnConfigure() {
|
||||||
|
|
||||||
dock_status_button->setChecked(Settings::values.use_docked_mode);
|
dock_status_button->setChecked(Settings::values.use_docked_mode);
|
||||||
multicore_status_button->setChecked(Settings::values.use_multi_core);
|
multicore_status_button->setChecked(Settings::values.use_multi_core);
|
||||||
Settings::values.use_asynchronous_gpu_emulation = Settings::values.use_asynchronous_gpu_emulation || Settings::values.use_multi_core;
|
Settings::values.use_asynchronous_gpu_emulation =
|
||||||
|
Settings::values.use_asynchronous_gpu_emulation || Settings::values.use_multi_core;
|
||||||
async_status_button->setChecked(Settings::values.use_asynchronous_gpu_emulation);
|
async_status_button->setChecked(Settings::values.use_asynchronous_gpu_emulation);
|
||||||
|
|
||||||
#ifdef HAS_VULKAN
|
#ifdef HAS_VULKAN
|
||||||
|
|
Loading…
Reference in a new issue