diff --git a/Core/HLE/HLE.cpp b/Core/HLE/HLE.cpp index a625701c08..0e34f918f6 100644 --- a/Core/HLE/HLE.cpp +++ b/Core/HLE/HLE.cpp @@ -175,24 +175,18 @@ const char *GetFuncName(const char *moduleName, u32 nib) return temp; } -u32 GetSyscallOp(const char *moduleName, u32 nib) -{ +u32 GetSyscallOp(const char *moduleName, u32 nib) { // Special case to hook up bad imports. - if (moduleName == NULL) - { + if (moduleName == NULL) { return (0x03FFFFCC); // invalid syscall } int modindex = GetModuleIndex(moduleName); - if (modindex != -1) - { + if (modindex != -1) { int funcindex = GetFuncIndex(modindex, nib); - if (funcindex != -1) - { + if (funcindex != -1) { return (0x0000000c | (modindex<<18) | (funcindex<<6)); - } - else - { + } else { INFO_LOG(HLE, "Syscall (%s, %08x) unknown", moduleName, nib); return (0x0003FFCC | (modindex<<18)); // invalid syscall } @@ -484,7 +478,7 @@ const HLEFunction *GetSyscallFuncPointer(MIPSOpcode op) int funcnum = callno & 0xFFF; int modulenum = (callno & 0xFF000) >> 12; if (funcnum == 0xfff) { - ERROR_LOG(HLE, "Unknown syscall: Module: %s", modulenum > (int) moduleDB.size() ? "(unknown)" : moduleDB[modulenum].name); + ERROR_LOG(HLE, "Unknown syscall: Module: %s (module: %d func: %d)", modulenum > (int)moduleDB.size() ? "(unknown)" : moduleDB[modulenum].name, modulenum, funcnum); return NULL; } if (modulenum >= (int)moduleDB.size()) { diff --git a/Core/MIPS/ARM/ArmCompBranch.cpp b/Core/MIPS/ARM/ArmCompBranch.cpp index 7d4e29f77f..167468ae87 100644 --- a/Core/MIPS/ARM/ArmCompBranch.cpp +++ b/Core/MIPS/ARM/ArmCompBranch.cpp @@ -586,6 +586,10 @@ void ArmJit::Comp_JumpReg(MIPSOpcode op) void ArmJit::Comp_Syscall(MIPSOpcode op) { + if (op.encoding == 0x03FFFFcc) { + WARN_LOG(JIT, "Encountered bad syscall instruction at %08x (%08x)", js.compilerPC, op.encoding); + } + if (!g_Config.bSkipDeadbeefFilling) { // All of these will be overwritten with DEADBEEF anyway. diff --git a/Core/MIPS/ARM/ArmJit.cpp b/Core/MIPS/ARM/ArmJit.cpp index 33f17bfca7..fe07231f48 100644 --- a/Core/MIPS/ARM/ArmJit.cpp +++ b/Core/MIPS/ARM/ArmJit.cpp @@ -83,6 +83,8 @@ ArmJit::ArmJit(MIPSState *mips) : blocks(mips, this), gpr(mips, &js, &jo), fpr(m AllocCodeSpace(1024 * 1024 * 16); // 32MB is the absolute max because that's what an ARM branch instruction can reach, backwards and forwards. GenerateFixedCode(); + INFO_LOG(JIT, "ARM JIT initialized: %d MB of code space", GetSpaceLeft() / 1024 * 1024); + js.startDefaultPrefix = mips_->HasDefaultPrefix(); } diff --git a/Core/MIPS/ARM64/Arm64CompBranch.cpp b/Core/MIPS/ARM64/Arm64CompBranch.cpp index 04b3f04adf..89f536dd87 100644 --- a/Core/MIPS/ARM64/Arm64CompBranch.cpp +++ b/Core/MIPS/ARM64/Arm64CompBranch.cpp @@ -569,6 +569,9 @@ void Arm64Jit::Comp_JumpReg(MIPSOpcode op) void Arm64Jit::Comp_Syscall(MIPSOpcode op) { + if (op.encoding == 0x03FFFFcc) { + WARN_LOG(JIT, "Encountered bad syscall instruction at %08x (%08x)", js.compilerPC, op.encoding); + } if (!g_Config.bSkipDeadbeefFilling) { // All of these will be overwritten with DEADBEEF anyway. diff --git a/Core/MIPS/x86/CompBranch.cpp b/Core/MIPS/x86/CompBranch.cpp index d1afdba1c2..3382bd4ae1 100644 --- a/Core/MIPS/x86/CompBranch.cpp +++ b/Core/MIPS/x86/CompBranch.cpp @@ -760,6 +760,10 @@ void Jit::Comp_JumpReg(MIPSOpcode op) void Jit::Comp_Syscall(MIPSOpcode op) { + if (op.encoding == 0x03FFFFcc) { + WARN_LOG(JIT, "Encountered bad syscall instruction at %08x (%08x)", js.compilerPC, op.encoding); + } + if (!g_Config.bSkipDeadbeefFilling) { // All of these will be overwritten with DEADBEEF anyway.