- Added PARAMI for the common case of passing an integer constant to a function.

- Made FxParameter::Emit free its operand's register.

SVN r1918 (scripting)
This commit is contained in:
Randy Heit 2009-10-15 21:59:37 +00:00
commit 126c738116
6 changed files with 61 additions and 75 deletions

View file

@ -95,8 +95,10 @@ const VMOpInfo OpInfo[NUM_OPS] =
};
#ifdef WORDS_BIGENDIAN
#define ABCs(x) ((*(VM_SWORD *)(x) << 8) >> 8)
#define JMPOFS(x) ((*(VM_SWORD *)(x) << 8) >> 6)
#else
#define ABCs(x) (*(VM_SWORD *)(x) >> 8)
#define JMPOFS(x) ((*(VM_SWORD *)(x) >> 6) & ~3)
#endif
@ -214,6 +216,10 @@ void VMDisasm(FILE *out, const VM_UBYTE *code, int codesize, const VMScriptFunct
col = printf_wrapper(out, "%08x", i + 4 + JMPOFS(&code[i]));
break;
case OP_PARAMI:
col = printf_wrapper(out, "%d", i + 4 + ABCs(&code[i]));
break;
case OP_RET:
if (code[i+2] != REGT_NIL)
{