[Scummvm-cvs-logs] SF.net SVN: scummvm:[51120] tools/branches/gsoc2010-decompiler/decompiler

pidgeot at users.sourceforge.net pidgeot at users.sourceforge.net
Thu Jul 22 00:30:24 CEST 2010


Revision: 51120
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51120&view=rev
Author:   pidgeot
Date:     2010-07-21 22:30:23 +0000 (Wed, 21 Jul 2010)

Log Message:
-----------
Handle pop in SCUMMv6, remove warnings

Modified Paths:
--------------
    tools/branches/gsoc2010-decompiler/decompiler/codegen.cpp
    tools/branches/gsoc2010-decompiler/decompiler/scummv6/codegen.cpp

Modified: tools/branches/gsoc2010-decompiler/decompiler/codegen.cpp
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/codegen.cpp	2010-07-21 22:26:37 UTC (rev 51119)
+++ tools/branches/gsoc2010-decompiler/decompiler/codegen.cpp	2010-07-21 22:30:23 UTC (rev 51120)
@@ -173,6 +173,9 @@
 					case kDoWhileCond:
 						s << "} while (" << _stack.pop() << ")";
 						break;
+					default:
+						processInst(*it);
+						break;
 					}
 					addOutputLine(s.str());
 				}

Modified: tools/branches/gsoc2010-decompiler/decompiler/scummv6/codegen.cpp
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/scummv6/codegen.cpp	2010-07-21 22:26:37 UTC (rev 51119)
+++ tools/branches/gsoc2010-decompiler/decompiler/scummv6/codegen.cpp	2010-07-21 22:30:23 UTC (rev 51120)
@@ -91,6 +91,10 @@
 			}
 		}
 		break;
+	case kStack:
+		// Only two opcodes in SCUMMv6, 0x1A and 0xA7: both are single item pop
+		_stack.pop();
+		break;
 	case kBinaryOp:
 	case kComparison:
 	{
@@ -110,6 +114,13 @@
 				if (inst._opcode == 0x5D) // jumpFalse
 					_stack.push(new UnaryOpEntry(_stack.pop(), "!"));
 				break;
+			default:
+				{
+					std::stringstream s;
+					s << boost::format("Couldn't handle conditional jump at address %08X") % inst._address;
+					addOutputLine(s.str());
+					break;
+				}
 		}
 		break;
 	case kUnaryOp:


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list