MatchingInlineAsm, MustExtend))
return true;
HexagonMCInstrInfo::extendIfNeeded(
- MCII, MCB, *SubInst,
+ getParser().getContext(), MCII, MCB, *SubInst,
HexagonMCInstrInfo::isExtended(MCII, *SubInst) || MustExtend);
MCB.addOperand(MCOperand::createInst(SubInst));
if (!InBrackets)
MI.addOperand(MCOperand::createExpr(MCConstantExpr::create(Value, Context)));
}
-void HexagonMCInstrInfo::addConstExtender(MCInstrInfo const &MCII, MCInst &MCB,
+void HexagonMCInstrInfo::addConstExtender(MCContext &Context,
+ MCInstrInfo const &MCII, MCInst &MCB,
MCInst const &MCI) {
assert(HexagonMCInstrInfo::isBundle(MCB));
MCOperand const &exOp =
// Create the extender.
MCInst *XMCI =
- new MCInst(HexagonMCInstrInfo::deriveExtender(MCII, MCI, exOp));
+ new (Context) MCInst(HexagonMCInstrInfo::deriveExtender(MCII, MCI, exOp));
MCB.addOperand(MCOperand::createInst(XMCI));
}
return nullptr;
}
-void HexagonMCInstrInfo::extendIfNeeded(MCInstrInfo const &MCII, MCInst &MCB,
+void HexagonMCInstrInfo::extendIfNeeded(MCContext &Context,
+ MCInstrInfo const &MCII, MCInst &MCB,
MCInst const &MCI, bool MustExtend) {
if (isConstExtended(MCII, MCI) || MustExtend)
- addConstExtender(MCII, MCB, MCI);
+ addConstExtender(Context, MCII, MCB, MCI);
}
HexagonII::MemAccessSize
size_t const bundleInstructionsOffset = 1;
void addConstant(MCInst &MI, uint64_t Value, MCContext &Context);
-void addConstExtender(MCInstrInfo const &MCII, MCInst &MCB, MCInst const &MCI);
+void addConstExtender(MCContext &Context, MCInstrInfo const &MCII, MCInst &MCB,
+ MCInst const &MCI);
// Returns a iterator range of instructions in this bundle
iterator_range<MCInst::const_iterator> bundleInstructions(MCInst const &MCI);
// Return the extender for instruction at Index or nullptr if none
MCInst const *extenderForIndex(MCInst const &MCB, size_t Index);
-void extendIfNeeded(MCInstrInfo const &MCII, MCInst &MCB, MCInst const &MCI,
- bool MustExtend);
+void extendIfNeeded(MCContext &Context, MCInstrInfo const &MCII, MCInst &MCB,
+ MCInst const &MCI, bool MustExtend);
// Create a duplex instruction given the two subinsts
MCInst *deriveDuplex(MCContext &Context, unsigned iClass, MCInst const &inst0,