mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 17:53:42 +01:00
Plumb through the PC value for syscalls, so we can get better diagnostics for unresolved ones.
This commit is contained in:
1 parent
ae14ebb6ac
commit
67ddf899ba
23 files changed
+208
-89
No files matched your search
@@ -193,13 +193,20 @@ void RiscVJitBackend::CompIR_System(IRInst inst) {
|
||||
// Skip the CallSyscall where possible.
|
||||
{
|
||||
MIPSOpcode op(inst.constant);
|
||||
void *quickFunc = GetQuickSyscallFunc(op);
|
||||
if (quickFunc) {
|
||||
LI(X10, (uintptr_t)GetSyscallFuncPointer(op));
|
||||
QuickCallFunction((const u8 *)quickFunc, SCRATCH2);
|
||||
const HLEFunction *func = GetSyscallFunctionData(op, 0);
|
||||
if (func) {
|
||||
void *quickFunc = GetQuickSyscallFunc(func, op);
|
||||
if (quickFunc) {
|
||||
LI(X10, (uintptr_t)func);
|
||||
QuickCallFunction((const u8 *)quickFunc, SCRATCH2);
|
||||
} else {
|
||||
LI(X10, (int32_t)inst.constant);
|
||||
QuickCallFunction(&CallSyscall, SCRATCH2);
|
||||
}
|
||||
} else {
|
||||
LI(X10, (int32_t)inst.constant);
|
||||
QuickCallFunction(&CallSyscall, SCRATCH2);
|
||||
// Shouldn't get here.
|
||||
LI(X10, 0);
|
||||
QuickCallFunction(&CallSyscallUnresolvedAtPC, SCRATCH2);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user