63 #define DEBUG_TYPE "asm-printer"
67 cl::desc(
"Insert falign after call instruction for Hexagon target"));
80 std::unique_ptr<MCStreamer> Streamer)
81 :
AsmPrinter(TM, std::move(Streamer)), Subtarget(nullptr) {}
129 const char *ExtraCode,
132 if (ExtraCode && ExtraCode[0]) {
133 if (ExtraCode[1] != 0)
136 switch (ExtraCode[0]) {
151 unsigned RegNumber = MO.
getReg();
153 if (Hexagon::DoubleRegsRegClass.
contains(RegNumber))
154 RegNumber = TRI->
getSubReg(RegNumber, ExtraCode[0] ==
'L' ?
174 unsigned OpNo,
unsigned AsmVariant,
175 const char *ExtraCode,
177 if (ExtraCode && ExtraCode[0])
188 if (Offset.
isImm()) {
190 O <<
" + #" << Offset.
getImm();
203 if (Imm.
getExpr()->evaluateAsAbsolute(Value)) {
205 std::string ImmString;
207 if (AlignSize == 8) {
208 Name =
".CONST_0000000000000000";
209 sectionPrefix =
".gnu.linkonce.l8";
212 Name =
".CONST_00000000";
213 sectionPrefix =
".gnu.linkonce.l4";
214 ImmString =
utohexstr(static_cast<uint32_t>(Value));
217 std::string symbolName =
218 Name.
drop_back(ImmString.size()).str() + ImmString;
219 std::string sectionName = sectionPrefix.
str() + symbolName;
233 assert(Imm.
isExpr() &&
"Expected expression and found none");
235 assert(MO.isGlobal() || MO.isCPI() || MO.isJTI());
246 StringRef SymbolName = MOSymbol->getName();
247 std::string LitaName =
".CONST_" + SymbolName.
str();
275 int32_t V = cast<MCConstantExpr>(HE->getExpr())->getValue();
289 const auto &VecRC = HST.
useHVXSglOps() ? Hexagon::VectorRegsRegClass
290 : Hexagon::VectorRegs128BRegClass;
291 unsigned VectorSize = HST.getRegisterInfo()->getSpillSize(VecRC);
296 case Hexagon::A2_iconst: {
309 case Hexagon::A2_tfrf: {
315 case Hexagon::A2_tfrt: {
321 case Hexagon::A2_tfrfnew: {
327 case Hexagon::A2_tfrtnew: {
333 case Hexagon::A2_zxtb: {
340 case Hexagon::CONST64:
347 OutStreamer->SwitchSection(Current.first, Current.second);
354 MappedInst = TmpInst;
363 OutStreamer->SwitchSection(Current.first, Current.second);
370 MappedInst = TmpInst;
377 case Hexagon::C2_pxfer_map: {
387 case Hexagon::M2_vrcmpys_acc_s1: {
389 assert (Rt.
isReg() &&
"Expected register and none was found");
390 unsigned Reg = RI->getEncodingValue(Rt.
getReg());
392 MappedInst.
setOpcode(Hexagon::M2_vrcmpys_acc_s1_h);
394 MappedInst.
setOpcode(Hexagon::M2_vrcmpys_acc_s1_l);
398 case Hexagon::M2_vrcmpys_s1: {
400 assert (Rt.
isReg() &&
"Expected register and none was found");
401 unsigned Reg = RI->getEncodingValue(Rt.
getReg());
403 MappedInst.
setOpcode(Hexagon::M2_vrcmpys_s1_h);
405 MappedInst.
setOpcode(Hexagon::M2_vrcmpys_s1_l);
410 case Hexagon::M2_vrcmpys_s1rp: {
412 assert (Rt.
isReg() &&
"Expected register and none was found");
413 unsigned Reg = RI->getEncodingValue(Rt.
getReg());
415 MappedInst.
setOpcode(Hexagon::M2_vrcmpys_s1rp_h);
417 MappedInst.
setOpcode(Hexagon::M2_vrcmpys_s1rp_l);
422 case Hexagon::A4_boundscheck: {
424 assert (Rs.
isReg() &&
"Expected register and none was found");
425 unsigned Reg = RI->getEncodingValue(Rs.
getReg());
427 MappedInst.
setOpcode(Hexagon::A4_boundscheck_hi);
429 MappedInst.
setOpcode(Hexagon::A4_boundscheck_lo);
433 case Hexagon::PS_call_nr:
436 case Hexagon::S5_asrhub_rnd_sat_goodsyntax: {
440 bool Success = Expr->evaluateAsAbsolute(Imm);
441 assert (Success &&
"Expected immediate and none was found");
448 MappedInst = TmpInst;
451 TmpInst.
setOpcode(Hexagon::S5_asrhub_rnd_sat);
458 MappedInst = TmpInst;
461 case Hexagon::S5_vasrhrnd_goodsyntax:
462 case Hexagon::S2_asr_i_p_rnd_goodsyntax: {
466 bool Success = Expr->evaluateAsAbsolute(Imm);
467 assert (Success &&
"Expected immediate and none was found");
474 unsigned High = RI->getSubReg(MO1.
getReg(), Hexagon::isub_hi);
475 unsigned Low = RI->getSubReg(MO1.
getReg(), Hexagon::isub_lo);
479 MappedInst = TmpInst;
483 if (Inst.
getOpcode() == Hexagon::S2_asr_i_p_rnd_goodsyntax)
484 TmpInst.
setOpcode(Hexagon::S2_asr_i_p_rnd);
493 MappedInst = TmpInst;
497 case Hexagon::S2_asr_i_r_rnd_goodsyntax: {
501 bool Success = Expr->evaluateAsAbsolute(Imm);
502 assert (Success &&
"Expected immediate and none was found");
509 MappedInst = TmpInst;
512 TmpInst.
setOpcode(Hexagon::S2_asr_i_r_rnd);
519 MappedInst = TmpInst;
524 case Hexagon::A2_tfrpi: {
529 TmpInst.
setOpcode(Hexagon::A2_combineii);
533 if (Success && Imm < 0) {
541 MappedInst = TmpInst;
545 case Hexagon::A2_tfrp: {
547 unsigned High = RI->getSubReg(MO.
getReg(), Hexagon::isub_hi);
548 unsigned Low = RI->getSubReg(MO.
getReg(), Hexagon::isub_lo);
552 MappedInst.
setOpcode(Hexagon::A2_combinew);
556 case Hexagon::A2_tfrpt:
557 case Hexagon::A2_tfrpf: {
559 unsigned High = RI->getSubReg(MO.
getReg(), Hexagon::isub_hi);
560 unsigned Low = RI->getSubReg(MO.
getReg(), Hexagon::isub_lo);
565 ? Hexagon::C2_ccombinewt
566 : Hexagon::C2_ccombinewf);
569 case Hexagon::A2_tfrptnew:
570 case Hexagon::A2_tfrpfnew: {
572 unsigned High = RI->getSubReg(MO.
getReg(), Hexagon::isub_hi);
573 unsigned Low = RI->getSubReg(MO.
getReg(), Hexagon::isub_lo);
578 ? Hexagon::C2_ccombinewnewt
579 : Hexagon::C2_ccombinewnewf);
583 case Hexagon::M2_mpysmi: {
587 bool Success = Expr->evaluateAsAbsolute(Value);
591 MappedInst.
setOpcode(Hexagon::M2_mpysin);
595 MappedInst.
setOpcode(Hexagon::M2_mpysip);
599 case Hexagon::A2_addsp: {
601 assert (Rt.
isReg() &&
"Expected register and none was found");
602 unsigned Reg = RI->getEncodingValue(Rt.
getReg());
604 MappedInst.
setOpcode(Hexagon::A2_addsph);
606 MappedInst.
setOpcode(Hexagon::A2_addspl);
610 case Hexagon::V6_vd0:
611 case Hexagon::V6_vd0_128B: {
614 "Expected register and none was found");
620 MappedInst = TmpInst;
624 case Hexagon::V6_vL32Ub_pi:
625 case Hexagon::V6_vL32b_cur_pi:
626 case Hexagon::V6_vL32b_nt_cur_pi:
627 case Hexagon::V6_vL32b_pi:
628 case Hexagon::V6_vL32b_nt_pi:
629 case Hexagon::V6_vL32b_nt_tmp_pi:
630 case Hexagon::V6_vL32b_tmp_pi:
631 case Hexagon::V6_vL32Ub_pi_128B:
632 case Hexagon::V6_vL32b_cur_pi_128B:
633 case Hexagon::V6_vL32b_nt_cur_pi_128B:
634 case Hexagon::V6_vL32b_pi_128B:
635 case Hexagon::V6_vL32b_nt_pi_128B:
636 case Hexagon::V6_vL32b_nt_tmp_pi_128B:
637 case Hexagon::V6_vL32b_tmp_pi_128B:
641 case Hexagon::V6_vL32Ub_ai:
642 case Hexagon::V6_vL32b_ai:
643 case Hexagon::V6_vL32b_cur_ai:
644 case Hexagon::V6_vL32b_nt_ai:
645 case Hexagon::V6_vL32b_nt_cur_ai:
646 case Hexagon::V6_vL32b_nt_tmp_ai:
647 case Hexagon::V6_vL32b_tmp_ai:
648 case Hexagon::V6_vL32Ub_ai_128B:
649 case Hexagon::V6_vL32b_ai_128B:
650 case Hexagon::V6_vL32b_cur_ai_128B:
651 case Hexagon::V6_vL32b_nt_ai_128B:
652 case Hexagon::V6_vL32b_nt_cur_ai_128B:
653 case Hexagon::V6_vL32b_nt_tmp_ai_128B:
654 case Hexagon::V6_vL32b_tmp_ai_128B:
658 case Hexagon::V6_vS32Ub_pi:
659 case Hexagon::V6_vS32b_new_pi:
660 case Hexagon::V6_vS32b_nt_new_pi:
661 case Hexagon::V6_vS32b_nt_pi:
662 case Hexagon::V6_vS32b_pi:
663 case Hexagon::V6_vS32Ub_pi_128B:
664 case Hexagon::V6_vS32b_new_pi_128B:
665 case Hexagon::V6_vS32b_nt_new_pi_128B:
666 case Hexagon::V6_vS32b_nt_pi_128B:
667 case Hexagon::V6_vS32b_pi_128B:
671 case Hexagon::V6_vS32Ub_ai:
672 case Hexagon::V6_vS32b_ai:
673 case Hexagon::V6_vS32b_new_ai:
674 case Hexagon::V6_vS32b_nt_ai:
675 case Hexagon::V6_vS32b_nt_new_ai:
676 case Hexagon::V6_vS32Ub_ai_128B:
677 case Hexagon::V6_vS32b_ai_128B:
678 case Hexagon::V6_vS32b_new_ai_128B:
679 case Hexagon::V6_vS32b_nt_ai_128B:
680 case Hexagon::V6_vS32b_nt_new_ai_128B:
684 case Hexagon::V6_vL32b_cur_npred_pi:
685 case Hexagon::V6_vL32b_cur_pred_pi:
686 case Hexagon::V6_vL32b_npred_pi:
687 case Hexagon::V6_vL32b_nt_cur_npred_pi:
688 case Hexagon::V6_vL32b_nt_cur_pred_pi:
689 case Hexagon::V6_vL32b_nt_npred_pi:
690 case Hexagon::V6_vL32b_nt_pred_pi:
691 case Hexagon::V6_vL32b_nt_tmp_npred_pi:
692 case Hexagon::V6_vL32b_nt_tmp_pred_pi:
693 case Hexagon::V6_vL32b_pred_pi:
694 case Hexagon::V6_vL32b_tmp_npred_pi:
695 case Hexagon::V6_vL32b_tmp_pred_pi:
696 case Hexagon::V6_vL32b_cur_npred_pi_128B:
697 case Hexagon::V6_vL32b_cur_pred_pi_128B:
698 case Hexagon::V6_vL32b_npred_pi_128B:
699 case Hexagon::V6_vL32b_nt_cur_npred_pi_128B:
700 case Hexagon::V6_vL32b_nt_cur_pred_pi_128B:
701 case Hexagon::V6_vL32b_nt_npred_pi_128B:
702 case Hexagon::V6_vL32b_nt_pred_pi_128B:
703 case Hexagon::V6_vL32b_nt_tmp_npred_pi_128B:
704 case Hexagon::V6_vL32b_nt_tmp_pred_pi_128B:
705 case Hexagon::V6_vL32b_pred_pi_128B:
706 case Hexagon::V6_vL32b_tmp_npred_pi_128B:
707 case Hexagon::V6_vL32b_tmp_pred_pi_128B:
711 case Hexagon::V6_vL32b_cur_npred_ai:
712 case Hexagon::V6_vL32b_cur_pred_ai:
713 case Hexagon::V6_vL32b_npred_ai:
714 case Hexagon::V6_vL32b_nt_cur_npred_ai:
715 case Hexagon::V6_vL32b_nt_cur_pred_ai:
716 case Hexagon::V6_vL32b_nt_npred_ai:
717 case Hexagon::V6_vL32b_nt_pred_ai:
718 case Hexagon::V6_vL32b_nt_tmp_npred_ai:
719 case Hexagon::V6_vL32b_nt_tmp_pred_ai:
720 case Hexagon::V6_vL32b_pred_ai:
721 case Hexagon::V6_vL32b_tmp_npred_ai:
722 case Hexagon::V6_vL32b_tmp_pred_ai:
723 case Hexagon::V6_vL32b_cur_npred_ai_128B:
724 case Hexagon::V6_vL32b_cur_pred_ai_128B:
725 case Hexagon::V6_vL32b_npred_ai_128B:
726 case Hexagon::V6_vL32b_nt_cur_npred_ai_128B:
727 case Hexagon::V6_vL32b_nt_cur_pred_ai_128B:
728 case Hexagon::V6_vL32b_nt_npred_ai_128B:
729 case Hexagon::V6_vL32b_nt_pred_ai_128B:
730 case Hexagon::V6_vL32b_nt_tmp_npred_ai_128B:
731 case Hexagon::V6_vL32b_nt_tmp_pred_ai_128B:
732 case Hexagon::V6_vL32b_pred_ai_128B:
733 case Hexagon::V6_vL32b_tmp_npred_ai_128B:
734 case Hexagon::V6_vL32b_tmp_pred_ai_128B:
738 case Hexagon::V6_vS32Ub_npred_pi:
739 case Hexagon::V6_vS32Ub_pred_pi:
740 case Hexagon::V6_vS32b_new_npred_pi:
741 case Hexagon::V6_vS32b_new_pred_pi:
742 case Hexagon::V6_vS32b_npred_pi:
743 case Hexagon::V6_vS32b_nqpred_pi:
744 case Hexagon::V6_vS32b_nt_new_npred_pi:
745 case Hexagon::V6_vS32b_nt_new_pred_pi:
746 case Hexagon::V6_vS32b_nt_npred_pi:
747 case Hexagon::V6_vS32b_nt_nqpred_pi:
748 case Hexagon::V6_vS32b_nt_pred_pi:
749 case Hexagon::V6_vS32b_nt_qpred_pi:
750 case Hexagon::V6_vS32b_pred_pi:
751 case Hexagon::V6_vS32b_qpred_pi:
752 case Hexagon::V6_vS32Ub_npred_pi_128B:
753 case Hexagon::V6_vS32Ub_pred_pi_128B:
754 case Hexagon::V6_vS32b_new_npred_pi_128B:
755 case Hexagon::V6_vS32b_new_pred_pi_128B:
756 case Hexagon::V6_vS32b_npred_pi_128B:
757 case Hexagon::V6_vS32b_nqpred_pi_128B:
758 case Hexagon::V6_vS32b_nt_new_npred_pi_128B:
759 case Hexagon::V6_vS32b_nt_new_pred_pi_128B:
760 case Hexagon::V6_vS32b_nt_npred_pi_128B:
761 case Hexagon::V6_vS32b_nt_nqpred_pi_128B:
762 case Hexagon::V6_vS32b_nt_pred_pi_128B:
763 case Hexagon::V6_vS32b_nt_qpred_pi_128B:
764 case Hexagon::V6_vS32b_pred_pi_128B:
765 case Hexagon::V6_vS32b_qpred_pi_128B:
769 case Hexagon::V6_vS32Ub_npred_ai:
770 case Hexagon::V6_vS32Ub_pred_ai:
771 case Hexagon::V6_vS32b_new_npred_ai:
772 case Hexagon::V6_vS32b_new_pred_ai:
773 case Hexagon::V6_vS32b_npred_ai:
774 case Hexagon::V6_vS32b_nqpred_ai:
775 case Hexagon::V6_vS32b_nt_new_npred_ai:
776 case Hexagon::V6_vS32b_nt_new_pred_ai:
777 case Hexagon::V6_vS32b_nt_npred_ai:
778 case Hexagon::V6_vS32b_nt_nqpred_ai:
779 case Hexagon::V6_vS32b_nt_pred_ai:
780 case Hexagon::V6_vS32b_nt_qpred_ai:
781 case Hexagon::V6_vS32b_pred_ai:
782 case Hexagon::V6_vS32b_qpred_ai:
783 case Hexagon::V6_vS32Ub_npred_ai_128B:
784 case Hexagon::V6_vS32Ub_pred_ai_128B:
785 case Hexagon::V6_vS32b_new_npred_ai_128B:
786 case Hexagon::V6_vS32b_new_pred_ai_128B:
787 case Hexagon::V6_vS32b_npred_ai_128B:
788 case Hexagon::V6_vS32b_nqpred_ai_128B:
789 case Hexagon::V6_vS32b_nt_new_npred_ai_128B:
790 case Hexagon::V6_vS32b_nt_new_pred_ai_128B:
791 case Hexagon::V6_vS32b_nt_npred_ai_128B:
792 case Hexagon::V6_vS32b_nt_nqpred_ai_128B:
793 case Hexagon::V6_vS32b_nt_pred_ai_128B:
794 case Hexagon::V6_vS32b_nt_qpred_ai_128B:
795 case Hexagon::V6_vS32b_pred_ai_128B:
796 case Hexagon::V6_vS32b_qpred_ai_128B:
814 for (++MII; MII != MBB->
instr_end() && MII->isInsideBundle(); ++MII)
815 if (!MII->isDebugValue() && !MII->isImplicitDef())
822 MCII, *Subtarget,
OutStreamer->getContext(), MCB,
nullptr);
const MachineFunction * getParent() const
Return the MachineFunction containing this basic block.
const GlobalValue * getGlobal() const
instr_iterator instr_end()
std::unique_ptr< MCStreamer > OutStreamer
This is the MCStreamer object for the file we are generating.
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx)
MCSymbol * getSymbol(const GlobalValue *GV) const
void print(raw_ostream &OS, const MCAsmInfo *MAI) const
print - Print the value to the stream OS.
MachineBasicBlock * getMBB() const
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
MCContext & OutContext
This is the context for the output file that we are streaming.
static MCOperand createExpr(const MCExpr *Val)
static cl::opt< bool > AlignCalls("hexagon-align-calls", cl::Hidden, cl::init(true), cl::desc("Insert falign after call instruction for Hexagon target"))
const MachineFunction * MF
The current machine function.
MachineBasicBlock reference.
static MCSymbol * smallData(AsmPrinter &AP, const MachineInstr &MI, MCStreamer &OutStreamer, const MCOperand &Imm, int AlignSize)
const MCSubtargetInfo & getSubtargetInfo() const
Return information about subtarget.
return AArch64::GPR64RegClass contains(Reg)
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
static MCOperand createReg(unsigned Reg)
MCSuperRegIterator enumerates all super-registers of Reg.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
bool isImm() const
isImm - Tests if this is a MO_Immediate operand.
bool isReg() const
isReg - Tests if this is a MO_Register operand.
Base class for the full range of assembler expressions which are needed for parsing.
Reg
All possible values of the reg field in the ModR/M byte.
MCSymbol * GetJTISymbol(unsigned JTID, bool isLinkerPrivate=false) const
Return the symbol for the specified jump table entry.
MCContext & getContext() const
Context object for machine code objects.
static const MCBinaryExpr * createSub(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
unsigned getReg() const
Returns the register number.
bool useHVXSglOps() const
bool canonicalizePacket(MCInstrInfo const &MCII, MCSubtargetInfo const &STI, MCContext &Context, MCInst &MCB, HexagonMCChecker *Checker)
HexagonAsmPrinter(TargetMachine &TM, std::unique_ptr< MCStreamer > Streamer)
virtual void EmitIntValue(uint64_t Value, unsigned Size)
Special case of EmitValue that avoids the client having to pass in a MCExpr for constant integers...
void EmitInstruction(const MachineInstr *MI) override
printMachineInstruction – Print out a single Hexagon MI in Darwin syntax to the current output stream...
void EmitValue(const MCExpr *Value, unsigned Size, SMLoc Loc=SMLoc())
Instances of this class represent a single low-level machine instruction.
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
const MachineBasicBlock * getParent() const
static unsigned getHexagonRegisterPair(unsigned Reg, const MCRegisterInfo *RI)
const MCExpr * getExpr() const
void HexagonLowerToMC(const MCInstrInfo &MCII, const MachineInstr *MI, MCInst &MCB, HexagonAsmPrinter &AP)
void HexagonProcessInstruction(MCInst &Inst, const MachineInstr &MBB)
Address of a global value.
initializer< Ty > init(const Ty &Val)
Streaming machine code generation interface.
static HexagonMCExpr * create(MCExpr const *Expr, MCContext &Ctx)
const MCAsmInfo * MAI
Target Asm Printer information.
virtual void SwitchSection(MCSection *Section, const MCExpr *Subsection=nullptr)
Set the current section where code is being emitted to Section.
This file contains the declarations for the subclasses of Constant, which represent the different fla...
const MachineOperand & getOperand(unsigned i) const
virtual bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode, raw_ostream &OS)
Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant...
unsigned getSubReg(unsigned Reg, unsigned Idx) const
Returns the physical register number of sub-register "Index" for physical register RegNo...
Interface to description of machine instruction set.
This class is intended to be used as a driving class for all asm writers.
virtual bool EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute)=0
Add the given Attribute to Symbol.
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang","erlang-compatible garbage collector")
void printOffset(int64_t Offset, raw_ostream &OS) const
This is just convenient handler for printing offsets.
bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode, raw_ostream &OS) override
Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant as...
int64_t getOffset() const
Return the offset from the symbol in this operand.
virtual bool isBlockOnlyReachableByFallthrough(const MachineBasicBlock *MBB) const
Return true if the basic block has exactly one predecessor and the control transfer mechanism between...
self_iterator getIterator()
static MCInst ScaleVectorOffset(MCInst &Inst, unsigned OpNo, unsigned VectorSize, MCContext &Ctx)
LLVM_NODISCARD std::string str() const
str - Get the contents as an std::string.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
MCSymbol * getSymbol() const
Return the MCSymbol for this basic block.
static const MCUnaryExpr * createMinus(const MCExpr *Expr, MCContext &Ctx, SMLoc Loc=SMLoc())
void LLVMInitializeHexagonAsmPrinter()
void printOperand(const MachineInstr *MI, unsigned OpNo, raw_ostream &O)
void setOpcode(unsigned Op)
bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode, raw_ostream &OS) override
PrintAsmOperand - Print out an operand for an inline asm expression.
std::pair< MCSection *, const MCExpr * > MCSectionSubPair
MachineOperand class - Representation of each machine instruction operand.
Module.h This file contains the declarations for the Module class.
virtual void EmitCodeAlignment(unsigned ByteAlignment, unsigned MaxBytesToEmit=0)
Emit nops until the byte alignment ByteAlignment is reached.
unsigned getOpcode() const
llvm_unreachable("Unknown RegBank!")
Representation of each machine instruction.
MachineOperandType getType() const
getType - Returns the MachineOperandType for this operand.
bool hasAddressTaken() const
Test whether this block is potentially the target of an indirect branch.
MCSymbol * getOrCreateSymbol(const Twine &Name)
Lookup the symbol inside with the specified Name.
unsigned getNumOperands() const
This represents a section on linux, lots of unix variants and some bare metal systems.
void setMustNotExtend(MCExpr const &Expr, bool Val=true)
size_t bundleSize(MCInst const &MCI)
static std::string utohexstr(uint64_t X, bool LowerCase=false)
virtual MCSymbol * GetCPISymbol(unsigned CPID) const
Return the symbol for the specified constant pool entry.
void setReg(unsigned Reg)
Set the register number.
unsigned getReg() const
getReg - Returns the register number.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
MCSectionELF * getELFSection(const Twine &Section, unsigned Type, unsigned Flags)
LLVM Value Representation.
static char const * getRegisterName(unsigned RegNo)
const HexagonInstrInfo * getInstrInfo() const override
RegisterAsmPrinter - Helper template for registering a target specific assembly printer, for use in the target machine initialization function.
virtual void EmitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc())
Emit a label for Symbol into the current section.
This class implements an extremely fast bulk output stream that can only output to a stream...
Primary interface to the complete machine description for the target machine.
virtual const TargetRegisterInfo * getRegisterInfo() const
getRegisterInfo - If register information is available, return it.
void addOperand(const MCOperand &Op)
virtual void print(raw_ostream &O, const Module *M) const
print - Print out the internal state of the pass.
StringRef - Represent a constant reference to a string, i.e.
bool isBlockOnlyReachableByFallthrough(const MachineBasicBlock *MBB) const override
Return true if the basic block has exactly one predecessor and the control transfer mechanism between...
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE StringRef drop_back(size_t N=1) const
Return a StringRef equal to 'this' but with the last N elements dropped.
Address of indexed Constant in Constant Pool.
void setS27_2_reloc(MCExpr const &Expr, bool Val=true)
Instances of this class represent operands of the MCInst class.
Instructions::const_iterator const_instr_iterator
static const MCConstantExpr * create(int64_t Value, MCContext &Ctx)
const MCOperand & getOperand(unsigned i) const
Target & getTheHexagonTarget()
bool isUndefined(bool SetUsed=true) const
isUndefined - Check if this symbol undefined (i.e., implicitly defined).
void setExpr(const MCExpr *Val)