[Scummvm-cvs-logs] SF.net SVN: scummvm:[49466] tools/branches/gsoc2010-decompiler/decompiler
pidgeot at users.sourceforge.net
pidgeot at users.sourceforge.net
Mon Jun 7 01:09:41 CEST 2010
Revision: 49466
http://scummvm.svn.sourceforge.net/scummvm/?rev=49466&view=rev
Author: pidgeot
Date: 2010-06-06 23:09:41 +0000 (Sun, 06 Jun 2010)
Log Message:
-----------
Add distinction between relative jumps and absolute jumps
Modified Paths:
--------------
tools/branches/gsoc2010-decompiler/decompiler/instruction.h
tools/branches/gsoc2010-decompiler/decompiler/scummv6/disassembler.cpp
Modified: tools/branches/gsoc2010-decompiler/decompiler/instruction.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/instruction.h 2010-06-06 23:00:33 UTC (rev 49465)
+++ tools/branches/gsoc2010-decompiler/decompiler/instruction.h 2010-06-06 23:09:41 UTC (rev 49466)
@@ -33,17 +33,19 @@
* Enumeration for categorizing the different kinds of instructions.
*/
enum InstType {
- kArithmetic, ///< Arithmetic instruction (+, -, *, etc.).
- kBoolean, ///< Boolean instruction (AND, OR, etc.).
- kCall, ///< Regular function call.
- kComparison, ///< Comparison instruction.
- kCondJump, ///< Conditional jump.
- kJump, ///< Unconditional jump.
- kLoad, ///< Load value to stack.
- kReturn, ///< Return from regular function call.
- kSpecial, ///< Special functions.
- kStack, ///< Stack allocation or deallocation (altering stack pointer).
- kStore ///< Store value from stack in memory.
+ kArithmetic, ///< Arithmetic instruction (+, -, *, etc.).
+ kBoolean, ///< Boolean instruction (AND, OR, etc.).
+ kCall, ///< Regular function call.
+ kComparison, ///< Comparison instruction.
+ kCondJump, ///< Conditional jump (absolute address).
+ kCondJumpRel, ///< Conditional jump (relative address).
+ kJump, ///< Unconditional jump (absolute address).
+ kJumpRel, ///< Unconditional jump (relative address).
+ kLoad, ///< Load value to stack.
+ kReturn, ///< Return from regular function call.
+ kSpecial, ///< Special functions.
+ kStack, ///< Stack allocation or deallocation (altering stack pointer).
+ kStore ///< Store value from stack in memory.
};
/**
Modified: tools/branches/gsoc2010-decompiler/decompiler/scummv6/disassembler.cpp
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/scummv6/disassembler.cpp 2010-06-06 23:00:33 UTC (rev 49465)
+++ tools/branches/gsoc2010-decompiler/decompiler/scummv6/disassembler.cpp 2010-06-06 23:09:41 UTC (rev 49466)
@@ -91,8 +91,8 @@
OPCODE(0x57, "wordVarDec", kArithmetic, 0, "w");
OPCODE(0x5A, "byteArrayDec", kArithmetic, -1, "B");
OPCODE(0x5B, "wordArrayDec", kArithmetic, -1, "w");
- OPCODE(0x5C, "jumpTrue", kCondJump, -1, "w");
- OPCODE(0x5D, "jumpFalse", kCondJump, -1, "w");
+ OPCODE(0x5C, "jumpTrue", kCondJumpRel, -1, "w");
+ OPCODE(0x5D, "jumpFalse", kCondJumpRel, -1, "w");
OPCODE(0x5E, "startScript", kSpecial, -255, ""); //Variable stack arguments
OPCODE(0x5F, "startScriptQuick", kSpecial, -255, ""); //Variable stack arguments
OPCODE(0x60, "startObject", kSpecial, -255, ""); //Variable stack arguments
@@ -128,7 +128,7 @@
OPCODE(0x70, "setState", kSpecial, -2, "");
OPCODE(0x71, "setOwner", kSpecial, -2, "");
OPCODE(0x72, "getOwner", kSpecial, 0, "");
- OPCODE(0x73, "jump", kJump, 0, "w");
+ OPCODE(0x73, "jump", kJumpRel, 0, "w");
OPCODE(0x74, "startSound", kSpecial, -1, "");
OPCODE(0x75, "stopSound", kSpecial, -1, "");
OPCODE(0x76, "startMusic", kSpecial, -1, "");
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