Save all 8 syscall_args

This commit is contained in:
Nekotekina 2021-03-16 16:41:32 +03:00
parent 8716ac554f
commit f801dc6558
2 changed files with 4 additions and 4 deletions

View file

@ -608,7 +608,7 @@ std::string ppu_thread::dump_regs() const
auto reg = gpr[i]; auto reg = gpr[i];
// Fixup for syscall arguments // Fixup for syscall arguments
if (current_function && i >= 3 && i <= 6) reg = syscall_args[i - 3]; if (current_function && i >= 3 && i <= 10) reg = syscall_args[i - 3];
fmt::append(ret, "r%d%s: 0x%-8llx", i, i <= 9 ? " " : "", reg); fmt::append(ret, "r%d%s: 0x%-8llx", i, i <= 9 ? " " : "", reg);
@ -836,7 +836,7 @@ std::string ppu_thread::dump_misc() const
ret += _func; ret += _func;
ret += '\n'; ret += '\n';
for (u32 i = 3; i <= 6; i++) for (u32 i = 3; i <= 10; i++)
if (u64 v = gpr[i]; v != syscall_args[i - 3]) if (u64 v = gpr[i]; v != syscall_args[i - 3])
fmt::append(ret, " ** r%d: 0x%llx\n", i, v); fmt::append(ret, " ** r%d: 0x%llx\n", i, v);
} }

View file

@ -260,9 +260,9 @@ public:
cmd64 cmd_get(u32 index) { return cmd_queue[cmd_queue.peek() + index].load(); } cmd64 cmd_get(u32 index) { return cmd_queue[cmd_queue.peek() + index].load(); }
atomic_t<u32> cmd_notify = 0; atomic_t<u32> cmd_notify = 0;
const ppu_func_opd_t entry_func; alignas(64) const ppu_func_opd_t entry_func;
u64 start_time{0}; // Sleep start timepoint u64 start_time{0}; // Sleep start timepoint
alignas(64) u64 syscall_args[4]{0}; // Last syscall arguments stored u64 syscall_args[8]{0}; // Last syscall arguments stored
const char* current_function{}; // Current function name for diagnosis, optimized for speed. const char* current_function{}; // Current function name for diagnosis, optimized for speed.
const char* last_function{}; // Sticky copy of current_function, is not cleared on function return const char* last_function{}; // Sticky copy of current_function, is not cleared on function return