72#define DEBUG_TYPE "mips-asm-printer"
83 for (
const auto &
I :
MipsFI->StubsNeeded)
84 StubsNeeded.insert(
I);
85 MCP =
MF.getConstantPool();
99#include "MipsGenMCPseudoLowering.inc"
103void MipsAsmPrinter::emitPseudoIndirectBranch(
MCStreamer &OutStreamer,
105 bool HasLinkReg =
false;
106 bool InMicroMipsMode =
Subtarget->inMicroMipsMode();
135 unsigned ZeroReg =
Subtarget->isGP64bit() ? Mips::R0_64 : Mips::R0;
139 lowerOperand(
MI->getOperand(0), MCOp);
161 if (Callee && !Callee->getName().empty()) {
164 const MCExpr *OffsetExpr =
169 Subtarget.inMicroMipsMode() ?
"R_MICROMIPS_JALR" :
"R_MIPS_JALR",
184 unsigned Opc =
MI->getOpcode();
187 if (
MI->isDebugValue()) {
194 if (
MI->isDebugLabel())
198 if (InConstantPool &&
Opc != Mips::CONSTPOOL_ENTRY) {
200 InConstantPool =
false;
202 if (
Opc == Mips::CONSTPOOL_ENTRY) {
210 unsigned LabelId = (
unsigned)
MI->getOperand(0).getImm();
211 unsigned CPIdx = (
unsigned)
MI->getOperand(1).getIndex();
214 if (!InConstantPool) {
216 InConstantPool =
true;
230 case Mips::PATCHABLE_FUNCTION_ENTER:
233 case Mips::PATCHABLE_FUNCTION_EXIT:
236 case Mips::PATCHABLE_TAIL_CALL:
241 if (
Subtarget->getMCCLOpts().jalr_reloc &&
242 (
MI->isReturn() ||
MI->isCall() ||
MI->isIndirectBranch())) {
251 if (
MCInst OutInst; lowerPseudoInstExpansion(&*
I, OutInst)) {
260 if (
I->getOpcode() == Mips::PseudoReturn ||
261 I->getOpcode() == Mips::PseudoReturn64 ||
262 I->getOpcode() == Mips::PseudoIndirectBranch ||
263 I->getOpcode() == Mips::PseudoIndirectBranch64 ||
264 I->getOpcode() == Mips::TAILCALLREG ||
265 I->getOpcode() == Mips::TAILCALLREG64) {
277 if (
I->isPseudo() && !
Subtarget->inMips16Mode()
278 && !isLongBranchPseudo(
I->getOpcode()))
284 }
while ((++
I != E) &&
I->isInsideBundle());
326 unsigned CPUBitmask = 0, FPUBitmask = 0;
327 int CPUTopSavedRegOff, FPUTopSavedRegOff;
334 unsigned CPURegSize =
TRI->getRegSizeInBits(Mips::GPR32RegClass) / 8;
335 unsigned FGR32RegSize =
TRI->getRegSizeInBits(Mips::FGR32RegClass) / 8;
336 unsigned AFGR64RegSize =
TRI->getRegSizeInBits(Mips::AFGR64RegClass) / 8;
337 bool HasAFGR64Reg =
false;
338 unsigned CSFPRegsSize = 0;
340 for (
const auto &
I : CSI) {
342 unsigned RegNum =
TRI->getEncodingValue(Reg);
346 if (Mips::FGR32RegClass.
contains(Reg)) {
347 FPUBitmask |= (1 << RegNum);
348 CSFPRegsSize += FGR32RegSize;
349 }
else if (Mips::AFGR64RegClass.
contains(Reg)) {
350 FPUBitmask |= (3 << RegNum);
351 CSFPRegsSize += AFGR64RegSize;
353 }
else if (Mips::GPR32RegClass.
contains(Reg))
354 CPUBitmask |= (1 << RegNum);
358 FPUTopSavedRegOff = FPUBitmask ?
359 (HasAFGR64Reg ? -AFGR64RegSize : -FGR32RegSize) : 0;
362 CPUTopSavedRegOff = CPUBitmask ? -CSFPRegsSize - CPURegSize : 0;
366 TS.
emitMask(CPUBitmask, CPUTopSavedRegOff);
369 TS.
emitFMask(FPUBitmask, FPUTopSavedRegOff);
382 unsigned stackSize =
MF->getFrameInfo().getStackSize();
384 getTargetStreamer().emitFrame(stackReg, stackSize, returnReg);
389 switch (ABI.GetEnumValue()) {
425 bool IsNakedFunction =
MF->getFunction().hasFnAttribute(Attribute::Naked);
426 if (!IsNakedFunction)
429 if (!IsNakedFunction)
457 InConstantPool =
false;
472 if (ExtraCode && ExtraCode[0]) {
473 if (ExtraCode[1] != 0)
return true;
476 switch (ExtraCode[0]) {
528 if (!FlagsOP.
isImm())
531 const unsigned NumVals = Flags.getNumOperandRegisters();
543 unsigned RegOp = OpNum;
547 switch(ExtraCode[0]) {
549 RegOp = (
Subtarget->isLittle()) ? OpNum + 1 : OpNum;
552 RegOp = (
Subtarget->isLittle()) ? OpNum : OpNum + 1;
557 if (RegOp >=
MI->getNumOperands())
570 if (w != Mips::NoRegister) {
585 const char *ExtraCode,
587 assert(OpNum + 1 <
MI->getNumOperands() &&
"Insufficient operands");
591 "Unexpected base pointer for inline asm memory operand.");
593 "Unexpected offset for inline asm memory operand.");
598 switch (ExtraCode[0]) {
683 if (closeP) O <<
")";
694 for (
int i = opNum, e =
MI->getNumOperands(); i != e; ++i) {
695 if (i != opNum) O <<
", ";
701 const Triple &TT = M.getTargetTriple();
703 if (TT.isOSBinFormatELF()) {
714 if (FS.empty() && M.size() &&
F->hasFnAttribute(
"target-features"))
715 FS =
F->getFnAttribute(
"target-features").getValueAsString();
717 std::string strFS = FS.str();
718 if (M.size() &&
F->getFnAttribute(
"use-soft-float").getValueAsBool())
719 strFS += strFS.empty() ?
"+soft-float" :
",+soft-float";
801 unsigned uid)
const {
810 getTargetStreamer().emitGPRel32Value(
814 getTargetStreamer().emitGPRel64Value(
824 I.setOpcode(Mips::JAL);
830void MipsAsmPrinter::EmitInstrReg(
const MCSubtargetInfo &STI,
unsigned Opcode,
839 unsigned Opcode,
unsigned Reg1,
847 if (Opcode == Mips::MTC1) {
848 unsigned Temp = Reg1;
859 unsigned Opcode,
unsigned Reg1,
860 unsigned Reg2,
unsigned Reg3) {
870 unsigned MovOpc,
unsigned Reg1,
871 unsigned Reg2,
unsigned FPReg1,
872 unsigned FPReg2,
bool LE) {
874 unsigned temp = Reg1;
878 EmitInstrRegReg(STI, MovOpc, Reg1, FPReg1);
879 EmitInstrRegReg(STI, MovOpc, Reg2, FPReg2);
884 bool LE,
bool ToFP) {
885 using namespace Mips16HardFloatInfo;
888 unsigned MovOpc = ToFP ? Mips::MTC1 : Mips::MFC1;
891 EmitInstrRegReg(STI, MovOpc,
ABI.getArgReg(0), Mips::F12);
894 EmitMovFPIntPair(STI, MovOpc,
ABI.getArgReg(0),
ABI.getArgReg(1), Mips::F12,
898 EmitInstrRegReg(STI, MovOpc,
ABI.getArgReg(0), Mips::F12);
899 EmitMovFPIntPair(STI, MovOpc,
ABI.getArgReg(2),
ABI.getArgReg(3), Mips::F14,
903 EmitMovFPIntPair(STI, MovOpc,
ABI.getArgReg(0),
ABI.getArgReg(1), Mips::F12,
907 EmitMovFPIntPair(STI, MovOpc,
ABI.getArgReg(0),
ABI.getArgReg(1), Mips::F12,
909 EmitMovFPIntPair(STI, MovOpc,
ABI.getArgReg(2),
ABI.getArgReg(3), Mips::F14,
913 EmitMovFPIntPair(STI, MovOpc,
ABI.getArgReg(0),
ABI.getArgReg(1), Mips::F12,
915 EmitInstrRegReg(STI, MovOpc,
ABI.getArgReg(2), Mips::F14);
922void MipsAsmPrinter::EmitSwapFPIntRetval(
925 using namespace Mips16HardFloatInfo;
928 unsigned MovOpc = Mips::MFC1;
931 EmitInstrRegReg(STI, MovOpc,
ABI.getReturnReg(0), Mips::F0);
934 EmitMovFPIntPair(STI, MovOpc,
ABI.getReturnReg(0),
ABI.getReturnReg(1),
935 Mips::F0, Mips::F1, LE);
938 EmitMovFPIntPair(STI, MovOpc,
ABI.getReturnReg(0),
ABI.getReturnReg(1),
939 Mips::F0, Mips::F1, LE);
942 EmitMovFPIntPair(STI, MovOpc,
ABI.getReturnReg(0),
ABI.getReturnReg(1),
943 Mips::F0, Mips::F1, LE);
944 EmitMovFPIntPair(STI, MovOpc,
ABI.getArgReg(0),
ABI.getArgReg(1), Mips::F2,
952void MipsAsmPrinter::EmitFPCallStub(
954 using namespace Mips16HardFloatInfo;
962 std::unique_ptr<MCSubtargetInfo> STI(
TM.getTarget().createMCSubtargetInfo(
963 TM.getTargetTriple(),
TM.getTargetCPU(),
TM.getTargetFeatureString()));
975 switch (Signature->
RetSig) {
986 RetType =
"double complex";
998 Parms =
"float, float";
1001 Parms =
"float, double";
1007 Parms =
"double, double";
1010 Parms =
"double, float";
1016 OutStreamer->AddComment(
"\t# Stub function to call " + Twine(RetType) +
" " +
1017 Twine(Symbol) +
" (" + Twine(Parms) +
")");
1033 MipsTargetStreamer &TS = getTargetStreamer();
1045 std::string
x =
"__call_stub_fp_" + std::string(Symbol);
1049 OutContext.getOrCreateSymbol(
"__call_stub_fp_" + Twine(Symbol));
1055 "should not be here if we are compiling pic");
1072 EmitInstrRegRegReg(*STI, Mips::OR,
Subtarget->getABI().getSavedReg(2),
1075 EmitSwapFPIntParams(*STI, Signature->
ParamSig, LE,
true);
1079 EmitJal(*STI, MSymbol);
1082 EmitSwapFPIntRetval(*STI, Signature->
RetSig, LE);
1088 EmitInstrReg(*STI, Mips::JR,
Subtarget->getABI().getSavedReg(2));
1106 it = StubsNeeded.
begin();
1107 it != StubsNeeded.end(); ++it) {
1108 const char *Symbol = it->first;
1110 EmitFPCallStub(Symbol, Signature);
1116void MipsAsmPrinter::EmitSled(
const MachineInstr &
MI, SledKind Kind) {
1191 MCInstBuilder(Mips::BEQ).addReg(Mips::R0).addReg(Mips::R0).addExpr(
1194 for (int8_t
I = 0;
I < NoopsInSledCount;
I++)
1197 MCInstBuilder(Mips::SLL).addReg(Mips::R0).addReg(Mips::R0).addImm(0));
1235 getTargetStreamer().emitDTPRel32Value(MipsExpr->getSubExpr());
1238 getTargetStreamer().emitDTPRel64Value(MipsExpr->getSubExpr());
1249bool MipsAsmPrinter::isLongBranchPseudo(
int Opcode)
const {
1250 return (Opcode == Mips::LONG_BRANCH_LUi
1251 || Opcode == Mips::LONG_BRANCH_LUi2Op
1252 || Opcode == Mips::LONG_BRANCH_LUi2Op_64
1253 || Opcode == Mips::LONG_BRANCH_ADDiu
1254 || Opcode == Mips::LONG_BRANCH_ADDiu2Op
1255 || Opcode == Mips::LONG_BRANCH_DADDiu
1256 || Opcode == Mips::LONG_BRANCH_DADDiu2Op);
1266LLVMInitializeMipsAsmPrinter() {
const AArch64Subtarget & Subtarget
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file contains the simple types necessary to represent the attributes associated with functions a...
static const Function * getParent(const Value *V)
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
#define LLVM_EXTERNAL_VISIBILITY
Module.h This file contains the declarations for the Module class.
This file declares the MachineConstantPool class which is an abstract constant pool to keep track of ...
Register const TargetRegisterInfo * TRI
static const char * getABIString(const MipsABIInfo &ABI)
Emit Set directives.
ModuleAnalysisManager MAM
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
static bool contains(SmallPtrSetImpl< ConstantExpr * > &Cache, ConstantExpr *Expr, Constant *C)
This file defines the SmallString class.
static TableGen::Emitter::Opt Y("gen-skeleton-entry", EmitSkeleton, "Generate example skeleton entry")
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
This class is intended to be used as a driving class for all asm writers.
const TargetLoweringObjectFile & getObjFileLowering() const
Return information about object file lowering.
virtual void emitDebugValue(const MCExpr *Value, unsigned Size) const
Emit the directive and value for debug thread local expression.
void EmitToStreamer(MCStreamer &S, const MCInst &Inst)
unsigned getPointerSize() const
Return the pointer size in bytes from the target triple.
TargetMachine & TM
Target machine description.
void emitXRayTable()
Emit a table with all XRay instrumentation points.
virtual void emitBasicBlockEnd(const MachineBasicBlock &MBB)
Targets can override this to emit stuff at the end of a basic block.
virtual MCSymbol * GetCPISymbol(unsigned CPID) const
Return the symbol for the specified constant pool entry.
virtual void PrintSymbolOperand(const MachineOperand &MO, raw_ostream &OS)
Print the MachineOperand as a symbol.
MachineFunction * MF
The current machine function.
virtual void emitMachineConstantPoolValue(MachineConstantPoolValue *MCPV)
void recordSled(MCSymbol *Sled, const MachineInstr &MI, SledKind Kind, uint8_t Version=0)
bool doInitialization(Module &M) override
Set up the AsmPrinter when we are working on a new module.
unsigned getFunctionNumber() const
Return a unique ID for the current function.
void emitGlobalConstant(const DataLayout &DL, const Constant *CV, AliasMapTy *AliasList=nullptr)
EmitGlobalConstant - Print a general LLVM constant to the .s file.
MCSymbol * CurrentFnSym
The symbol for the current function.
MCContext & OutContext
This is the context for the output file that we are streaming.
bool doFinalization(Module &M) override
Shut down the asmprinter.
bool isPositionIndependent() const
bool runOnMachineFunction(MachineFunction &MF) override
Emit the specified function out to the OutStreamer.
std::unique_ptr< MCStreamer > OutStreamer
This is the MCStreamer object for the file we are generating.
const MCAsmInfo & MAI
Target Asm Printer information.
MCSymbol * GetBlockAddressSymbol(const BlockAddress *BA) const
Return the MCSymbol used to satisfy BlockAddress uses of the specified basic block.
const DataLayout & getDataLayout() const
Return information about data layout.
MCSymbol * GetExternalSymbolSymbol(const Twine &Sym) const
Return the MCSymbol for the specified ExternalSymbol.
const MCSubtargetInfo & getSubtargetInfo() const
Return information about subtarget.
virtual void emitInlineAsmStart() const
Let the target do anything it needs to do before emitting inlineasm.
virtual bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, const char *ExtraCode, raw_ostream &OS)
Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant.
bool isLittleEndian() const
Layout endianness...
StringRef getInternalSymbolPrefix() const
static const MCBinaryExpr * createSub(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
Context object for machine code objects.
LLVM_ABI MCSymbol * createTempSymbol()
Create a temporary symbol with a unique name.
Base class for the full range of assembler expressions which are needed for parsing.
Instances of this class represent a single low-level machine instruction.
void addOperand(const MCOperand Op)
void setOpcode(unsigned Op)
Instances of this class represent operands of the MCInst class.
static MCOperand createExpr(const MCExpr *Val)
static MCOperand createReg(MCRegister Reg)
MCRegister getRARegister() const
This method should return the register where the return address can be found.
Wrapper class representing physical registers and target specific virtual registers.
Streaming machine code generation interface.
Generic base class for all target subtargets.
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx, SMLoc Loc=SMLoc())
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
LLVM_ABI void print(raw_ostream &OS, const MCAsmInfo *MAI) const
print - Print the value to the stream OS.
StringRef getName() const
getName - Get the symbol name.
LLVM_ABI MCSymbol * getSymbol() const
Return the MCSymbol for this basic block.
Instructions::const_iterator const_instr_iterator
This class is a data container for one entry in a MachineConstantPool.
union llvm::MachineConstantPoolEntry::@004270020304201266316354007027341142157160323045 Val
The constant itself.
bool isMachineConstantPoolEntry() const
isMachineConstantPoolEntry - Return true if the MachineConstantPoolEntry is indeed a target specific ...
MachineConstantPoolValue * MachineCPVal
const Constant * ConstVal
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted.
const std::vector< CalleeSavedInfo > & getCalleeSavedInfo() const
Returns a reference to call saved info vector for the current function.
Function & getFunction()
Return the LLVM function that this machine code represents.
Representation of each machine instruction.
@ EK_GPRel32BlockAddress
EK_GPRel32BlockAddress - Each entry is an address of block, encoded with a relocation as gp-relative,...
@ EK_BlockAddress
EK_BlockAddress - Each entry is a plain address of block, e.g.: .word LBB123.
@ EK_GPRel64BlockAddress
EK_GPRel64BlockAddress - Each entry is an address of block, encoded with a relocation as gp-relative,...
JTEntryKind getEntryKind() const
MachineOperand class - Representation of each machine instruction operand.
bool isReg() const
isReg - Tests if this is a MO_Register operand.
MachineBasicBlock * getMBB() const
bool isImm() const
isImm - Tests if this is a MO_Immediate operand.
const BlockAddress * getBlockAddress() const
unsigned getTargetFlags() const
MachineOperandType getType() const
getType - Returns the MachineOperandType for this operand.
Register getReg() const
getReg - Returns the register number.
MCSymbol * getMCSymbol() const
@ MO_Immediate
Immediate operand.
@ MO_ConstantPoolIndex
Address of indexed Constant in Constant Pool.
@ MO_GlobalAddress
Address of a global value.
@ MO_BlockAddress
Address of a basic block.
@ MO_MachineBasicBlock
MachineBasicBlock reference.
@ MO_Register
Register operand.
int64_t getOffset() const
Return the offset from the symbol in this operand.
PreservedAnalyses run(Module &M, ModuleAnalysisManager &MFAM)
PreservedAnalyses run(Module &M, ModuleAnalysisManager &MFAM)
PreservedAnalyses run(MachineFunction &MF, MachineFunctionAnalysisManager &MFAM)
void emitFunctionBodyStart() override
EmitFunctionBodyStart - Targets can override this to emit stuff before the first basic block in the f...
void emitDebugValue(const MCExpr *Value, unsigned Size) const override
Emit the directive and value for debug thread local expression.
bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, const char *ExtraCode, raw_ostream &O) override
Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant.
void printSavedRegsBitmask()
void emitBasicBlockEnd(const MachineBasicBlock &MBB) override
Targets can override this to emit stuff at the end of a basic block.
void LowerPATCHABLE_FUNCTION_ENTER(const MachineInstr &MI)
void printFCCOperand(const MachineInstr *MI, int opNum, raw_ostream &O)
void printRegisterList(const MachineInstr *MI, int opNum, raw_ostream &O)
void PrintDebugValueComment(const MachineInstr *MI, raw_ostream &OS)
bool runOnMachineFunction(MachineFunction &MF) override
Emit the specified function out to the OutStreamer.
void emitFunctionBodyEnd() override
EmitFunctionBodyEnd - Targets can override this to emit stuff after the last basic block in the funct...
MipsMCInstLower MCInstLowering
void LowerPATCHABLE_TAIL_CALL(const MachineInstr &MI)
const MipsSubtarget * Subtarget
const MipsFunctionInfo * MipsFI
void emitEndOfAsmFile(Module &M) override
This virtual method can be overridden by targets that want to emit something at the end of their file...
bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNum, const char *ExtraCode, raw_ostream &O) override
Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant as...
void LowerPATCHABLE_FUNCTION_EXIT(const MachineInstr &MI)
void emitFrameDirective()
Frame Directive.
void emitStartOfAsmFile(Module &M) override
This virtual method can be overridden by targets that want to emit something at the start of their fi...
void printOperand(const MachineInstr *MI, int opNum, raw_ostream &O)
void emitFunctionEntryLabel() override
EmitFunctionEntryLabel - Emit the label that is the entrypoint for the function.
void emitInstruction(const MachineInstr *MI) override
Targets should implement this to emit instructions.
void emitDirectiveRelocJalr(const MachineInstr &MI, MCContext &OutContext, TargetMachine &TM, MCStreamer &OutStreamer, const MipsSubtarget &Subtarget)
MipsFunctionInfo - This class is derived from MachineFunction private Mips target-specific informatio...
static const char * getRegisterName(MCRegister Reg, unsigned AltIdx=Mips::NoRegAltName)
MCOperand LowerOperand(const MachineOperand &MO, int64_t offset=0) const
bool useSoftFloat() const
bool isSingleFloat() const
const MipsABIInfo & getABI() const
bool isLittleEndian() const
virtual void emitDirectiveSetAt()
virtual void emitDirectiveSetReorder()
void forbidModuleDirective()
virtual void emitDirectiveSetNoMicroMips()
virtual void emitDirectiveNaN2008()
virtual void emitDirectiveEnd(StringRef Name)
virtual void emitDirectiveSetMacro()
virtual void setUsesMicroMips()
virtual void emitDirectiveEnt(const MCSymbol &Symbol)
virtual void emitDirectiveSetNoMips16()
virtual void emitDirectiveSetPush()
virtual void setPic(bool Value)
virtual void emitDirectiveSetNoAt()
void updateABIInfo(const PredicateLibrary &P)
virtual void emitDirectiveNaNLegacy()
virtual void emitMask(unsigned CPUBitmask, int CPUTopSavedRegOff)
virtual void emitDirectiveSetPop()
virtual void emitDirectiveSetMicroMips()
virtual void emitDirectiveSetNoMacro()
virtual void emitDirectiveModuleOddSPReg()
virtual void emitDirectiveInsn()
virtual void emitFMask(unsigned FPUBitmask, int FPUTopSavedRegOff)
virtual void emitDirectiveSetNoReorder()
virtual void emitDirectiveOptionPic0()
virtual void emitDirectiveSetMips16()
virtual void emitDirectiveAbiCalls()
virtual void emitDirectiveModuleFP()
A Module instance is used to store all the information related to an LLVM module.
FunctionListType::iterator iterator
The Function iterators.
A set of analyses that are preserved following a run of a transformation pass.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
Wrapper class representing virtual and physical registers.
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
LLVM_NO_SANITIZE_CFI_UNRELATED_CAST iterator begin()
Represent a constant reference to a string, i.e.
LLVM_ABI std::string lower() const
Primary interface to the complete machine description for the target machine.
StringRef getTargetABIName(const Module &M) const
Returns the effective target ABI name: the "target-abi" module flag if present, otherwise the -target...
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
virtual Register getFrameRegister(const MachineFunction &MF) const =0
Debug information queries.
Target - Wrapper for Target specific information.
Triple - Helper class for working with autoconf configuration names.
static Twine utohexstr(uint64_t Val)
LLVM Value Representation.
This class implements an extremely fast bulk output stream that can only output to a stream.
A raw_ostream that writes to an SmallVector or SmallString.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
StringRef selectMipsCPU(const Triple &TT, StringRef CPU)
Select the Mips CPU for the given triple and cpu name.
const char * MipsFCCToString(Mips::CondCode CC)
This is an optimization pass for GlobalISel generic memory operations.
auto drop_begin(T &&RangeOrContainer, size_t N=1)
Return a range covering RangeOrContainer with the first N elements excluded.
OuterAnalysisManagerProxy< ModuleAnalysisManager, MachineFunction > ModuleAnalysisManagerMachineFunctionProxy
Provide the ModuleAnalysisManager to Function proxy.
Target & getTheMips64Target()
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
constexpr bool isPowerOf2_64(uint64_t Value)
Return true if the argument is a power of two > 0 (64 bit edition.)
AnalysisManager< MachineFunction > MachineFunctionAnalysisManager
Target & getTheNanoMipsTarget()
unsigned Log2_64(uint64_t Value)
Return the floor log base 2 of the specified value, -1 if the value is zero.
@ MCDR_DataRegionEnd
.end_data_region
@ MCDR_DataRegion
.data_region
static MCRegister getMSARegFromFReg(MCRegister Reg)
LLVM_ABI void setupModuleAsmPrinter(Module &M, ModuleAnalysisManager &MAM, AsmPrinter &AsmPrinter)
Target & getTheMips64elTarget()
Target & getTheMipselTarget()
LLVM_ABI void setupMachineFunctionAsmPrinter(MachineFunctionAnalysisManager &MFAM, MachineFunction &MF, AsmPrinter &AsmPrinter)
Target & getTheMipsTarget()
@ MCSA_Global
.type _foo, @gnu_unique_object
@ MCSA_ELF_TypeFunction
.type _foo, STT_FUNC # aka @function
AnalysisManager< Module > ModuleAnalysisManager
Convenience typedef for the Module analysis manager.
This struct is a compact representation of a valid (non-zero power of two) alignment.
RegisterAsmPrinter - Helper template for registering a target specific assembly printer,...