Small fixes.
I had unpackOpcode() slightly wrong, and I made the libcore opcode
numbers always be four hex digits.
Change-Id: I4f988b8794b4b6c48ef91698a8e567fa46b96dac
diff --git a/opcode-gen/opcode-gen.awk b/opcode-gen/opcode-gen.awk
index c201b73..0b14a3f 100644
--- a/opcode-gen/opcode-gen.awk
+++ b/opcode-gen/opcode-gen.awk
@@ -113,7 +113,7 @@
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 @@
if (idx <= 255) {
return idx;
} else {
+ idx -= 256;
return (idx * 256) + 255;
}
}