cellSpurs: Add error codes formatting (unused)

This commit is contained in:
Eladash 2020-09-27 19:11:10 +03:00 committed by Ivan
parent aed560b630
commit 1f28bee86a

View File

@ -18,6 +18,124 @@
LOG_CHANNEL(cellSpurs);
template <>
void fmt_class_string<CellSpursCoreError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(CELL_SPURS_CORE_ERROR_AGAIN);
STR_CASE(CELL_SPURS_CORE_ERROR_INVAL);
STR_CASE(CELL_SPURS_CORE_ERROR_NOMEM);
STR_CASE(CELL_SPURS_CORE_ERROR_SRCH);
STR_CASE(CELL_SPURS_CORE_ERROR_PERM);
STR_CASE(CELL_SPURS_CORE_ERROR_BUSY);
STR_CASE(CELL_SPURS_CORE_ERROR_STAT);
STR_CASE(CELL_SPURS_CORE_ERROR_ALIGN);
STR_CASE(CELL_SPURS_CORE_ERROR_NULL_POINTER);
}
return unknown;
});
}
template <>
void fmt_class_string<CellSpursPolicyModuleError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(CELL_SPURS_POLICY_MODULE_ERROR_AGAIN);
STR_CASE(CELL_SPURS_POLICY_MODULE_ERROR_INVAL);
STR_CASE(CELL_SPURS_POLICY_MODULE_ERROR_NOSYS);
STR_CASE(CELL_SPURS_POLICY_MODULE_ERROR_NOMEM);
STR_CASE(CELL_SPURS_POLICY_MODULE_ERROR_SRCH);
STR_CASE(CELL_SPURS_POLICY_MODULE_ERROR_NOENT);
STR_CASE(CELL_SPURS_POLICY_MODULE_ERROR_NOEXEC);
STR_CASE(CELL_SPURS_POLICY_MODULE_ERROR_DEADLK);
STR_CASE(CELL_SPURS_POLICY_MODULE_ERROR_PERM);
STR_CASE(CELL_SPURS_POLICY_MODULE_ERROR_BUSY);
STR_CASE(CELL_SPURS_POLICY_MODULE_ERROR_ABORT);
STR_CASE(CELL_SPURS_POLICY_MODULE_ERROR_FAULT);
STR_CASE(CELL_SPURS_POLICY_MODULE_ERROR_CHILD);
STR_CASE(CELL_SPURS_POLICY_MODULE_ERROR_STAT);
STR_CASE(CELL_SPURS_POLICY_MODULE_ERROR_ALIGN);
STR_CASE(CELL_SPURS_POLICY_MODULE_ERROR_NULL_POINTER);
}
return unknown;
});
}
template <>
void fmt_class_string<CellSpursTaskError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(CELL_SPURS_TASK_ERROR_AGAIN);
STR_CASE(CELL_SPURS_TASK_ERROR_INVAL);
STR_CASE(CELL_SPURS_TASK_ERROR_NOSYS);
STR_CASE(CELL_SPURS_TASK_ERROR_NOMEM);
STR_CASE(CELL_SPURS_TASK_ERROR_SRCH);
STR_CASE(CELL_SPURS_TASK_ERROR_NOEXEC);
STR_CASE(CELL_SPURS_TASK_ERROR_PERM);
STR_CASE(CELL_SPURS_TASK_ERROR_BUSY);
STR_CASE(CELL_SPURS_TASK_ERROR_FAULT);
STR_CASE(CELL_SPURS_TASK_ERROR_ALIGN);
STR_CASE(CELL_SPURS_TASK_ERROR_STAT);
STR_CASE(CELL_SPURS_TASK_ERROR_NULL_POINTER);
STR_CASE(CELL_SPURS_TASK_ERROR_FATAL);
STR_CASE(CELL_SPURS_TASK_ERROR_SHUTDOWN);
}
return unknown;
});
}
template <>
void fmt_class_string<CellSpursJobError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(CELL_SPURS_JOB_ERROR_AGAIN);
STR_CASE(CELL_SPURS_JOB_ERROR_INVAL);
STR_CASE(CELL_SPURS_JOB_ERROR_NOSYS);
STR_CASE(CELL_SPURS_JOB_ERROR_NOMEM);
STR_CASE(CELL_SPURS_JOB_ERROR_SRCH);
STR_CASE(CELL_SPURS_JOB_ERROR_NOENT);
STR_CASE(CELL_SPURS_JOB_ERROR_NOEXEC);
STR_CASE(CELL_SPURS_JOB_ERROR_DEADLK);
STR_CASE(CELL_SPURS_JOB_ERROR_PERM);
STR_CASE(CELL_SPURS_JOB_ERROR_BUSY);
STR_CASE(CELL_SPURS_JOB_ERROR_JOB_DESCRIPTOR);
STR_CASE(CELL_SPURS_JOB_ERROR_JOB_DESCRIPTOR_SIZE);
STR_CASE(CELL_SPURS_JOB_ERROR_FAULT);
STR_CASE(CELL_SPURS_JOB_ERROR_CHILD);
STR_CASE(CELL_SPURS_JOB_ERROR_STAT);
STR_CASE(CELL_SPURS_JOB_ERROR_ALIGN);
STR_CASE(CELL_SPURS_JOB_ERROR_NULL_POINTER);
STR_CASE(CELL_SPURS_JOB_ERROR_MEMORY_CORRUPTED);
STR_CASE(CELL_SPURS_JOB_ERROR_MEMORY_SIZE);
STR_CASE(CELL_SPURS_JOB_ERROR_UNKNOWN_COMMAND);
STR_CASE(CELL_SPURS_JOB_ERROR_JOBLIST_ALIGNMENT);
STR_CASE(CELL_SPURS_JOB_ERROR_JOB_ALIGNMENT);
STR_CASE(CELL_SPURS_JOB_ERROR_CALL_OVERFLOW);
STR_CASE(CELL_SPURS_JOB_ERROR_ABORT);
STR_CASE(CELL_SPURS_JOB_ERROR_DMALIST_ELEMENT);
STR_CASE(CELL_SPURS_JOB_ERROR_NUM_CACHE);
STR_CASE(CELL_SPURS_JOB_ERROR_INVALID_BINARY);
}
return unknown;
});
}
extern u64 ppu_ldarx(ppu_thread&, u32);
extern u32 ppu_lwarx(ppu_thread&, u32);
extern bool ppu_stwcx(ppu_thread&, u32, u32);