SPURS: Fix some bugs

Conflicts:
	rpcs3/Emu/SysCalls/Modules/cellSpurs.cpp
This commit is contained in:
S Gopal Rajagopal 2015-03-10 00:51:05 +05:30 committed by Nekotekina
parent fe67504ffc
commit a800d21a31
10 changed files with 53 additions and 61 deletions

View file

@ -1115,19 +1115,24 @@ bool spursTasksetEntry(SPUThread & spu) {
bool spursTasksetSyscallEntry(SPUThread & spu) {
auto ctxt = vm::get_ptr<SpursTasksetContext>(spu.offset + 0x2700);
// Save task context
ctxt->savedContextLr = spu.GPR[0];
ctxt->savedContextSp = spu.GPR[1];
for (auto i = 0; i < 48; i++) {
ctxt->savedContextR80ToR127[i] = spu.GPR[80 + i];
try {
// Save task context
ctxt->savedContextLr = spu.GPR[0];
ctxt->savedContextSp = spu.GPR[1];
for (auto i = 0; i < 48; i++) {
ctxt->savedContextR80ToR127[i] = spu.GPR[80 + i];
}
// Handle the syscall
spu.GPR[3]._u32[3] = spursTasksetProcessSyscall(spu, spu.GPR[3]._u32[3], spu.GPR[4]._u32[3]);
// Resume the previously executing task if the syscall did not cause a context switch
if (spu.m_is_branch == false) {
spursTasksetResumeTask(spu);
}
}
// Handle the syscall
spu.GPR[3]._u32[3] = spursTasksetProcessSyscall(spu, spu.GPR[3]._u32[3], spu.GPR[4]._u32[3]);
// Resume the previously executing task if the syscall did not cause a context switch
if (spu.m_is_branch == false) {
spursTasksetResumeTask(spu);
catch (SpursModuleExit) {
}
return false;