| 514 | } |
| 515 | |
| 516 | static void IndirectBlockDelinker(FEXCore::Core::CpuStateFrame* Frame, FEXCore::Context::ExitFunctionLinkData* Record) { |
| 517 | uintptr_t JumpThunkStartAddress = reinterpret_cast<uintptr_t>(Record) - 0x10; |
| 518 | uint32_t BranchInst = 0; |
| 519 | ARMEmitter::Emitter BranchEmit(reinterpret_cast<uint8_t*>(&BranchInst), 4); |
| 520 | BranchEmit.b(0x8); |
| 521 | |
| 522 | std::atomic_ref<uint32_t>(*reinterpret_cast<uint32_t*>(JumpThunkStartAddress)).store(BranchInst, std::memory_order::relaxed); |
| 523 | ARMEmitter::Emitter::ClearICache(reinterpret_cast<void*>(JumpThunkStartAddress), 4); |
| 524 | |
| 525 | // No need to reset HostCode here as the exit linker pointer is stored separately, and if the block is relinked it will be updated. |
| 526 | } |
| 527 | |
| 528 | uint64_t Arm64JITCore::ExitFunctionLink(FEXCore::Core::CpuStateFrame* Frame, FEXCore::Context::ExitFunctionLinkData* Record) { |
| 529 | auto Thread = Frame->Thread; |
nothing calls this directly
no test coverage detected