summaryrefslogtreecommitdiffstats
path: root/opcode-gen
diff options
context:
space:
mode:
authorDan Bornstein <danfuzz@android.com>2010-12-03 13:16:08 -0800
committerDan Bornstein <danfuzz@android.com>2010-12-03 13:16:08 -0800
commit21f322dcd405fddc45a91e4b7d64a2e3d7ebfd15 (patch)
tree5bda0c742e1c2b9d40842143f5fab8d156dc61cd /opcode-gen
parent973171bb01a052a302e8674b5f617383bac0647a (diff)
downloadandroid_dalvik-21f322dcd405fddc45a91e4b7d64a2e3d7ebfd15.tar.gz
android_dalvik-21f322dcd405fddc45a91e4b7d64a2e3d7ebfd15.tar.bz2
android_dalvik-21f322dcd405fddc45a91e4b7d64a2e3d7ebfd15.zip
Small fixes.
I had unpackOpcode() slightly wrong, and I made the libcore opcode numbers always be four hex digits. Change-Id: I4f988b8794b4b6c48ef91698a8e567fa46b96dac
Diffstat (limited to 'opcode-gen')
-rw-r--r--opcode-gen/opcode-gen.awk3
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;
}
}