From dccfe193a9caf5ce7aa75489f1722fee2a2073dd Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 29 Sep 2018 19:13:46 -0400 Subject: kernel/process: Add a data member to determine if a process is 64-bit or not. This will be necessary for the implementation of svcGetThreadContext(), as the kernel checks whether or not the process that owns the thread that has it context being retrieved is a 64-bit or 32-bit process. If the process is 32-bit, then the upper 15 general-purpose registers and upper 16 vector registers are cleared to zero (as AArch32 only has 15 GPRs and 16 128-bit vector registers. not 31 general-purpose registers and 32 128-bit vector registers like AArch64). --- src/core/hle/kernel/process.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core/hle/kernel/process.cpp') 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::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()); } -- cgit v1.2.3