+2018-05-08 Alan Modra <amodra@gmail.com>
+
+ * ppc-dis.c (PPC_OPCD_SEGS): Define using PPC_OP.
+ (VLE_OPCD_SEGS, SPE2_OPCD_SEGS): Similarly, using macros used to
+ partition opcode space for index lookup.
+
2018-05-07 Peter Bergner <bergner@vnet.ibm.com.com>
* ppc-dis.c (print_insn_powerpc) <insn_is_short>: Replace this...
POWERPC_DIALECT(info) = dialect;
}
-#define PPC_OPCD_SEGS 64
-static unsigned short powerpc_opcd_indices[PPC_OPCD_SEGS+1];
-#define VLE_OPCD_SEGS 32
-static unsigned short vle_opcd_indices[VLE_OPCD_SEGS+1];
-#define SPE2_OPCD_SEGS 13
-static unsigned short spe2_opcd_indices[SPE2_OPCD_SEGS+1];
+#define PPC_OPCD_SEGS (1 + PPC_OP (-1))
+static unsigned short powerpc_opcd_indices[PPC_OPCD_SEGS + 1];
+#define VLE_OPCD_SEGS (1 + VLE_OP_TO_SEG (VLE_OP (-1, 0xffff)))
+static unsigned short vle_opcd_indices[VLE_OPCD_SEGS + 1];
+#define SPE2_OPCD_SEGS (1 + SPE2_XOP_TO_SEG (SPE2_XOP (-1)))
+static unsigned short spe2_opcd_indices[SPE2_OPCD_SEGS + 1];
/* Calculate opcode table indices to speed up disassembly,
and init dialect. */