Disable exception handling.

Use -fno-exceptions in cmake.
On MSVC, enable _HAS_EXCEPTION=0.
Cleanup throw/catch from the source.
Create yaml.cpp enclave because it needs exception to work.
Disable thread_local optimizations in logs.cpp (TODO).
Implement cpu_counter for cpu_threads (moved globals).
This commit is contained in:
Nekotekina 2020-03-09 19:18:39 +03:00
parent 47bbfdd2aa
commit 04dedb17eb
39 changed files with 421 additions and 437 deletions

View file

@ -114,7 +114,9 @@ void cellSpursModuleExit(spu_thread& spu)
{
auto ctxt = vm::_ptr<SpursKernelContext>(spu.offset + 0x100);
spu.pc = ctxt->exitToKernelAddr;
throw SpursModuleExit();
// TODO: use g_escape for actual long jump
//throw SpursModuleExit();
}
// Execute a DMA operation
@ -728,7 +730,6 @@ bool spursSysServiceEntry(spu_thread& spu)
auto arg = spu.gpr[4]._u64[1];
auto pollStatus = spu.gpr[5]._u32[3];
try
{
if (ctxt->wklCurrentId == CELL_SPURS_SYS_SERVICE_WORKLOAD_ID)
{
@ -743,10 +744,6 @@ bool spursSysServiceEntry(spu_thread& spu)
cellSpursModuleExit(spu);
}
catch (SpursModuleExit)
{
}
return false;
}
@ -1326,7 +1323,6 @@ bool spursTasksetEntry(spu_thread& spu)
//spu.RegisterHleFunction(CELL_SPURS_TASKSET_PM_ENTRY_ADDR, spursTasksetEntry);
//spu.RegisterHleFunction(ctxt->syscallAddr, spursTasksetSyscallEntry);
try
{
// Initialise the taskset policy module
spursTasksetInit(spu, pollStatus);
@ -1334,9 +1330,6 @@ bool spursTasksetEntry(spu_thread& spu)
// Dispatch
spursTasksetDispatch(spu);
}
catch (SpursModuleExit)
{
}
return false;
}
@ -1346,7 +1339,6 @@ bool spursTasksetSyscallEntry(spu_thread& spu)
{
auto ctxt = vm::_ptr<SpursTasksetContext>(spu.offset + 0x2700);
try
{
// Save task context
ctxt->savedContextLr = spu.gpr[0];
@ -1365,9 +1357,6 @@ bool spursTasksetSyscallEntry(spu_thread& spu)
// spursTasksetResumeTask(spu);
//}
}
catch (SpursModuleExit)
{
}
return false;
}