Added thread fences to FiberBoost & fixed x64 build

This commit is contained in:
SSimco
2024-05-26 17:52:14 +03:00
parent f1dec91ae1
commit b50880e7d4
2 changed files with 4 additions and 2 deletions
@@ -130,7 +130,7 @@ void* ATTR_MS_ABI PPCRecompiler_virtualHLE(PPCInterpreter_t* hCPU, uint32 hleFun
hCPU->remainingCycles -= 500; // let subtract about 500 cycles for each HLE call
hCPU->gpr[3] = 0;
PPCInterpreter_nextInstruction(hCPU);
return ppcInterpreterCurrentInstance;
return PPCInterpreter_getCurrentInstance();
}
else
{
@@ -139,7 +139,7 @@ void* ATTR_MS_ABI PPCRecompiler_virtualHLE(PPCInterpreter_t* hCPU, uint32 hleFun
hleCall(hCPU);
}
hCPU->rspTemp = prevRSPTemp;
return ppcInterpreterCurrentInstance;
return PPCInterpreter_getCurrentInstance();
}
void ATTR_MS_ABI PPCRecompiler_getTBL(PPCInterpreter_t* hCPU, uint32 gprIndex)
+2
View File
@@ -68,7 +68,9 @@ void Fiber::Switch(Fiber& targetFiber)
FiberImpl* _targetFiber = static_cast<FiberImpl*>(targetFiber.m_implData);
_targetFiber->previousFiber = _currentFiber;
sCurrentFiber = &targetFiber;
std::atomic_thread_fence(std::memory_order_seq_cst);
auto transfer = boost::context::detail::jump_fcontext(_targetFiber->context, _targetFiber);
std::atomic_thread_fence(std::memory_order_seq_cst);
if (_currentFiber->previousFiber == nullptr)
{
return;