(nothing, really)

This commit is contained in:
Nekotekina 2014-08-30 17:52:12 +04:00
parent d99ae7b21c
commit 8dfe7138df
3 changed files with 25 additions and 8 deletions

1
.gitignore vendored
View File

@ -69,3 +69,4 @@ x64/Release/emucore.lib
rpcs3/x64/*
.DS_Store
rpcs3/Emu/SysCalls/Modules/prx_*.h

View File

@ -85,6 +85,9 @@ public:
u16 count; // count of instructions compiled from current point (and to be checked)
u32 valid; // copy of valid opcode for validation
void* pointer; // pointer to executable memory object
#ifdef _WIN32
//_IMAGE_RUNTIME_FUNCTION_ENTRY info;
#endif
};
SPURecEntry entry[0x10000];

View File

@ -157,8 +157,23 @@ void SPURecompilerCore::Compile(u16 pos)
log.Open(fmt::Format("SPUjit_%d.log", GetCurrentSPUThread().GetId()), first ? rFile::write : rFile::write_append);
log.Write(fmt::Format("========== START POSITION 0x%x ==========\n\n", start * 4));
log.Write(std::string(stringLogger.getString()));
log.Write(fmt::Format("========== COMPILED %d (excess %d), time: [start=%lld (decoding=%lld), finalize=%lld]\n\n",
entry[start].count, excess, stamp1 - stamp0, time0, get_system_time() - stamp1));
if (!entry[start].pointer)
{
LOG_ERROR(Log::SPU, "SPURecompilerCore::Compile(pos=0x%x) failed", start * sizeof(u32));
log.Write("========== FAILED ============\n\n");
Emu.Pause();
}
else
{
log.Write(fmt::Format("========== COMPILED %d (excess %d), time: [start=%lld (decoding=%lld), finalize=%lld]\n\n",
entry[start].count, excess, stamp1 - stamp0, time0, get_system_time() - stamp1));
#ifdef _WIN32
//if (!RtlAddFunctionTable(&info, 1, (u64)entry[start].pointer))
//{
// LOG_ERROR(Log::SPU, "RtlAddFunctionTable() failed");
//}
#endif
}
log.Close();
m_enc->compiler = nullptr;
first = false;
@ -195,6 +210,9 @@ u8 SPURecompilerCore::DecodeMemory(const u64 address)
i < (u32)pos + (u32)entry[pos].count)
{
runtime.release(entry[i].pointer);
#ifdef _WIN32
//RtlDeleteFunctionTable(&entry[i].info);
#endif
entry[i].pointer = nullptr;
}
}
@ -215,12 +233,7 @@ u8 SPURecompilerCore::DecodeMemory(const u64 address)
}
}
if (!entry[pos].pointer)
{
LOG_ERROR(Log::SPU, "SPURecompilerCore::DecodeMemory(ls_addr=0x%x): compilation failed", pos * sizeof(u32));
Emu.Pause();
return 0;
}
if (!entry[pos].pointer) return 0;
typedef u32(*Func)(const void* _cpu, const void* _ls, const void* _imm, const void* _g_imm);