Lines Matching defs:MCI
89 MCInst const &MCI) {
92 MCI.getOperand(HexagonMCInstrInfo::getExtendableOp(MCII, MCI));
96 new (Context) MCInst(HexagonMCInstrInfo::deriveExtender(MCII, MCI, exOp));
97 XMCI->setLoc(MCI.getLoc());
104 MCInst const &MCI) {
105 assert(isBundle(MCI));
106 return make_range(Hexagon::PacketIterator(MCII, MCI),
107 Hexagon::PacketIterator(MCII, MCI, nullptr));
111 HexagonMCInstrInfo::bundleInstructions(MCInst const &MCI) {
112 assert(isBundle(MCI));
113 return drop_begin(MCI, bundleInstructionsOffset);
116 size_t HexagonMCInstrInfo::bundleSize(MCInst const &MCI) {
117 if (HexagonMCInstrInfo::isBundle(MCI))
118 return (MCI.size() - bundleInstructionsOffset);
236 MCInst const &MCI) {
237 if (isConstExtended(MCII, MCI))
238 addConstExtender(Context, MCII, MCB, MCI);
242 MCInst const &MCI) {
243 uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
249 MCInst const &MCI) {
250 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
256 MCInst const &MCI) {
257 return MCII.get(MCI.getOpcode());
317 MCInst const &MCI) {
318 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
324 MCInst const &MCI) {
325 unsigned O = HexagonMCInstrInfo::getExtendableOp(MCII, MCI);
326 MCOperand const &MO = MCI.getOperand(O);
328 assert((HexagonMCInstrInfo::isExtendable(MCII, MCI) ||
329 HexagonMCInstrInfo::isExtended(MCII, MCI)) &&
335 MCInst const &MCI) {
336 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
341 MCInst const &MCI) {
342 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
347 MCInst const &MCI) {
348 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
354 MCInst const &MCI) {
355 assert(HexagonMCInstrInfo::isExtendable(MCII, MCI) ||
356 HexagonMCInstrInfo::isExtended(MCII, MCI));
358 if (HexagonMCInstrInfo::isExtentSigned(MCII, MCI)) // if value is signed
359 return (1 << (HexagonMCInstrInfo::getExtentBits(MCII, MCI) - 1)) - 1;
360 return (1 << HexagonMCInstrInfo::getExtentBits(MCII, MCI)) - 1;
365 MCInst const &MCI) {
366 assert(HexagonMCInstrInfo::isExtendable(MCII, MCI) ||
367 HexagonMCInstrInfo::isExtended(MCII, MCI));
369 if (HexagonMCInstrInfo::isExtentSigned(MCII, MCI)) // if value is signed
370 return -(1 << (HexagonMCInstrInfo::getExtentBits(MCII, MCI) - 1));
375 MCInst const &MCI) {
376 return MCII.getName(MCI.getOpcode());
380 MCInst const &MCI) {
381 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
386 MCInst const &MCI) {
387 if (HexagonMCInstrInfo::hasTmpDst(MCII, MCI)) {
393 unsigned O = HexagonMCInstrInfo::getNewValueOp(MCII, MCI);
394 MCOperand const &MCO = MCI.getOperand(O);
396 assert((HexagonMCInstrInfo::isNewValue(MCII, MCI) ||
397 HexagonMCInstrInfo::hasNewValue(MCII, MCI)) &&
405 MCInst const &MCI) {
406 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
412 MCInst const &MCI) {
413 unsigned O = HexagonMCInstrInfo::getNewValueOp2(MCII, MCI);
414 MCOperand const &MCO = MCI.getOperand(O);
416 assert((HexagonMCInstrInfo::isNewValue(MCII, MCI) ||
417 HexagonMCInstrInfo::hasNewValue2(MCII, MCI)) &&
424 MCInst const &MCI) {
425 const uint64_t F = MCII.get(MCI.getOpcode()).TSFlags;
432 MCInst const &MCI) {
435 int SchedClass = HexagonMCInstrInfo::getDesc(MCII, MCI).getSchedClass();
452 MCInst const &MCI) {
454 int SchedClass = HexagonMCInstrInfo::getDesc(MCII, MCI).getSchedClass();
463 MCInst const &MCI) {
465 int SchedClass = HexagonMCInstrInfo::getDesc(MCII, MCI).getSchedClass();
484 bool HexagonMCInstrInfo::hasDuplex(MCInstrInfo const &MCII, MCInst const &MCI) {
485 if (!HexagonMCInstrInfo::isBundle(MCI))
488 for (auto const &I : HexagonMCInstrInfo::bundleInstructions(MCI)) {
500 bool HexagonMCInstrInfo::hasImmExt(MCInst const &MCI) {
501 if (!HexagonMCInstrInfo::isBundle(MCI))
504 for (const auto &I : HexagonMCInstrInfo::bundleInstructions(MCI)) {
514 MCInst const &MCI) {
515 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
521 MCInst const &MCI) {
522 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
534 MCInst const &MCI) {
535 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
539 bool HexagonMCInstrInfo::isBundle(MCInst const &MCI) {
540 auto Result = Hexagon::BUNDLE == MCI.getOpcode();
541 assert(!Result || (MCI.size() > 0 && MCI.getOperand(0).isImm()));
546 MCInst const &MCI) {
547 if (HexagonMCInstrInfo::isExtended(MCII, MCI))
549 if (!HexagonMCInstrInfo::isExtendable(MCII, MCI))
551 MCOperand const &MO = HexagonMCInstrInfo::getExtendableOperand(MCII, MCI);
556 if ((HexagonMCInstrInfo::getType(MCII, MCI) == HexagonII::TypeJ) ||
557 (HexagonMCInstrInfo::getType(MCII, MCI) == HexagonII::TypeCJ &&
558 HexagonMCInstrInfo::getDesc(MCII, MCI).isBranch()) ||
559 (HexagonMCInstrInfo::getType(MCII, MCI) == HexagonII::TypeNCJ &&
560 HexagonMCInstrInfo::getDesc(MCII, MCI).isBranch()))
563 else if ((HexagonMCInstrInfo::getType(MCII, MCI) == HexagonII::TypeCR) &&
564 (MCI.getOpcode() != Hexagon::C4_addipc))
575 if (HexagonMCInstrInfo::isExtentSigned(MCII, MCI)) {
577 int32_t MinValue = HexagonMCInstrInfo::getMinValue(MCII, MCI);
578 int32_t MaxValue = HexagonMCInstrInfo::getMaxValue(MCII, MCI);
582 uint32_t MinValue = HexagonMCInstrInfo::getMinValue(MCII, MCI);
583 uint32_t MaxValue = HexagonMCInstrInfo::getMaxValue(MCII, MCI);
587 bool HexagonMCInstrInfo::isCanon(MCInstrInfo const &MCII, MCInst const &MCI) {
588 return !HexagonMCInstrInfo::getDesc(MCII, MCI).isPseudo() &&
589 !HexagonMCInstrInfo::isPrefix(MCII, MCI);
592 bool HexagonMCInstrInfo::isCofMax1(MCInstrInfo const &MCII, MCInst const &MCI) {
593 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
598 MCInst const &MCI) {
599 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
604 MCInst const &MCI) {
605 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
610 MCInst const &MCI) {
611 return (getType(MCII, MCI) == HexagonII::TypeCJ);
614 bool HexagonMCInstrInfo::isCVINew(MCInstrInfo const &MCII, MCInst const &MCI) {
615 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
624 bool HexagonMCInstrInfo::isDuplex(MCInstrInfo const &MCII, MCInst const &MCI) {
625 return HexagonII::TypeDUPLEX == HexagonMCInstrInfo::getType(MCII, MCI);
629 MCInst const &MCI) {
630 uint64_t const F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
635 MCInst const &MCI) {
636 uint64_t const F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
640 bool HexagonMCInstrInfo::isFloat(MCInstrInfo const &MCII, MCInst const &MCI) {
641 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
645 bool HexagonMCInstrInfo::isHVX(MCInstrInfo const &MCII, MCInst const &MCI) {
646 const uint64_t V = getType(MCII, MCI);
650 bool HexagonMCInstrInfo::isImmext(MCInst const &MCI) {
651 return MCI.getOpcode() == Hexagon::A4_ext;
654 bool HexagonMCInstrInfo::isInnerLoop(MCInst const &MCI) {
655 assert(isBundle(MCI));
656 int64_t Flags = MCI.getOperand(0).getImm();
671 MCInst const &MCI) {
672 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
677 MCInst const &MCI) {
678 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
684 MCInst const &MCI, unsigned short O) {
685 return (O == HexagonMCInstrInfo::getExtendableOp(MCII, MCI));
688 bool HexagonMCInstrInfo::isOuterLoop(MCInst const &MCI) {
689 assert(isBundle(MCI));
690 int64_t Flags = MCI.getOperand(0).getImm();
734 MCInst const &MCI) {
735 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
739 bool HexagonMCInstrInfo::isPrefix(MCInstrInfo const &MCII, MCInst const &MCI) {
740 return HexagonII::TypeEXTENDER == HexagonMCInstrInfo::getType(MCII, MCI);
744 MCInst const &MCI) {
745 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
751 MCInst const &MCI) {
752 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
757 MCInst const &MCI) {
758 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
777 bool HexagonMCInstrInfo::isSoloAX(MCInstrInfo const &MCII, MCInst const &MCI) {
778 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
784 MCInst const &MCI) {
785 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
791 MCInst const &MCI) {
792 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
798 bool HexagonMCInstrInfo::isSolo(MCInstrInfo const &MCII, MCInst const &MCI) {
799 const uint64_t F = MCII.get(MCI.getOpcode()).TSFlags;
803 bool HexagonMCInstrInfo::isMemReorderDisabled(MCInst const &MCI) {
804 assert(isBundle(MCI));
805 auto Flags = MCI.getOperand(0).getImm();
809 bool HexagonMCInstrInfo::isSubInstruction(MCInst const &MCI) {
810 switch (MCI.getOpcode()) {
869 bool HexagonMCInstrInfo::isVector(MCInstrInfo const &MCII, MCInst const &MCI) {
870 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
874 int64_t HexagonMCInstrInfo::minConstant(MCInst const &MCI, size_t Index) {
877 if (MCI.size() <= Index)
879 MCOperand const &MCO = MCI.getOperand(Index);
938 HexagonMCInstrInfo::predicateInfo(MCInstrInfo const &MCII, MCInst const &MCI) {
939 if (!isPredicated(MCII, MCI))
941 MCInstrDesc const &Desc = getDesc(MCII, MCI);
944 return {MCI.getOperand(I).getReg(), I, isPredicatedTrue(MCII, MCI)};
949 MCInst const &MCI) {
950 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
954 bool HexagonMCInstrInfo::hasTmpDst(MCInstrInfo const &MCII, MCInst const &MCI) {
955 switch (MCI.getOpcode()) {
969 bool HexagonMCInstrInfo::hasHvxTmp(MCInstrInfo const &MCII, MCInst const &MCI) {
970 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
975 MCInst const &MCI) {
976 const unsigned OpCode = MCI.getOpcode();
987 MCInst const &MCI) {
989 for (auto HMI : bundleInstructions(MCI)) {
990 MCInst const &MCI = *HMI.getInst();
991 if (!requiresSlot(STI, MCI))
993 if (isDuplex(MCII, MCI))
1015 void HexagonMCInstrInfo::setInnerLoop(MCInst &MCI) {
1016 assert(isBundle(MCI));
1017 MCOperand &Operand = MCI.getOperand(0);
1021 void HexagonMCInstrInfo::setMemReorderDisabled(MCInst &MCI) {
1022 assert(isBundle(MCI));
1023 MCOperand &Operand = MCI.getOperand(0);
1025 assert(isMemReorderDisabled(MCI));
1028 void HexagonMCInstrInfo::setOuterLoop(MCInst &MCI) {
1029 assert(isBundle(MCI));
1030 MCOperand &Operand = MCI.getOperand(0);