Lines Matching defs:MCII
39 Hexagon::PacketIterator::PacketIterator(MCInstrInfo const &MCII,
41 : MCII(MCII), BundleCurrent(Inst.begin() +
45 Hexagon::PacketIterator::PacketIterator(MCInstrInfo const &MCII,
47 : MCII(MCII), BundleCurrent(Inst.end()), BundleEnd(Inst.end()),
63 if (HexagonMCInstrInfo::isDuplex(MCII, Inst)) {
88 MCInstrInfo const &MCII, MCInst &MCB,
92 MCI.getOperand(HexagonMCInstrInfo::getExtendableOp(MCII, MCI));
96 new (Context) MCInst(HexagonMCInstrInfo::deriveExtender(MCII, MCI, exOp));
103 HexagonMCInstrInfo::bundleInstructions(MCInstrInfo const &MCII,
106 return make_range(Hexagon::PacketIterator(MCII, MCI),
107 Hexagon::PacketIterator(MCII, MCI, nullptr));
124 bool canonicalizePacketImpl(MCInstrInfo const &MCII, MCSubtargetInfo const &STI,
137 HexagonMCInstrInfo::tryCompound(MCII, STI, Context, MCB);
138 HexagonMCShuffle(Context, false, MCII, STI, MCB);
142 ? HexagonMCInstrInfo::getDuplexPossibilties(MCII, STI, MCB)
147 HexagonMCShuffle(Context, MCII, STI, MCB, possibleDuplexes);
165 HexagonMCShuffle(Context, true, MCII, STI, MCB);
171 bool HexagonMCInstrInfo::canonicalizePacket(MCInstrInfo const &MCII,
178 return canonicalizePacketImpl(MCII, STI, Context, MCB, Check);
181 HexagonMCChecker DefaultCheck(Context, MCII, STI, MCB, *RI, false);
184 if (canonicalizePacketImpl(MCII, STI, Context, MCB, &PerfCheck))
188 return canonicalizePacketImpl(MCII, *ArchSTI, Context, MCB, &ArchCheck);
191 MCInst HexagonMCInstrInfo::deriveExtender(MCInstrInfo const &MCII,
194 assert(HexagonMCInstrInfo::isExtendable(MCII, Inst) ||
195 HexagonMCInstrInfo::isExtended(MCII, Inst));
235 MCInstrInfo const &MCII, MCInst &MCB,
237 if (isConstExtended(MCII, MCI))
238 addConstExtender(Context, MCII, MCB, MCI);
241 unsigned HexagonMCInstrInfo::getMemAccessSize(MCInstrInfo const &MCII,
243 uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
248 unsigned HexagonMCInstrInfo::getAddrMode(MCInstrInfo const &MCII,
250 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
255 MCInstrDesc const &HexagonMCInstrInfo::getDesc(MCInstrInfo const &MCII,
257 return MCII.get(MCI.getOpcode());
316 unsigned short HexagonMCInstrInfo::getExtendableOp(MCInstrInfo const &MCII,
318 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
323 HexagonMCInstrInfo::getExtendableOperand(MCInstrInfo const &MCII,
325 unsigned O = HexagonMCInstrInfo::getExtendableOp(MCII, MCI);
328 assert((HexagonMCInstrInfo::isExtendable(MCII, MCI) ||
329 HexagonMCInstrInfo::isExtended(MCII, MCI)) &&
334 unsigned HexagonMCInstrInfo::getExtentAlignment(MCInstrInfo const &MCII,
336 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
340 unsigned HexagonMCInstrInfo::getExtentBits(MCInstrInfo const &MCII,
342 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
346 bool HexagonMCInstrInfo::isExtentSigned(MCInstrInfo const &MCII,
348 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
353 int HexagonMCInstrInfo::getMaxValue(MCInstrInfo const &MCII,
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;
364 int HexagonMCInstrInfo::getMinValue(MCInstrInfo const &MCII,
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));
374 StringRef HexagonMCInstrInfo::getName(MCInstrInfo const &MCII,
376 return MCII.getName(MCI.getOpcode());
379 unsigned short HexagonMCInstrInfo::getNewValueOp(MCInstrInfo const &MCII,
381 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
385 MCOperand const &HexagonMCInstrInfo::getNewValueOperand(MCInstrInfo const &MCII,
387 if (HexagonMCInstrInfo::hasTmpDst(MCII, MCI)) {
393 unsigned O = HexagonMCInstrInfo::getNewValueOp(MCII, MCI);
396 assert((HexagonMCInstrInfo::isNewValue(MCII, MCI) ||
397 HexagonMCInstrInfo::hasNewValue(MCII, MCI)) &&
404 unsigned short HexagonMCInstrInfo::getNewValueOp2(MCInstrInfo const &MCII,
406 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
411 HexagonMCInstrInfo::getNewValueOperand2(MCInstrInfo const &MCII,
413 unsigned O = HexagonMCInstrInfo::getNewValueOp2(MCII, MCI);
416 assert((HexagonMCInstrInfo::isNewValue(MCII, MCI) ||
417 HexagonMCInstrInfo::hasNewValue2(MCII, MCI)) &&
423 unsigned HexagonMCInstrInfo::getType(MCInstrInfo const &MCII,
425 const uint64_t F = MCII.get(MCI.getOpcode()).TSFlags;
430 unsigned HexagonMCInstrInfo::getCVIResources(MCInstrInfo const &MCII,
435 int SchedClass = HexagonMCInstrInfo::getDesc(MCII, MCI).getSchedClass();
450 unsigned HexagonMCInstrInfo::getUnits(MCInstrInfo const &MCII,
454 int SchedClass = HexagonMCInstrInfo::getDesc(MCII, MCI).getSchedClass();
461 unsigned HexagonMCInstrInfo::getOtherReservedSlots(MCInstrInfo const &MCII,
465 int SchedClass = HexagonMCInstrInfo::getDesc(MCII, MCI).getSchedClass();
484 bool HexagonMCInstrInfo::hasDuplex(MCInstrInfo const &MCII, MCInst const &MCI) {
489 if (HexagonMCInstrInfo::isDuplex(MCII, *I.getInst()))
513 bool HexagonMCInstrInfo::hasNewValue(MCInstrInfo const &MCII,
515 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
520 bool HexagonMCInstrInfo::hasNewValue2(MCInstrInfo const &MCII,
522 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
533 bool HexagonMCInstrInfo::isAccumulator(MCInstrInfo const &MCII,
535 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
545 bool HexagonMCInstrInfo::isConstExtended(MCInstrInfo const &MCII,
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) &&
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;
597 bool HexagonMCInstrInfo::isCofRelax1(MCInstrInfo const &MCII,
599 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
603 bool HexagonMCInstrInfo::isCofRelax2(MCInstrInfo const &MCII,
605 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
609 bool HexagonMCInstrInfo::isCompound(MCInstrInfo const &MCII,
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);
628 bool HexagonMCInstrInfo::isExtendable(MCInstrInfo const &MCII,
630 uint64_t const F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
634 bool HexagonMCInstrInfo::isExtended(MCInstrInfo const &MCII,
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);
670 bool HexagonMCInstrInfo::isNewValue(MCInstrInfo const &MCII,
672 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
676 bool HexagonMCInstrInfo::isNewValueStore(MCInstrInfo const &MCII,
678 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
683 bool HexagonMCInstrInfo::isOpExtendable(MCInstrInfo const &MCII,
685 return (O == HexagonMCInstrInfo::getExtendableOp(MCII, MCI));
733 bool HexagonMCInstrInfo::isPredicated(MCInstrInfo const &MCII,
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);
743 bool HexagonMCInstrInfo::isPredicateLate(MCInstrInfo const &MCII,
745 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
750 bool HexagonMCInstrInfo::isPredicatedNew(MCInstrInfo const &MCII,
752 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
756 bool HexagonMCInstrInfo::isPredicatedTrue(MCInstrInfo const &MCII,
758 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
768 bool HexagonMCInstrInfo::isPredRegister(MCInstrInfo const &MCII,
770 MCInstrDesc const &Desc = HexagonMCInstrInfo::getDesc(MCII, Inst);
777 bool HexagonMCInstrInfo::isSoloAX(MCInstrInfo const &MCII, MCInst const &MCI) {
778 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
783 bool HexagonMCInstrInfo::isRestrictSlot1AOK(MCInstrInfo const &MCII,
785 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
790 bool HexagonMCInstrInfo::isRestrictNoSlot1Store(MCInstrInfo const &MCII,
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;
869 bool HexagonMCInstrInfo::isVector(MCInstrInfo const &MCII, MCInst const &MCI) {
870 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
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)};
948 bool HexagonMCInstrInfo::prefersSlot3(MCInstrInfo const &MCII,
950 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
954 bool HexagonMCInstrInfo::hasTmpDst(MCInstrInfo const &MCII, MCInst const &MCI) {
969 bool HexagonMCInstrInfo::hasHvxTmp(MCInstrInfo const &MCII, MCInst const &MCI) {
970 const uint64_t F = HexagonMCInstrInfo::getDesc(MCII, MCI).TSFlags;
985 unsigned HexagonMCInstrInfo::slotsConsumed(MCInstrInfo const &MCII,
993 if (isDuplex(MCII, MCI))
1056 bool HexagonMCInstrInfo::IsABranchingInst(MCInstrInfo const &MCII,
1060 MCInstrDesc const &Desc = HexagonMCInstrInfo::getDesc(MCII, I);