Properly handle the mftb instruction.
[oota-llvm.git] / lib / Target / PowerPC / AsmParser / PPCAsmParser.cpp
index 1736d03961f71c0da313c5b65d9f24d970b504f4..a699a55d3cbf4f1913ec390253e71a855eca0624 100644 (file)
@@ -1184,6 +1184,13 @@ void PPCAsmParser::ProcessInstruction(MCInst &Inst,
     Inst = TmpInst;
     break;
   }
+  case PPC::MFTB: {
+    if (STI.getFeatureBits()[PPC::FeatureMFTB]) {
+      assert(Inst.getNumOperands() == 2 && "Expecting two operands");
+      Inst.setOpcode(PPC::MFSPR);
+    }
+    break;
+  }
   }
 }