[Hexagon] Factoring bundle creation in to a utility function.
[oota-llvm.git] / lib / Target / Hexagon / MCTargetDesc / HexagonMCInstrInfo.cpp
index 3af1e14319ee0c8b2074fc1ac32c4c36ecbe4f64..7adc0ba51da37a63ef68fa59b09531eb853729fb 100644 (file)
@@ -104,6 +104,13 @@ void HexagonMCInstrInfo::clampExtended(MCInstrInfo const &MCII,
   }
 }
 
+MCInst HexagonMCInstrInfo::createBundle() {
+  MCInst Result;
+  Result.setOpcode(Hexagon::BUNDLE);
+  Result.addOperand(MCOperand::createImm(0));
+  return Result;
+}
+
 MCInst *HexagonMCInstrInfo::deriveDuplex(MCContext &Context, unsigned iClass,
                                          MCInst const &inst0,
                                          MCInst const &inst1) {