[CPU] Add syscall handler.

This commit is contained in:
gibbed
2021-06-28 12:48:27 -05:00
committed by Rick Gibbed
parent c6259241a2
commit 0cf4cab59b
3 changed files with 18 additions and 0 deletions

View File

@@ -426,6 +426,10 @@ int InstrEmit_sc(PPCHIRBuilder& f, const InstrData& i) {
// Game code should only ever use LEV=0.
// LEV=2 is to signify 'call import' from Xenia.
// TODO(gibbed): syscalls!
if (i.SC.LEV == 0) {
f.CallExtern(f.builtins()->syscall_handler);
return 0;
}
if (i.SC.LEV == 2) {
f.CallExtern(f.function());
return 0;