Move getX86RegNum into X86RegisterInfo and use it
[oota-llvm.git] / lib / Target / X86 / X86InstrInfo.h
index ec30cc7c8c92f7337de89b1f3c645534ce8353b1..2694481caabe55f65203e83e68abdf245da5b8b0 100644 (file)
@@ -275,11 +275,14 @@ public:
   const TargetRegisterClass *getPointerRegClass() const;
 
   // getBaseOpcodeFor - This function returns the "base" X86 opcode for the
-  // specified opcode number.
+  // specified machine instruction.
   //
   unsigned char getBaseOpcodeFor(const TargetInstrDescriptor *TID) const {
     return TID->TSFlags >> X86II::OpcodeShift;
   }
+  unsigned char getBaseOpcodeFor(MachineOpCode Opcode) const {
+    return getBaseOpcodeFor(&get(Opcode));
+  }
 };
 
 } // End llvm namespace