mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-20 22:05:12 +00:00
SPURS: Fix some bugs
Conflicts: rpcs3/Emu/SysCalls/Modules/cellSpurs.cpp
This commit is contained in:
parent
fe67504ffc
commit
a800d21a31
10 changed files with 53 additions and 61 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue