diff options
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index d132aba34..da0cb26b6 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -13,7 +13,6 @@ | |||
| 13 | #include "common/logging/log.h" | 13 | #include "common/logging/log.h" |
| 14 | #include "common/thread_queue_list.h" | 14 | #include "common/thread_queue_list.h" |
| 15 | #include "core/arm/arm_interface.h" | 15 | #include "core/arm/arm_interface.h" |
| 16 | #include "core/arm/unicorn/arm_unicorn.h" | ||
| 17 | #include "core/core.h" | 16 | #include "core/core.h" |
| 18 | #include "core/cpu_manager.h" | 17 | #include "core/cpu_manager.h" |
| 19 | #include "core/hardware_properties.h" | 18 | #include "core/hardware_properties.h" |
| @@ -217,8 +216,7 @@ ResultVal<std::shared_ptr<Thread>> Thread::Create(Core::System& system, ThreadTy | |||
| 217 | } else { | 216 | } else { |
| 218 | thread->tls_address = 0; | 217 | thread->tls_address = 0; |
| 219 | } | 218 | } |
| 220 | // TODO(peachum): move to ScheduleThread() when scheduler is added so selected core is used | 219 | |
| 221 | // to initialize the context | ||
| 222 | thread->arm_interface.reset(); | 220 | thread->arm_interface.reset(); |
| 223 | if ((type_flags & THREADTYPE_HLE) == 0) { | 221 | if ((type_flags & THREADTYPE_HLE) == 0) { |
| 224 | #ifdef ARCHITECTURE_x86_64 | 222 | #ifdef ARCHITECTURE_x86_64 |
| @@ -231,19 +229,10 @@ ResultVal<std::shared_ptr<Thread>> Thread::Create(Core::System& system, ThreadTy | |||
| 231 | system, kernel.Interrupts(), kernel.IsMulticore(), kernel.GetExclusiveMonitor(), | 229 | system, kernel.Interrupts(), kernel.IsMulticore(), kernel.GetExclusiveMonitor(), |
| 232 | processor_id); | 230 | processor_id); |
| 233 | } | 231 | } |
| 234 | |||
| 235 | #else | 232 | #else |
| 236 | if (owner_process && !owner_process->Is64BitProcess()) { | 233 | #error Platform not supported yet. |
| 237 | thread->arm_interface = std::make_shared<Core::ARM_Unicorn>( | ||
| 238 | system, kernel.Interrupts(), kernel.IsMulticore(), ARM_Unicorn::Arch::AArch32, | ||
| 239 | processor_id); | ||
| 240 | } else { | ||
| 241 | thread->arm_interface = std::make_shared<Core::ARM_Unicorn>( | ||
| 242 | system, kernel.Interrupts(), kernel.IsMulticore(), ARM_Unicorn::Arch::AArch64, | ||
| 243 | processor_id); | ||
| 244 | } | ||
| 245 | LOG_WARNING(Core, "CPU JIT requested, but Dynarmic not available"); | ||
| 246 | #endif | 234 | #endif |
| 235 | |||
| 247 | ResetThreadContext32(thread->context_32, static_cast<u32>(stack_top), | 236 | ResetThreadContext32(thread->context_32, static_cast<u32>(stack_top), |
| 248 | static_cast<u32>(entry_point), static_cast<u32>(arg)); | 237 | static_cast<u32>(entry_point), static_cast<u32>(arg)); |
| 249 | ResetThreadContext64(thread->context_64, stack_top, entry_point, arg); | 238 | ResetThreadContext64(thread->context_64, stack_top, entry_point, arg); |