mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 15:01:28 +12:00
(nothing, really)
This commit is contained in:
parent
d99ae7b21c
commit
8dfe7138df
3 changed files with 25 additions and 8 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -69,3 +69,4 @@ x64/Release/emucore.lib
|
||||||
rpcs3/x64/*
|
rpcs3/x64/*
|
||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
rpcs3/Emu/SysCalls/Modules/prx_*.h
|
||||||
|
|
|
@ -85,6 +85,9 @@ public:
|
||||||
u16 count; // count of instructions compiled from current point (and to be checked)
|
u16 count; // count of instructions compiled from current point (and to be checked)
|
||||||
u32 valid; // copy of valid opcode for validation
|
u32 valid; // copy of valid opcode for validation
|
||||||
void* pointer; // pointer to executable memory object
|
void* pointer; // pointer to executable memory object
|
||||||
|
#ifdef _WIN32
|
||||||
|
//_IMAGE_RUNTIME_FUNCTION_ENTRY info;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
SPURecEntry entry[0x10000];
|
SPURecEntry entry[0x10000];
|
||||||
|
|
|
@ -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.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(fmt::Format("========== START POSITION 0x%x ==========\n\n", start * 4));
|
||||||
log.Write(std::string(stringLogger.getString()));
|
log.Write(std::string(stringLogger.getString()));
|
||||||
log.Write(fmt::Format("========== COMPILED %d (excess %d), time: [start=%lld (decoding=%lld), finalize=%lld]\n\n",
|
if (!entry[start].pointer)
|
||||||
entry[start].count, excess, stamp1 - stamp0, time0, get_system_time() - stamp1));
|
{
|
||||||
|
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();
|
log.Close();
|
||||||
m_enc->compiler = nullptr;
|
m_enc->compiler = nullptr;
|
||||||
first = false;
|
first = false;
|
||||||
|
@ -195,6 +210,9 @@ u8 SPURecompilerCore::DecodeMemory(const u64 address)
|
||||||
i < (u32)pos + (u32)entry[pos].count)
|
i < (u32)pos + (u32)entry[pos].count)
|
||||||
{
|
{
|
||||||
runtime.release(entry[i].pointer);
|
runtime.release(entry[i].pointer);
|
||||||
|
#ifdef _WIN32
|
||||||
|
//RtlDeleteFunctionTable(&entry[i].info);
|
||||||
|
#endif
|
||||||
entry[i].pointer = nullptr;
|
entry[i].pointer = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -215,12 +233,7 @@ u8 SPURecompilerCore::DecodeMemory(const u64 address)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!entry[pos].pointer)
|
if (!entry[pos].pointer) return 0;
|
||||||
{
|
|
||||||
LOG_ERROR(Log::SPU, "SPURecompilerCore::DecodeMemory(ls_addr=0x%x): compilation failed", pos * sizeof(u32));
|
|
||||||
Emu.Pause();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef u32(*Func)(const void* _cpu, const void* _ls, const void* _imm, const void* _g_imm);
|
typedef u32(*Func)(const void* _cpu, const void* _ls, const void* _imm, const void* _g_imm);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue