diff options
author | GPUCode <geoster3d@gmail.com> | 2023-11-18 15:10:39 +0100 |
---|---|---|
committer | t895 <clombardo169@gmail.com> | 2023-11-25 06:47:28 +0100 |
commit | 8fab363237083a8130a7b2a023cd9c5dd83f8f4f (patch) | |
tree | fa94b90be48a5debe83b414119da5b8419dd463c /src/core | |
parent | arm: Implement native code execution backend (diff) | |
download | yuzu-8fab363237083a8130a7b2a023cd9c5dd83f8f4f.tar yuzu-8fab363237083a8130a7b2a023cd9c5dd83f8f4f.tar.gz yuzu-8fab363237083a8130a7b2a023cd9c5dd83f8f4f.tar.bz2 yuzu-8fab363237083a8130a7b2a023cd9c5dd83f8f4f.tar.lz yuzu-8fab363237083a8130a7b2a023cd9c5dd83f8f4f.tar.xz yuzu-8fab363237083a8130a7b2a023cd9c5dd83f8f4f.tar.zst yuzu-8fab363237083a8130a7b2a023cd9c5dd83f8f4f.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/loader/deconstructed_rom_directory.cpp | 6 | ||||
-rw-r--r-- | src/core/loader/nro.cpp | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/core/loader/deconstructed_rom_directory.cpp b/src/core/loader/deconstructed_rom_directory.cpp index e7fc8f438..31c00f0a3 100644 --- a/src/core/loader/deconstructed_rom_directory.cpp +++ b/src/core/loader/deconstructed_rom_directory.cpp @@ -129,8 +129,10 @@ AppLoader_DeconstructedRomDirectory::LoadResult AppLoader_DeconstructedRomDirect } metadata.Print(); - // Enable NCE only for 64-bit programs. - Settings::SetNceEnabled(metadata.Is64BitProgram()); + // Enable NCE only for programs with 39-bit address space. + const bool is_39bit = + metadata.GetAddressSpaceType() == FileSys::ProgramAddressSpaceType::Is39Bit; + Settings::SetNceEnabled(is_39bit); const std::array static_modules = {"rtld", "main", "subsdk0", "subsdk1", "subsdk2", "subsdk3", "subsdk4", "subsdk5", "subsdk6", "subsdk7", diff --git a/src/core/loader/nro.cpp b/src/core/loader/nro.cpp index 49cf90317..76ff38041 100644 --- a/src/core/loader/nro.cpp +++ b/src/core/loader/nro.cpp @@ -199,6 +199,7 @@ static bool LoadNroImpl(Core::System& system, Kernel::KProcess& process, codeset.DataSegment().size += bss_size; program_image.resize(static_cast<u32>(program_image.size()) + bss_size); + size_t image_size = program_image.size(); #ifdef ARCHITECTURE_arm64 const auto& code = codeset.CodeSegment(); @@ -208,7 +209,6 @@ static bool LoadNroImpl(Core::System& system, Kernel::KProcess& process, // Create NCE patcher Core::NCE::Patcher patch{}; - size_t image_size = program_image.size(); if (Settings::IsNceEnabled()) { // Patch SVCs and MRS calls in the guest code |