summaryrefslogtreecommitdiff
path: root/src/core/loader/nso.cpp
diff options
context:
space:
mode:
authorGravatar GPUCode2023-11-20 15:52:18 +0200
committerGravatar t8952023-11-25 00:47:36 -0500
commit3ec3cca4d8d4e1733cbc337b0499ad3bdcdf52b0 (patch)
tree4f8cb57560d4aa06d73a799537945b5a842460b2 /src/core/loader/nso.cpp
parentcommon: Enforce fastmem for nce usage (diff)
downloadyuzu-3ec3cca4d8d4e1733cbc337b0499ad3bdcdf52b0.tar.gz
yuzu-3ec3cca4d8d4e1733cbc337b0499ad3bdcdf52b0.tar.xz
yuzu-3ec3cca4d8d4e1733cbc337b0499ad3bdcdf52b0.zip
core: Define HAS_NCE macro
Diffstat (limited to 'src/core/loader/nso.cpp')
-rw-r--r--src/core/loader/nso.cpp6
1 files changed, 3 insertions, 3 deletions
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 @@
20#include "core/loader/nso.h" 20#include "core/loader/nso.h"
21#include "core/memory.h" 21#include "core/memory.h"
22 22
23#ifdef ARCHITECTURE_arm64 23#ifdef HAS_NCE
24#include "core/arm/nce/patch.h" 24#include "core/arm/nce/patch.h"
25#endif 25#endif
26 26
@@ -93,7 +93,7 @@ std::optional<VAddr> AppLoader_NSO::LoadModule(Kernel::KProcess& process, Core::
93 93
94 // Allocate some space at the beginning if we are patching in PreText mode. 94 // Allocate some space at the beginning if we are patching in PreText mode.
95 const size_t module_start = [&]() -> size_t { 95 const size_t module_start = [&]() -> size_t {
96#ifdef ARCHITECTURE_arm64 96#ifdef HAS_NCE
97 if (patch && patch->GetPatchMode() == Core::NCE::PatchMode::PreText) { 97 if (patch && patch->GetPatchMode() == Core::NCE::PatchMode::PreText) {
98 return patch->GetSectionSize(); 98 return patch->GetSectionSize();
99 } 99 }
@@ -155,7 +155,7 @@ std::optional<VAddr> AppLoader_NSO::LoadModule(Kernel::KProcess& process, Core::
155 std::copy(pi_header.begin() + sizeof(NSOHeader), pi_header.end(), program_image.data()); 155 std::copy(pi_header.begin() + sizeof(NSOHeader), pi_header.end(), program_image.data());
156 } 156 }
157 157
158#ifdef ARCHITECTURE_arm64 158#ifdef HAS_NCE
159 // If we are computing the process code layout and using nce backend, patch. 159 // If we are computing the process code layout and using nce backend, patch.
160 const auto& code = codeset.CodeSegment(); 160 const auto& code = codeset.CodeSegment();
161 if (patch && patch->GetPatchMode() == Core::NCE::PatchMode::None) { 161 if (patch && patch->GetPatchMode() == Core::NCE::PatchMode::None) {