[Hexagon] Adding encoding bits for add opcode.
[oota-llvm.git] / lib / Target / Hexagon / HexagonAsmPrinter.cpp
index 2e011bd127418ec09dbe4a8e40b1e8cf2cca60d2..48e202da22b1110f85df25501c2085f6826af627 100644 (file)
@@ -195,8 +195,8 @@ void HexagonAsmPrinter::EmitInstruction(const MachineInstr *MI) {
     unsigned Size = BundleMIs.size();
     assert((Size+IgnoreCount) == MI->getBundleSize() && "Corrupt Bundle!");
     for (unsigned Index = 0; Index < Size; Index++) {
-      HexagonMCInst MCI;
-      MCI.setPacketStart(Index == 0);
+      HexagonMCInst MCI (BundleMIs[Index]->getOpcode());
+      MCI.setPacketBegin(Index == 0);
       MCI.setPacketEnd(Index == (Size-1));
 
       HexagonLowerToMC(BundleMIs[Index], MCI, *this);
@@ -204,9 +204,9 @@ void HexagonAsmPrinter::EmitInstruction(const MachineInstr *MI) {
     }
   }
   else {
-    HexagonMCInst MCI;
+    HexagonMCInst MCI(MI->getOpcode());
     if (MI->getOpcode() == Hexagon::ENDLOOP0) {
-      MCI.setPacketStart(true);
+      MCI.setPacketBegin(true);
       MCI.setPacketEnd(true);
     }
     HexagonLowerToMC(MI, MCI, *this);