- 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:
parent
caa5f6dbdc
commit
126c738116
6 changed files with 61 additions and 75 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue