diff options
Diffstat (limited to 'opcode-gen/opcode-gen.awk')
-rw-r--r-- | opcode-gen/opcode-gen.awk | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/opcode-gen/opcode-gen.awk b/opcode-gen/opcode-gen.awk index c201b7363..0b14a3fa7 100644 --- a/opcode-gen/opcode-gen.awk +++ b/opcode-gen/opcode-gen.awk @@ -113,7 +113,7 @@ emission == "libcore-opcodes" { for (i = 0; i <= MAX_OPCODE; i++) { if (isUnused(i) || isOptimized(i)) continue; - printf(" int OP_%-28s = 0x%02x;\n", constName[i], i); + printf(" int OP_%-28s = 0x%04x;\n", constName[i], i); } } @@ -416,6 +416,7 @@ function unpackOpcode(idx) { if (idx <= 255) { return idx; } else { + idx -= 256; return (idx * 256) + 255; } } |