summaryrefslogtreecommitdiffstats
path: root/src/core/loader
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/loader/deconstructed_rom_directory.cpp6
-rw-r--r--src/core/loader/nro.cpp6
-rw-r--r--src/core/loader/nso.cpp6
3 files changed, 9 insertions, 9 deletions
diff --git a/src/core/loader/deconstructed_rom_directory.cpp b/src/core/loader/deconstructed_rom_directory.cpp
index 31c00f0a3..a1344f1c4 100644
--- a/src/core/loader/deconstructed_rom_directory.cpp
+++ b/src/core/loader/deconstructed_rom_directory.cpp
@@ -15,7 +15,7 @@
#include "core/loader/deconstructed_rom_directory.h"
#include "core/loader/nso.h"
-#ifdef ARCHITECTURE_arm64
+#ifdef HAS_NCE
#include "core/arm/nce/patch.h"
#endif
@@ -141,12 +141,12 @@ AppLoader_DeconstructedRomDirectory::LoadResult AppLoader_DeconstructedRomDirect
std::size_t code_size{};
// Define an nce patch context for each potential module.
-#ifdef ARCHITECTURE_arm64
+#ifdef HAS_NCE
std::array<Core::NCE::Patcher, 13> module_patchers;
#endif
const auto GetPatcher = [&](size_t i) -> Core::NCE::Patcher* {
-#ifdef ARCHITECTURE_arm64
+#ifdef HAS_NCE
if (Settings::IsNceEnabled()) {
return &module_patchers[i];
}
diff --git a/src/core/loader/nro.cpp b/src/core/loader/nro.cpp
index 49d4d7e43..2e7368349 100644
--- a/src/core/loader/nro.cpp
+++ b/src/core/loader/nro.cpp
@@ -22,7 +22,7 @@
#include "core/loader/nso.h"
#include "core/memory.h"
-#ifdef ARCHITECTURE_arm64
+#ifdef HAS_NCE
#include "core/arm/nce/patch.h"
#endif
@@ -201,7 +201,7 @@ static bool LoadNroImpl(Core::System& system, Kernel::KProcess& process,
program_image.resize(static_cast<u32>(program_image.size()) + bss_size);
size_t image_size = program_image.size();
-#ifdef ARCHITECTURE_arm64
+#ifdef HAS_NCE
const auto& code = codeset.CodeSegment();
// NROs always have a 39-bit address space.
@@ -247,7 +247,7 @@ static bool LoadNroImpl(Core::System& system, Kernel::KProcess& process,
// Relocate code patch and copy to the program_image if running under NCE.
// This needs to be after LoadFromMetadata so we can use the process entry point.
-#ifdef ARCHITECTURE_arm64
+#ifdef HAS_NCE
if (Settings::IsNceEnabled()) {
patch.RelocateAndCopy(process.GetEntryPoint(), code, program_image,
&process.GetPostHandlers());
diff --git a/src/core/loader/nso.cpp b/src/core/loader/nso.cpp
index 1ad2e917c..878c1c6cb 100644
--- a/src/core/loader/nso.cpp
+++ b/src/core/loader/nso.cpp
@@ -20,7 +20,7 @@
#include "core/loader/nso.h"
#include "core/memory.h"
-#ifdef ARCHITECTURE_arm64
+#ifdef HAS_NCE
#include "core/arm/nce/patch.h"
#endif
@@ -93,7 +93,7 @@ std::optional<VAddr> AppLoader_NSO::LoadModule(Kernel::KProcess& process, Core::
// Allocate some space at the beginning if we are patching in PreText mode.
const size_t module_start = [&]() -> size_t {
-#ifdef ARCHITECTURE_arm64
+#ifdef HAS_NCE
if (patch && patch->GetPatchMode() == Core::NCE::PatchMode::PreText) {
return patch->GetSectionSize();
}
@@ -155,7 +155,7 @@ std::optional<VAddr> AppLoader_NSO::LoadModule(Kernel::KProcess& process, Core::
std::copy(pi_header.begin() + sizeof(NSOHeader), pi_header.end(), program_image.data());
}
-#ifdef ARCHITECTURE_arm64
+#ifdef HAS_NCE
// If we are computing the process code layout and using nce backend, patch.
const auto& code = codeset.CodeSegment();
if (patch && patch->GetPatchMode() == Core::NCE::PatchMode::None) {