summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-09-30 01:13:46 +0200
committerLioncash <mathew1800@gmail.com>2018-09-30 11:29:40 +0200
commitdccfe193a9caf5ce7aa75489f1722fee2a2073dd (patch)
tree96da0ecc079ad4d5e26dc3b47e1fbd317ff93e43
parentkernel/process: Make data member variables private (diff)
downloadyuzu-dccfe193a9caf5ce7aa75489f1722fee2a2073dd.tar
yuzu-dccfe193a9caf5ce7aa75489f1722fee2a2073dd.tar.gz
yuzu-dccfe193a9caf5ce7aa75489f1722fee2a2073dd.tar.bz2
yuzu-dccfe193a9caf5ce7aa75489f1722fee2a2073dd.tar.lz
yuzu-dccfe193a9caf5ce7aa75489f1722fee2a2073dd.tar.xz
yuzu-dccfe193a9caf5ce7aa75489f1722fee2a2073dd.tar.zst
yuzu-dccfe193a9caf5ce7aa75489f1722fee2a2073dd.zip
-rw-r--r--src/core/hle/kernel/process.cpp1
-rw-r--r--src/core/hle/kernel/process.h10
2 files changed, 11 insertions, 0 deletions
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp
index a8e3098ca..dc9fc8470 100644
--- a/src/core/hle/kernel/process.cpp
+++ b/src/core/hle/kernel/process.cpp
@@ -47,6 +47,7 @@ SharedPtr<Process> Process::Create(KernelCore& kernel, std::string&& name) {
void Process::LoadFromMetadata(const FileSys::ProgramMetadata& metadata) {
program_id = metadata.GetTitleID();
+ is_64bit_process = metadata.Is64BitProgram();
vm_manager.Reset(metadata.GetAddressSpaceType());
}
diff --git a/src/core/hle/kernel/process.h b/src/core/hle/kernel/process.h
index 2dfb88fa9..590e0c73d 100644
--- a/src/core/hle/kernel/process.h
+++ b/src/core/hle/kernel/process.h
@@ -189,6 +189,11 @@ public:
return is_virtual_address_memory_enabled;
}
+ /// Whether this process is an AArch64 or AArch32 process.
+ bool Is64BitProcess() const {
+ return is_64bit_process;
+ }
+
/**
* Loads process-specifics configuration info with metadata provided
* by an executable.
@@ -287,6 +292,11 @@ private:
/// This vector will grow as more pages are allocated for new threads.
std::vector<std::bitset<8>> tls_slots;
+ /// Whether or not this process is AArch64, or AArch32.
+ /// By default, we currently assume this is true, unless otherwise
+ /// specified by metadata provided to the process during loading.
+ bool is_64bit_process = true;
+
std::string name;
};