Lines Matching refs:MCI

89                                           MCInst const &MCI) {  in addConstExtender()  argument
92 MCI.getOperand(HexagonMCInstrInfo::getExtendableOp(MCII, MCI)); in addConstExtender()
96 new (Context) MCInst(HexagonMCInstrInfo::deriveExtender(MCII, MCI, exOp)); in addConstExtender()
97 XMCI->setLoc(MCI.getLoc()); in addConstExtender()
104 MCInst const &MCI) { in bundleInstructions() argument
105 assert(isBundle(MCI)); in bundleInstructions()
106 return make_range(Hexagon::PacketIterator(MCII, MCI), in bundleInstructions()
107 Hexagon::PacketIterator(MCII, MCI, nullptr)); in bundleInstructions()
111 HexagonMCInstrInfo::bundleInstructions(MCInst const &MCI) { in bundleInstructions() argument
112 assert(isBundle(MCI)); in bundleInstructions()
113 return drop_begin(MCI, bundleInstructionsOffset); in bundleInstructions()
116 size_t HexagonMCInstrInfo::bundleSize(MCInst const &MCI) { in bundleSize() argument
117 if (HexagonMCInstrInfo::isBundle(MCI)) in bundleSize()
118 return (MCI.size() - bundleInstructionsOffset); in bundleSize()
236 MCInst const &MCI) { in extendIfNeeded() argument
237 if (isConstExtended(MCII, MCI)) in extendIfNeeded()
238 addConstExtender(Context, MCII, MCB, MCI); in extendIfNeeded()
242 MCInst const &MCI) { in getMemAccessSize() argument
243 uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in getMemAccessSize()
249 MCInst const &MCI) { in getAddrMode() argument
250 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in getAddrMode()
256 MCInst const &MCI) { in getDesc() argument
257 return MCII.get(MCI.getOpcode()); in getDesc()
317 MCInst const &MCI) { in getExtendableOp() argument
318 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in getExtendableOp()
324 MCInst const &MCI) { in getExtendableOperand() argument
325 unsigned O = HexagonMCInstrInfo::getExtendableOp(MCII, MCI); in getExtendableOperand()
326 MCOperand const &MO = MCI.getOperand(O); in getExtendableOperand()
328 assert((HexagonMCInstrInfo::isExtendable(MCII, MCI) || in getExtendableOperand()
329 HexagonMCInstrInfo::isExtended(MCII, MCI)) && in getExtendableOperand()
335 MCInst const &MCI) { in getExtentAlignment() argument
336 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in getExtentAlignment()
341 MCInst const &MCI) { in getExtentBits() argument
342 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in getExtentBits()
347 MCInst const &MCI) { in isExtentSigned() argument
348 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in isExtentSigned()
354 MCInst const &MCI) { in getMaxValue() argument
355 assert(HexagonMCInstrInfo::isExtendable(MCII, MCI) || in getMaxValue()
356 HexagonMCInstrInfo::isExtended(MCII, MCI)); in getMaxValue()
358 if (HexagonMCInstrInfo::isExtentSigned(MCII, MCI)) // if value is signed in getMaxValue()
359 return (1 << (HexagonMCInstrInfo::getExtentBits(MCII, MCI) - 1)) - 1; in getMaxValue()
360 return (1 << HexagonMCInstrInfo::getExtentBits(MCII, MCI)) - 1; in getMaxValue()
365 MCInst const &MCI) { in getMinValue() argument
366 assert(HexagonMCInstrInfo::isExtendable(MCII, MCI) || in getMinValue()
367 HexagonMCInstrInfo::isExtended(MCII, MCI)); in getMinValue()
369 if (HexagonMCInstrInfo::isExtentSigned(MCII, MCI)) // if value is signed in getMinValue()
370 return -(1 << (HexagonMCInstrInfo::getExtentBits(MCII, MCI) - 1)); in getMinValue()
375 MCInst const &MCI) { in getName() argument
376 return MCII.getName(MCI.getOpcode()); in getName()
380 MCInst const &MCI) { in getNewValueOp() argument
381 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in getNewValueOp()
386 MCInst const &MCI) { in getNewValueOperand() argument
387 if (HexagonMCInstrInfo::hasTmpDst(MCII, MCI)) { in getNewValueOperand()
393 unsigned O = HexagonMCInstrInfo::getNewValueOp(MCII, MCI); in getNewValueOperand()
394 MCOperand const &MCO = MCI.getOperand(O); in getNewValueOperand()
396 assert((HexagonMCInstrInfo::isNewValue(MCII, MCI) || in getNewValueOperand()
397 HexagonMCInstrInfo::hasNewValue(MCII, MCI)) && in getNewValueOperand()
405 MCInst const &MCI) { in getNewValueOp2() argument
406 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in getNewValueOp2()
412 MCInst const &MCI) { in getNewValueOperand2() argument
413 unsigned O = HexagonMCInstrInfo::getNewValueOp2(MCII, MCI); in getNewValueOperand2()
414 MCOperand const &MCO = MCI.getOperand(O); in getNewValueOperand2()
416 assert((HexagonMCInstrInfo::isNewValue(MCII, MCI) || in getNewValueOperand2()
417 HexagonMCInstrInfo::hasNewValue2(MCII, MCI)) && in getNewValueOperand2()
424 MCInst const &MCI) { in getType() argument
425 const uint64_t F = MCII.get(MCI.getOpcode()).TSFlags; in getType()
432 MCInst const &MCI) { in getCVIResources() argument
435 int SchedClass = HexagonMCInstrInfo::getDesc(MCII, MCI).getSchedClass(); in getCVIResources()
452 MCInst const &MCI) { in getUnits() argument
454 int SchedClass = HexagonMCInstrInfo::getDesc(MCII, MCI).getSchedClass(); in getUnits()
463 MCInst const &MCI) { in getOtherReservedSlots() argument
465 int SchedClass = HexagonMCInstrInfo::getDesc(MCII, MCI).getSchedClass(); in getOtherReservedSlots()
484 bool HexagonMCInstrInfo::hasDuplex(MCInstrInfo const &MCII, MCInst const &MCI) { in hasDuplex() argument
485 if (!HexagonMCInstrInfo::isBundle(MCI)) in hasDuplex()
488 for (auto const &I : HexagonMCInstrInfo::bundleInstructions(MCI)) { in hasDuplex()
500 bool HexagonMCInstrInfo::hasImmExt(MCInst const &MCI) { in hasImmExt() argument
501 if (!HexagonMCInstrInfo::isBundle(MCI)) in hasImmExt()
504 for (const auto &I : HexagonMCInstrInfo::bundleInstructions(MCI)) { in hasImmExt()
514 MCInst const &MCI) { in hasNewValue() argument
515 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in hasNewValue()
521 MCInst const &MCI) { in hasNewValue2() argument
522 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in hasNewValue2()
534 MCInst const &MCI) { in isAccumulator() argument
535 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in isAccumulator()
539 bool HexagonMCInstrInfo::isBundle(MCInst const &MCI) { in isBundle() argument
540 auto Result = Hexagon::BUNDLE == MCI.getOpcode(); in isBundle()
541 assert(!Result || (MCI.size() > 0 && MCI.getOperand(0).isImm())); in isBundle()
546 MCInst const &MCI) { in isConstExtended() argument
547 if (HexagonMCInstrInfo::isExtended(MCII, MCI)) in isConstExtended()
549 if (!HexagonMCInstrInfo::isExtendable(MCII, MCI)) in isConstExtended()
551 MCOperand const &MO = HexagonMCInstrInfo::getExtendableOperand(MCII, MCI); in isConstExtended()
556 if ((HexagonMCInstrInfo::getType(MCII, MCI) == HexagonII::TypeJ) || in isConstExtended()
557 (HexagonMCInstrInfo::getType(MCII, MCI) == HexagonII::TypeCJ && in isConstExtended()
558 HexagonMCInstrInfo::getDesc(MCII, MCI).isBranch()) || in isConstExtended()
559 (HexagonMCInstrInfo::getType(MCII, MCI) == HexagonII::TypeNCJ && in isConstExtended()
560 HexagonMCInstrInfo::getDesc(MCII, MCI).isBranch())) in isConstExtended()
563 else if ((HexagonMCInstrInfo::getType(MCII, MCI) == HexagonII::TypeCR) && in isConstExtended()
564 (MCI.getOpcode() != Hexagon::C4_addipc)) in isConstExtended()
574 int MinValue = HexagonMCInstrInfo::getMinValue(MCII, MCI); in isConstExtended()
575 int MaxValue = HexagonMCInstrInfo::getMaxValue(MCII, MCI); in isConstExtended()
579 bool HexagonMCInstrInfo::isCanon(MCInstrInfo const &MCII, MCInst const &MCI) { in isCanon() argument
580 return !HexagonMCInstrInfo::getDesc(MCII, MCI).isPseudo() && in isCanon()
581 !HexagonMCInstrInfo::isPrefix(MCII, MCI); in isCanon()
584 bool HexagonMCInstrInfo::isCofMax1(MCInstrInfo const &MCII, MCInst const &MCI) { in isCofMax1() argument
585 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in isCofMax1()
590 MCInst const &MCI) { in isCofRelax1() argument
591 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in isCofRelax1()
596 MCInst const &MCI) { in isCofRelax2() argument
597 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in isCofRelax2()
602 MCInst const &MCI) { in isCompound() argument
603 return (getType(MCII, MCI) == HexagonII::TypeCJ); in isCompound()
606 bool HexagonMCInstrInfo::isCVINew(MCInstrInfo const &MCII, MCInst const &MCI) { in isCVINew() argument
607 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in isCVINew()
616 bool HexagonMCInstrInfo::isDuplex(MCInstrInfo const &MCII, MCInst const &MCI) { in isDuplex() argument
617 return HexagonII::TypeDUPLEX == HexagonMCInstrInfo::getType(MCII, MCI); in isDuplex()
621 MCInst const &MCI) { in isExtendable() argument
622 uint64_t const F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in isExtendable()
627 MCInst const &MCI) { in isExtended() argument
628 uint64_t const F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in isExtended()
632 bool HexagonMCInstrInfo::isFloat(MCInstrInfo const &MCII, MCInst const &MCI) { in isFloat() argument
633 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in isFloat()
637 bool HexagonMCInstrInfo::isHVX(MCInstrInfo const &MCII, MCInst const &MCI) { in isHVX() argument
638 const uint64_t V = getType(MCII, MCI); in isHVX()
642 bool HexagonMCInstrInfo::isImmext(MCInst const &MCI) { in isImmext() argument
643 return MCI.getOpcode() == Hexagon::A4_ext; in isImmext()
646 bool HexagonMCInstrInfo::isInnerLoop(MCInst const &MCI) { in isInnerLoop() argument
647 assert(isBundle(MCI)); in isInnerLoop()
648 int64_t Flags = MCI.getOperand(0).getImm(); in isInnerLoop()
663 MCInst const &MCI) { in isNewValue() argument
664 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in isNewValue()
669 MCInst const &MCI) { in isNewValueStore() argument
670 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in isNewValueStore()
676 MCInst const &MCI, unsigned short O) { in isOpExtendable() argument
677 return (O == HexagonMCInstrInfo::getExtendableOp(MCII, MCI)); in isOpExtendable()
680 bool HexagonMCInstrInfo::isOuterLoop(MCInst const &MCI) { in isOuterLoop() argument
681 assert(isBundle(MCI)); in isOuterLoop()
682 int64_t Flags = MCI.getOperand(0).getImm(); in isOuterLoop()
726 MCInst const &MCI) { in isPredicated() argument
727 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in isPredicated()
731 bool HexagonMCInstrInfo::isPrefix(MCInstrInfo const &MCII, MCInst const &MCI) { in isPrefix() argument
732 return HexagonII::TypeEXTENDER == HexagonMCInstrInfo::getType(MCII, MCI); in isPrefix()
736 MCInst const &MCI) { in isPredicateLate() argument
737 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in isPredicateLate()
743 MCInst const &MCI) { in isPredicatedNew() argument
744 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in isPredicatedNew()
749 MCInst const &MCI) { in isPredicatedTrue() argument
750 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in isPredicatedTrue()
769 bool HexagonMCInstrInfo::isSoloAX(MCInstrInfo const &MCII, MCInst const &MCI) { in isSoloAX() argument
770 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in isSoloAX()
776 MCInst const &MCI) { in isRestrictSlot1AOK() argument
777 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in isRestrictSlot1AOK()
783 MCInst const &MCI) { in isRestrictNoSlot1Store() argument
784 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in isRestrictNoSlot1Store()
790 bool HexagonMCInstrInfo::isSolo(MCInstrInfo const &MCII, MCInst const &MCI) { in isSolo() argument
791 const uint64_t F = MCII.get(MCI.getOpcode()).TSFlags; in isSolo()
795 bool HexagonMCInstrInfo::isMemReorderDisabled(MCInst const &MCI) { in isMemReorderDisabled() argument
796 assert(isBundle(MCI)); in isMemReorderDisabled()
797 auto Flags = MCI.getOperand(0).getImm(); in isMemReorderDisabled()
801 bool HexagonMCInstrInfo::isSubInstruction(MCInst const &MCI) { in isSubInstruction() argument
802 switch (MCI.getOpcode()) { in isSubInstruction()
861 bool HexagonMCInstrInfo::isVector(MCInstrInfo const &MCII, MCInst const &MCI) { in isVector() argument
862 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in isVector()
866 int64_t HexagonMCInstrInfo::minConstant(MCInst const &MCI, size_t Index) { in minConstant() argument
869 if (MCI.size() <= Index) in minConstant()
871 MCOperand const &MCO = MCI.getOperand(Index); in minConstant()
930 HexagonMCInstrInfo::predicateInfo(MCInstrInfo const &MCII, MCInst const &MCI) { in predicateInfo() argument
931 if (!isPredicated(MCII, MCI)) in predicateInfo()
933 MCInstrDesc const &Desc = getDesc(MCII, MCI); in predicateInfo()
936 return {MCI.getOperand(I).getReg(), I, isPredicatedTrue(MCII, MCI)}; in predicateInfo()
941 MCInst const &MCI) { in prefersSlot3() argument
942 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in prefersSlot3()
946 bool HexagonMCInstrInfo::hasTmpDst(MCInstrInfo const &MCII, MCInst const &MCI) { in hasTmpDst() argument
947 switch (MCI.getOpcode()) { in hasTmpDst()
961 bool HexagonMCInstrInfo::hasHvxTmp(MCInstrInfo const &MCII, MCInst const &MCI) { in hasHvxTmp() argument
962 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags; in hasHvxTmp()
967 MCInst const &MCI) { in requiresSlot() argument
968 const unsigned OpCode = MCI.getOpcode(); in requiresSlot()
979 MCInst const &MCI) { in slotsConsumed() argument
981 for (auto HMI : bundleInstructions(MCI)) { in slotsConsumed()
982 MCInst const &MCI = *HMI.getInst(); in slotsConsumed() local
983 if (!requiresSlot(STI, MCI)) in slotsConsumed()
985 if (isDuplex(MCII, MCI)) in slotsConsumed()
1007 void HexagonMCInstrInfo::setInnerLoop(MCInst &MCI) { in setInnerLoop() argument
1008 assert(isBundle(MCI)); in setInnerLoop()
1009 MCOperand &Operand = MCI.getOperand(0); in setInnerLoop()
1013 void HexagonMCInstrInfo::setMemReorderDisabled(MCInst &MCI) { in setMemReorderDisabled() argument
1014 assert(isBundle(MCI)); in setMemReorderDisabled()
1015 MCOperand &Operand = MCI.getOperand(0); in setMemReorderDisabled()
1017 assert(isMemReorderDisabled(MCI)); in setMemReorderDisabled()
1020 void HexagonMCInstrInfo::setOuterLoop(MCInst &MCI) { in setOuterLoop() argument
1021 assert(isBundle(MCI)); in setOuterLoop()
1022 MCOperand &Operand = MCI.getOperand(0); in setOuterLoop()