From 808537da583495408bab39bf9d436a7027b5a966 Mon Sep 17 00:00:00 2001 From: "Jake.Stine" Date: Mon, 31 Aug 2009 19:50:19 +0000 Subject: [PATCH] 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 --- pcsx2/x86/ix86-32/iR5900-32.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pcsx2/x86/ix86-32/iR5900-32.cpp b/pcsx2/x86/ix86-32/iR5900-32.cpp index 6f9ae84543..c5e6fc2323 100644 --- a/pcsx2/x86/ix86-32/iR5900-32.cpp +++ b/pcsx2/x86/ix86-32/iR5900-32.cpp @@ -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; }