Remove throw cpu_flag

This commit is contained in:
Nekotekina 2017-06-23 00:58:33 +03:00 committed by Ivan
parent aea094730b
commit d0b37777c3
3 changed files with 1 additions and 19 deletions

View file

@ -174,14 +174,8 @@ void sys_ppu_thread_exit(ppu_thread& ppu, u64 val)
// Deallocate TLS // Deallocate TLS
ppu_free_tls(vm::cast(ppu.gpr[13], HERE) - 0x7030); ppu_free_tls(vm::cast(ppu.gpr[13], HERE) - 0x7030);
if (ppu.gpr[3] == val)
{
// Change sys_ppu_thread_exit code to the syscall code (hack)
ppu.gpr[11] = 41;
}
// Call the syscall // Call the syscall
return _sys_ppu_thread_exit(ppu, val); _sys_ppu_thread_exit(ppu, val);
} }
error_code sys_ppu_thread_register_atexit(ppu_thread& ppu, vm::ptr<void()> func) error_code sys_ppu_thread_register_atexit(ppu_thread& ppu, vm::ptr<void()> func)

View file

@ -149,10 +149,4 @@ void sys_interrupt_thread_eoi(ppu_thread& ppu)
sys_interrupt.trace("sys_interrupt_thread_eoi()"); sys_interrupt.trace("sys_interrupt_thread_eoi()");
ppu.state += cpu_flag::ret; ppu.state += cpu_flag::ret;
// Throw if this syscall was not called directly by the SC instruction (hack)
if (ppu.lr == 0 || ppu.gpr[11] != 88)
{
throw cpu_flag::ret;
}
} }

View file

@ -55,12 +55,6 @@ void _sys_ppu_thread_exit(ppu_thread& ppu, u64 errorcode)
// Remove suspend state (TODO) // Remove suspend state (TODO)
ppu.state -= cpu_flag::suspend; ppu.state -= cpu_flag::suspend;
// Throw if this syscall was not called directly by the SC instruction (hack)
if (ppu.lr == 0 || ppu.gpr[11] != 41)
{
throw cpu_flag::exit;
}
} }
void sys_ppu_thread_yield(ppu_thread& ppu) void sys_ppu_thread_yield(ppu_thread& ppu)