Add a new index type table for instruction decoding.

This is in prep for -- recurring theme here -- adding the new extended
opcode formats. It turns out that we can avoid a lot of duplicated code
if we determine the type of thing referred to in index-bearing instructions
inside the general instruction decoder. To do so straightforwardly, this
means adding a new opcode info table and then passing it into the decoder.
Rather than add another argument to the decoder, I defined a struct to
contain all the info tables together, and a pointer to that can get passed
in.

I simplified the setting up of the info tables, too, so all the
allocation is handled within InstrUtils, rather than being (partially)
duplicated in a couple places. The only downside is that dexdump will
construct one more table than it actually needs, but given that
construction is quick and the table is only 256 bytes (though will
soon be growing to -- gasp! -- 294 bytes), I figure it's not such a
big deal.

Most of the files that changed only had edits for how to refer to these
info tables.

Change-Id: Ia6f1cb25da6e558ac90c6dd3af6bce36b82a6b4d
diff --git a/vm/compiler/Frontend.c b/vm/compiler/Frontend.c
index 7f02ea1..7d28b36 100644
--- a/vm/compiler/Frontend.c
+++ b/vm/compiler/Frontend.c
@@ -34,13 +34,13 @@
     if (opcode == OP_NOP && instr != 0) {
         return 0;
     } else {
-        insnWidth = gDvm.instrWidth[opcode];
+        insnWidth = gDvm.instrInfo.widths[opcode];
         if (insnWidth < 0) {
             insnWidth = -insnWidth;
         }
     }
 
-    dexDecodeInstruction(gDvm.instrFormat, codePtr, decInsn);
+    dexDecodeInstruction(&gDvm.instrInfo, codePtr, decInsn);
     if (printMe) {
         char *decodedString = dvmCompilerGetDalvikDisassembly(decInsn, NULL);
         LOGD("%p: %#06x %s\n", codePtr, opcode, decodedString);
@@ -205,7 +205,7 @@
 static int analyzeInlineTarget(DecodedInstruction *dalvikInsn, int attributes,
                                int offset)
 {
-    int flags = dexGetInstrFlags(gDvm.instrFlags, dalvikInsn->opCode);
+    int flags = dexGetInstrFlags(gDvm.instrInfo.flags, dalvikInsn->opCode);
     int dalvikOpCode = dalvikInsn->opCode;
 
     if ((flags & kInstrInvoke) &&
@@ -570,7 +570,8 @@
         dvmCompilerAppendMIR(curBB, insn);
         cUnit.numInsts++;
 
-        int flags = dexGetInstrFlags(gDvm.instrFlags, insn->dalvikInsn.opCode);
+        int flags =
+            dexGetInstrFlags(gDvm.instrInfo.flags, insn->dalvikInsn.opCode);
 
         if ((flags & kInstrInvoke) &&
             (insn->dalvikInsn.opCode != OP_INVOKE_DIRECT_EMPTY)) {
@@ -643,7 +644,7 @@
         /* Link the taken and fallthrough blocks */
         BasicBlock *searchBB;
 
-        int flags = dexGetInstrFlags(gDvm.instrFlags,
+        int flags = dexGetInstrFlags(gDvm.instrInfo.flags,
                                      lastInsn->dalvikInsn.opCode);
 
         if (flags & kInstrInvoke) {
@@ -1207,7 +1208,7 @@
                      * aligned to 4-byte boundary (alignment instruction to be
                      * inserted later.
                      */
-                    if (dexGetInstrFlags(gDvm.instrFlags,
+                    if (dexGetInstrFlags(gDvm.instrInfo.flags,
                            curBB->lastMIRInsn->dalvikInsn.opCode) &
                         kInstrInvoke) {
                         newBB->isFallThroughFromInvoke = true;