summaryrefslogtreecommitdiffstats
path: root/src/core/arm/nce
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/arm/nce')
-rw-r--r--src/core/arm/nce/arm_nce.cpp5
-rw-r--r--src/core/arm/nce/patch.cpp5
-rw-r--r--src/core/arm/nce/patch.h16
3 files changed, 9 insertions, 17 deletions
diff --git a/src/core/arm/nce/arm_nce.cpp b/src/core/arm/nce/arm_nce.cpp
index 511248a0d..fd82f3b0e 100644
--- a/src/core/arm/nce/arm_nce.cpp
+++ b/src/core/arm/nce/arm_nce.cpp
@@ -4,7 +4,6 @@
#include <cinttypes>
#include <memory>
-#include "common/scope_exit.h"
#include "common/signal_chain.h"
#include "core/arm/nce/arm_nce.h"
#include "core/arm/nce/patch.h"
@@ -32,7 +31,7 @@ static_assert(offsetof(NativeExecutionParameters, magic) == TpidrEl0TlsMagic);
fpsimd_context* GetFloatingPointState(mcontext_t& host_ctx) {
_aarch64_ctx* header = reinterpret_cast<_aarch64_ctx*>(&host_ctx.__reserved);
while (header->magic != FPSIMD_MAGIC) {
- header = reinterpret_cast<_aarch64_ctx*>((char*)header + header->size);
+ header = reinterpret_cast<_aarch64_ctx*>(reinterpret_cast<char*>(header) + header->size);
}
return reinterpret_cast<fpsimd_context*>(header);
}
@@ -124,7 +123,7 @@ bool ARM_NCE::HandleGuestFault(GuestContext* guest_ctx, void* raw_info, void* ra
// Forcibly mark the context as locked. We are still running.
// We may race with SignalInterrupt here:
- // - If we lose the race, then SignalInterrupt will send us a signal which are masking,
+ // - If we lose the race, then SignalInterrupt will send us a signal we are masking,
// and it will do nothing when it is unmasked, as we have already left guest code.
// - If we win the race, then SignalInterrupt will wait for us to unlock first.
auto& thread_params = guest_ctx->parent->running_thread->GetNativeExecutionParameters();
diff --git a/src/core/arm/nce/patch.cpp b/src/core/arm/nce/patch.cpp
index c79399c2b..bc4b73634 100644
--- a/src/core/arm/nce/patch.cpp
+++ b/src/core/arm/nce/patch.cpp
@@ -100,7 +100,7 @@ void Patcher::RelocateAndCopy(Common::ProcessAddress load_base,
const Kernel::CodeSet::Segment& code,
Kernel::PhysicalMemory& program_image,
EntryTrampolines* out_trampolines) {
- const size_t patch_size = SectionSize();
+ const size_t patch_size = GetSectionSize();
const size_t image_size = program_image.size();
// Retrieve text segment data.
@@ -180,7 +180,7 @@ void Patcher::RelocateAndCopy(Common::ProcessAddress load_base,
}
}
-size_t Patcher::SectionSize() const noexcept {
+size_t Patcher::GetSectionSize() const noexcept {
return Common::AlignUp(m_patch_instructions.size() * sizeof(u32), Core::Memory::YUZU_PAGESIZE);
}
@@ -256,7 +256,6 @@ void Patcher::WriteSaveContext() {
}
void Patcher::WriteSvcTrampoline(ModuleDestLabel module_dest, u32 svc_id) {
- LOG_ERROR(Core_ARM, "Patching SVC {:#x} at {:#x}", svc_id, module_dest - 4);
// We are about to start saving state, so we need to lock the context.
this->LockContext();
diff --git a/src/core/arm/nce/patch.h b/src/core/arm/nce/patch.h
index b727d4e48..dcce1bfc6 100644
--- a/src/core/arm/nce/patch.h
+++ b/src/core/arm/nce/patch.h
@@ -7,23 +7,17 @@
#include <unordered_map>
#include <vector>
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wshorten-64-to-32"
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshorten-64-to-32"
#include <oaknut/code_block.hpp>
#include <oaknut/oaknut.hpp>
-#pragma clang diagnostic pop
+#pragma GCC diagnostic pop
#include "common/common_types.h"
#include "core/hle/kernel/code_set.h"
#include "core/hle/kernel/k_typed_address.h"
#include "core/hle/kernel/physical_memory.h"
-#include <signal.h>
-
-namespace Core {
-struct GuestContext;
-}
-
namespace Core::NCE {
enum class PatchMode : u32 {
@@ -45,9 +39,9 @@ public:
const Kernel::CodeSet::Segment& code);
void RelocateAndCopy(Common::ProcessAddress load_base, const Kernel::CodeSet::Segment& code,
Kernel::PhysicalMemory& program_image, EntryTrampolines* out_trampolines);
- size_t SectionSize() const noexcept;
+ size_t GetSectionSize() const noexcept;
- [[nodiscard]] PatchMode Mode() const noexcept {
+ [[nodiscard]] PatchMode GetPatchMode() const noexcept {
return mode;
}