| 369 | } |
| 370 | |
| 371 | void ContextImpl::InitializeCompiler(FEXCore::Core::InternalThreadState* Thread) { |
| 372 | Thread->OpDispatcher = fextl::make_unique<FEXCore::IR::OpDispatchBuilder>(this); |
| 373 | Thread->OpDispatcher->SetMultiblock(Config.Multiblock); |
| 374 | Thread->LookupCache = fextl::make_unique<FEXCore::LookupCache>(this); |
| 375 | Thread->FrontendDecoder = fextl::make_unique<FEXCore::Frontend::Decoder>(Thread); |
| 376 | Thread->PassManager = fextl::make_unique<FEXCore::IR::PassManager>(); |
| 377 | |
| 378 | Thread->CurrentFrame->Pointers.Common.L1Pointer = Thread->LookupCache->GetL1Pointer(); |
| 379 | Thread->CurrentFrame->Pointers.Common.L2Pointer = Thread->LookupCache->GetPagePointer(); |
| 380 | |
| 381 | Dispatcher->InitThreadPointers(Thread); |
| 382 | |
| 383 | Thread->PassManager->AddDefaultPasses(this); |
| 384 | Thread->PassManager->AddDefaultValidationPasses(); |
| 385 | |
| 386 | Thread->PassManager->RegisterSyscallHandler(SyscallHandler); |
| 387 | |
| 388 | // Create CPU backend |
| 389 | Thread->PassManager->InsertRegisterAllocationPass(this); |
| 390 | Thread->CPUBackend = FEXCore::CPU::CreateArm64JITCore(this, Thread); |
| 391 | |
| 392 | Thread->PassManager->Finalize(); |
| 393 | } |
| 394 | |
| 395 | FEXCore::Core::InternalThreadState* |
| 396 | ContextImpl::CreateThread(uint64_t InitialRIP, uint64_t StackPointer, const FEXCore::Core::CPUState* NewThreadState) { |
nothing calls this directly
no test coverage detected