mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
ppu_syscall_code type added (for fmt)
This commit is contained in:
parent
f49a30bc1a
commit
8034196c25
@ -763,7 +763,6 @@ const ppu_decoder<ppu_itype> s_ppu_itype;
|
||||
|
||||
extern u64 get_timebased_time();
|
||||
extern ppu_function_t ppu_get_syscall(u64 code);
|
||||
extern std::string ppu_get_syscall_name(u64 code);
|
||||
|
||||
extern __m128 sse_exp2_ps(__m128 A);
|
||||
extern __m128 sse_log2_ps(__m128 A);
|
||||
@ -957,7 +956,7 @@ extern void ppu_initialize(const ppu_module& info)
|
||||
{
|
||||
if (auto sc = ppu_get_syscall(index))
|
||||
{
|
||||
link_table.emplace(ppu_get_syscall_name(index), (u64)sc);
|
||||
link_table.emplace(fmt::format("%s", ppu_syscall_code(index)), (u64)sc);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,11 @@ enum class ppu_cmd : u32
|
||||
sleep,
|
||||
};
|
||||
|
||||
// Formatting helper
|
||||
enum class ppu_syscall_code : u64
|
||||
{
|
||||
};
|
||||
|
||||
class ppu_thread : public cpu_thread
|
||||
{
|
||||
public:
|
||||
|
@ -7,8 +7,6 @@
|
||||
#include "../Utilities/Log.h"
|
||||
#include <algorithm>
|
||||
|
||||
extern std::string ppu_get_syscall_name(u64 code);
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
const ppu_decoder<PPUTranslator> s_ppu_decoder;
|
||||
@ -1647,7 +1645,7 @@ void PPUTranslator::SC(ppu_opcode_t op)
|
||||
if (index < 1024)
|
||||
{
|
||||
// Call the syscall directly
|
||||
Call(GetType<void>(), ppu_get_syscall_name(index), m_thread);
|
||||
Call(GetType<void>(), fmt::format("%s", ppu_syscall_code(index)), m_thread);
|
||||
m_ir->CreateRetVoid();
|
||||
return;
|
||||
}
|
||||
|
@ -33,9 +33,15 @@
|
||||
|
||||
extern std::string ppu_get_syscall_name(u64 code);
|
||||
|
||||
template <>
|
||||
void fmt_class_string<ppu_syscall_code>::format(std::string& out, u64 arg)
|
||||
{
|
||||
out += ppu_get_syscall_name(arg);
|
||||
}
|
||||
|
||||
static bool null_func(ppu_thread& ppu)
|
||||
{
|
||||
LOG_TODO(HLE, "Unimplemented syscall %s -> CELL_OK", ppu_get_syscall_name(ppu.gpr[11]));
|
||||
LOG_TODO(HLE, "Unimplemented syscall %s -> CELL_OK", ppu_syscall_code(ppu.gpr[11]));
|
||||
ppu.gpr[3] = 0;
|
||||
ppu.cia += 4;
|
||||
return false;
|
||||
@ -979,7 +985,7 @@ extern void ppu_execute_syscall(ppu_thread& ppu, u64 code)
|
||||
if (auto func = g_ppu_syscall_table[code])
|
||||
{
|
||||
func(ppu);
|
||||
LOG_TRACE(PPU, "Syscall '%s' (%llu) finished, r3=0x%llx", ppu_get_syscall_name(code), code, ppu.gpr[3]);
|
||||
LOG_TRACE(PPU, "Syscall '%s' (%llu) finished, r3=0x%llx", ppu_syscall_code(code), code, ppu.gpr[3]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user