}
+static unsigned char BaseOpcodes[] = {
+#define I(ENUM, NAME, BASEOPCODE, FLAGS, TSFLAGS) BASEOPCODE,
+#include "X86InstrInfo.def"
+};
+
+// getBaseOpcodeFor - This function returns the "base" X86 opcode for the
+// specified opcode number.
+//
+unsigned char X86InstrInfo::getBaseOpcodeFor(unsigned Opcode) const {
+ assert(Opcode < sizeof(BaseOpcodes)/sizeof(BaseOpcodes[0]) &&
+ "Opcode out of range!");
+ return BaseOpcodes[Opcode];
+}
/// TODO: Mod/RM that uses a fixed opcode extension, like /0
+ FormMask = 7,
//===------------------------------------------------------------------===//
// Actual flags...
virtual void print(const MachineInstr *MI, std::ostream &O,
const TargetMachine &TM) const;
+ // getBaseOpcodeFor - This function returns the "base" X86 opcode for the
+ // specified opcode number.
+ //
+ unsigned char getBaseOpcodeFor(unsigned Opcode) const;
+
+
//===--------------------------------------------------------------------===//
//