Added some diagnostic messages to a hackish part of the EE recompiler.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1717 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2009-08-31 19:50:19 +00:00
parent 5706a23ca2
commit 808537da58
1 changed files with 7 additions and 1 deletions

View File

@ -350,17 +350,23 @@ u32* recGetImm64(u32 hi, u32 lo)
if (imm64 && imm64[0] == lo && imm64[1] == hi)
return imm64;
if (recConstBufPtr >= recConstBuf + RECCONSTBUF_SIZE) {
if (recConstBufPtr >= recConstBuf + RECCONSTBUF_SIZE)
{
DevCon::Status( "EErec: Const Buffer overflow hack..." );
// TODO: flag an error in recompilation which would reset the recompiler
// immediately and recompile the current block again. There is currently
// no way to do this, so have a last ditch attempt at making things sane
// and return some nonsense if that fails.
for (u32 *p = recConstBuf; p < recConstBuf + RECCONSTBUF_SIZE; p += 2)
{
if (p[0] == lo && p[1] == hi) {
imm64_cache[cacheidx] = p;
return p;
}
}
Console::Error( "EErec: Const Buffer overflow hack failed. Returning nonsense!" );
return recConstBuf;
}