Remove throwing and catching cpu_flag::stop
Since there is spu_runtime::g_escape function now.
This commit is contained in:
@@ -344,10 +344,6 @@ void cpu_thread::operator()()
|
|||||||
{
|
{
|
||||||
cpu_task();
|
cpu_task();
|
||||||
}
|
}
|
||||||
catch (cpu_flag _s)
|
|
||||||
{
|
|
||||||
state += _s;
|
|
||||||
}
|
|
||||||
catch (const std::exception& e)
|
catch (const std::exception& e)
|
||||||
{
|
{
|
||||||
Emu.Pause();
|
Emu.Pause();
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include "Emu/Cell/PPUModule.h"
|
#include "Emu/Cell/PPUModule.h"
|
||||||
|
|
||||||
#include "Emu/Cell/SPUThread.h"
|
#include "Emu/Cell/SPUThread.h"
|
||||||
|
#include "Emu/Cell/SPURecompiler.h"
|
||||||
#include "Emu/Cell/lv2/sys_lwmutex.h"
|
#include "Emu/Cell/lv2/sys_lwmutex.h"
|
||||||
#include "Emu/Cell/lv2/sys_lwcond.h"
|
#include "Emu/Cell/lv2/sys_lwcond.h"
|
||||||
#include "Emu/Cell/lv2/sys_spu.h"
|
#include "Emu/Cell/lv2/sys_spu.h"
|
||||||
@@ -1799,7 +1800,7 @@ void spursTasksetDispatch(spu_thread& spu)
|
|||||||
{
|
{
|
||||||
// TODO: Figure this out
|
// TODO: Figure this out
|
||||||
spu.status |= SPU_STATUS_STOPPED_BY_STOP;
|
spu.status |= SPU_STATUS_STOPPED_BY_STOP;
|
||||||
throw cpu_flag::stop;
|
spu_runtime::g_escape(&spu);
|
||||||
}
|
}
|
||||||
|
|
||||||
spursTasksetStartTask(spu, taskInfo->args);
|
spursTasksetStartTask(spu, taskInfo->args);
|
||||||
@@ -1853,7 +1854,7 @@ void spursTasksetDispatch(spu_thread& spu)
|
|||||||
{
|
{
|
||||||
// TODO: Figure this out
|
// TODO: Figure this out
|
||||||
spu.status |= SPU_STATUS_STOPPED_BY_STOP;
|
spu.status |= SPU_STATUS_STOPPED_BY_STOP;
|
||||||
throw cpu_flag::stop;
|
spu_runtime::g_escape(&spu);
|
||||||
}
|
}
|
||||||
|
|
||||||
spu.gpr[3].clear();
|
spu.gpr[3].clear();
|
||||||
|
|||||||
@@ -868,19 +868,7 @@ void ppu_thread::fast_call(u32 addr, u32 rtoc)
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
try
|
exec_task();
|
||||||
{
|
|
||||||
exec_task();
|
|
||||||
}
|
|
||||||
catch (cpu_flag _s)
|
|
||||||
{
|
|
||||||
state += _s;
|
|
||||||
|
|
||||||
if (_s != cpu_flag::ret)
|
|
||||||
{
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 ppu_thread::stack_push(u32 size, u32 align_v)
|
u32 ppu_thread::stack_push(u32 size, u32 align_v)
|
||||||
|
|||||||
@@ -3125,7 +3125,8 @@ void spu_thread::halt()
|
|||||||
|
|
||||||
int_ctrl[2].set(SPU_INT2_STAT_SPU_HALT_OR_STEP_INT);
|
int_ctrl[2].set(SPU_INT2_STAT_SPU_HALT_OR_STEP_INT);
|
||||||
|
|
||||||
throw cpu_flag::stop;
|
state += cpu_flag::stop;
|
||||||
|
spu_runtime::g_escape(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
status |= SPU_STATUS_STOPPED_BY_HALT;
|
status |= SPU_STATUS_STOPPED_BY_HALT;
|
||||||
@@ -3144,15 +3145,7 @@ void spu_thread::fast_call(u32 ls_addr)
|
|||||||
pc = ls_addr;
|
pc = ls_addr;
|
||||||
gpr[0]._u32[3] = 0x0;
|
gpr[0]._u32[3] = 0x0;
|
||||||
|
|
||||||
try
|
cpu_task();
|
||||||
{
|
|
||||||
cpu_task();
|
|
||||||
}
|
|
||||||
catch (cpu_flag _s)
|
|
||||||
{
|
|
||||||
state += _s;
|
|
||||||
if (_s != cpu_flag::ret) throw;
|
|
||||||
}
|
|
||||||
|
|
||||||
state -= cpu_flag::ret;
|
state -= cpu_flag::ret;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user