Add more "extended opcode" structure to libdex.
Although we don't yet generate any of the extended opcodes, this
change makes it a bit easier to add them.
In particular, we now differentiate between the raw opcode in a code
unit and an associated "packed opcode number." The packed opcode space
is densely populated in the range 0x000-0x1ff (though there will still
be a few unused slots), whereas the raw opcode values are sparse
throughout the range 0x0000-0xffff.
The OpCode enum is redefined/clarified to have packed, not sparse,
opcode values.
Change-Id: Ie3208a258648fbf044d344646f66c49ad24c31b2
diff --git a/vm/compiler/Frontend.c b/vm/compiler/Frontend.c
index c2ee496..ad04676 100644
--- a/vm/compiler/Frontend.c
+++ b/vm/compiler/Frontend.c
@@ -27,7 +27,7 @@
bool printMe)
{
u2 instr = *codePtr;
- OpCode opcode = instr & 0xff;
+ OpCode opcode = dexOpCodeFromCodeUnit(instr);
int insnWidth;
// Don't parse instruction data