70#define DEBUG_TYPE "mips-asm-printer"
84 const char *Symbol =
I.first;
86 if (StubsNeeded.find(Symbol) == StubsNeeded.end())
87 StubsNeeded[Symbol] = Signature;
93 NaClAlignIndirectJumpTargets(
MF);
107#include "MipsGenMCPseudoLowering.inc"
111void MipsAsmPrinter::emitPseudoIndirectBranch(
MCStreamer &OutStreamer,
113 bool HasLinkReg =
false;
144 lowerOperand(
MI->getOperand(0), MCOp);
166 if (Callee && !Callee->getName().empty()) {
168 const MCExpr *OffsetExpr =
175 CaleeExpr,
SMLoc(), *
TM.getMCSubtargetInfo());
189 unsigned Opc =
MI->getOpcode();
192 if (
MI->isDebugValue()) {
199 if (
MI->isDebugLabel())
203 if (InConstantPool && Opc != Mips::CONSTPOOL_ENTRY) {
205 InConstantPool =
false;
207 if (Opc == Mips::CONSTPOOL_ENTRY) {
215 unsigned LabelId = (
unsigned)
MI->getOperand(0).getImm();
216 unsigned CPIdx = (
unsigned)
MI->getOperand(1).getIndex();
219 if (!InConstantPool) {
221 InConstantPool =
true;
235 case Mips::PATCHABLE_FUNCTION_ENTER:
238 case Mips::PATCHABLE_FUNCTION_EXIT:
241 case Mips::PATCHABLE_TAIL_CALL:
247 (
MI->isReturn() ||
MI->isCall() ||
MI->isIndirectBranch())) {
263 if (
I->getOpcode() == Mips::PseudoReturn ||
264 I->getOpcode() == Mips::PseudoReturn64 ||
265 I->getOpcode() == Mips::PseudoIndirectBranch ||
266 I->getOpcode() == Mips::PseudoIndirectBranch64 ||
267 I->getOpcode() == Mips::TAILCALLREG ||
268 I->getOpcode() == Mips::TAILCALLREG64) {
281 && !isLongBranchPseudo(
I->getOpcode()))
287 }
while ((++
I !=
E) &&
I->isInsideBundle());
329 unsigned CPUBitmask = 0, FPUBitmask = 0;
330 int CPUTopSavedRegOff, FPUTopSavedRegOff;
337 unsigned CPURegSize =
TRI->getRegSizeInBits(Mips::GPR32RegClass) / 8;
338 unsigned FGR32RegSize =
TRI->getRegSizeInBits(Mips::FGR32RegClass) / 8;
339 unsigned AFGR64RegSize =
TRI->getRegSizeInBits(Mips::AFGR64RegClass) / 8;
340 bool HasAFGR64Reg =
false;
341 unsigned CSFPRegsSize = 0;
343 for (
const auto &
I : CSI) {
345 unsigned RegNum =
TRI->getEncodingValue(Reg);
349 if (Mips::FGR32RegClass.
contains(Reg)) {
350 FPUBitmask |= (1 << RegNum);
351 CSFPRegsSize += FGR32RegSize;
352 }
else if (Mips::AFGR64RegClass.
contains(Reg)) {
353 FPUBitmask |= (3 << RegNum);
354 CSFPRegsSize += AFGR64RegSize;
356 }
else if (Mips::GPR32RegClass.
contains(Reg))
357 CPUBitmask |= (1 << RegNum);
361 FPUTopSavedRegOff = FPUBitmask ?
362 (HasAFGR64Reg ? -AFGR64RegSize : -FGR32RegSize) : 0;
365 CPUTopSavedRegOff = CPUBitmask ? -CSFPRegsSize - CPURegSize : 0;
369 TS.
emitMask(CPUBitmask, CPUTopSavedRegOff);
372 TS.
emitFMask(FPUBitmask, FPUTopSavedRegOff);
387 getTargetStreamer().
emitFrame(stackReg, stackSize, returnReg);
432 if (!IsNakedFunction)
435 if (!IsNakedFunction)
463 InConstantPool =
false;
485 if (isa<SwitchInst>(bb->getTerminator()))
511 while (
I != Pred->
begin() && !(--
I)->isTerminator()) ;
513 return !
I->isBarrier();
520 if (ExtraCode && ExtraCode[0]) {
521 if (ExtraCode[1] != 0)
return true;
524 switch (ExtraCode[0]) {
570 if (!FlagsOP.
isImm())
573 const unsigned NumVals = Flags.getNumOperandRegisters();
585 unsigned RegOp = OpNum;
589 switch(ExtraCode[0]) {
599 if (RegOp >=
MI->getNumOperands())
624 const char *ExtraCode,
626 assert(OpNum + 1 <
MI->getNumOperands() &&
"Insufficient operands");
630 "Unexpected base pointer for inline asm memory operand.");
632 "Unexpected offset for inline asm memory operand.");
637 switch (ExtraCode[0]) {
722 if (closeP) O <<
")";
733 switch (
MI->getOpcode()) {
738 opNum =
MI->getNumOperands() - 2;
759 const char *Modifier) {
766 for (
int i = opNum, e =
MI->getNumOperands(); i != e; ++i) {
767 if (i != opNum) O <<
", ";
783 if (FS.empty() && M.size() &&
F->hasFnAttribute(
"target-features"))
784 FS =
F->getFnAttribute(
"target-features").getValueAsString();
839void MipsAsmPrinter::emitInlineAsmStart()
const {
863 I.setOpcode(Mips::JAL);
869void MipsAsmPrinter::EmitInstrReg(
const MCSubtargetInfo &STI,
unsigned Opcode,
878 unsigned Opcode,
unsigned Reg1,
886 if (Opcode == Mips::MTC1) {
887 unsigned Temp = Reg1;
898 unsigned Opcode,
unsigned Reg1,
899 unsigned Reg2,
unsigned Reg3) {
909 unsigned MovOpc,
unsigned Reg1,
910 unsigned Reg2,
unsigned FPReg1,
911 unsigned FPReg2,
bool LE) {
913 unsigned temp = Reg1;
917 EmitInstrRegReg(STI, MovOpc, Reg1, FPReg1);
918 EmitInstrRegReg(STI, MovOpc, Reg2, FPReg2);
923 bool LE,
bool ToFP) {
924 using namespace Mips16HardFloatInfo;
926 unsigned MovOpc = ToFP ? Mips::MTC1 : Mips::MFC1;
929 EmitInstrRegReg(STI, MovOpc, Mips::A0, Mips::F12);
932 EmitMovFPIntPair(STI, MovOpc, Mips::A0, Mips::A1, Mips::F12, Mips::F14, LE);
935 EmitInstrRegReg(STI, MovOpc, Mips::A0, Mips::F12);
936 EmitMovFPIntPair(STI, MovOpc, Mips::A2, Mips::A3, Mips::F14, Mips::F15, LE);
939 EmitMovFPIntPair(STI, MovOpc, Mips::A0, Mips::A1, Mips::F12, Mips::F13, LE);
942 EmitMovFPIntPair(STI, MovOpc, Mips::A0, Mips::A1, Mips::F12, Mips::F13, LE);
943 EmitMovFPIntPair(STI, MovOpc, Mips::A2, Mips::A3, Mips::F14, Mips::F15, LE);
946 EmitMovFPIntPair(STI, MovOpc, Mips::A0, Mips::A1, Mips::F12, Mips::F13, LE);
947 EmitInstrRegReg(STI, MovOpc, Mips::A2, Mips::F14);
954void MipsAsmPrinter::EmitSwapFPIntRetval(
957 using namespace Mips16HardFloatInfo;
959 unsigned MovOpc = Mips::MFC1;
962 EmitInstrRegReg(STI, MovOpc, Mips::V0, Mips::F0);
965 EmitMovFPIntPair(STI, MovOpc, Mips::V0, Mips::V1, Mips::F0, Mips::F1, LE);
968 EmitMovFPIntPair(STI, MovOpc, Mips::V0, Mips::V1, Mips::F0, Mips::F1, LE);
971 EmitMovFPIntPair(STI, MovOpc, Mips::V0, Mips::V1, Mips::F0, Mips::F1, LE);
972 EmitMovFPIntPair(STI, MovOpc, Mips::A0, Mips::A1, Mips::F2, Mips::F3, LE);
979void MipsAsmPrinter::EmitFPCallStub(
981 using namespace Mips16HardFloatInfo;
1003 switch (Signature->
RetSig) {
1011 RetType =
"complex";
1014 RetType =
"double complex";
1026 Parms =
"float, float";
1029 Parms =
"float, double";
1035 Parms =
"double, double";
1038 Parms =
"double, float";
1044 OutStreamer->AddComment(
"\t# Stub function to call " +
Twine(RetType) +
" " +
1073 std::string
x =
"__call_stub_fp_" + std::string(Symbol);
1084 "should not be here if we are compiling pic");
1101 EmitInstrRegRegReg(*STI, Mips::OR, Mips::S2, Mips::RA, Mips::ZERO);
1103 EmitSwapFPIntParams(*STI, Signature->
ParamSig, LE,
true);
1107 EmitJal(*STI, MSymbol);
1110 EmitSwapFPIntRetval(*STI, Signature->
RetSig, LE);
1116 EmitInstrReg(*STI, Mips::JR, Mips::S2);
1134 it = StubsNeeded.begin();
1135 it != StubsNeeded.end(); ++it) {
1136 const char *Symbol = it->first;
1138 EmitFPCallStub(Symbol, Signature);
1144void MipsAsmPrinter::EmitSled(
const MachineInstr &
MI, SledKind Kind) {
1221 .addExpr(TargetExpr));
1223 for (int8_t
I = 0;
I < NoopsInSledCount;
I++)
1262 if (
auto *MipsExpr = dyn_cast<MipsMCExpr>(
Value)) {
1266 OutStreamer->emitDTPRel32Value(MipsExpr->getSubExpr());
1269 OutStreamer->emitDTPRel64Value(MipsExpr->getSubExpr());
1282void MipsAsmPrinter::NaClAlignIndirectJumpTargets(
MachineFunction &MF) {
1285 const std::vector<MachineJumpTableEntry> &JT = JtInfo->getJumpTables();
1286 for (
const auto &
I : JT) {
1287 const std::vector<MachineBasicBlock *> &MBBs =
I.MBBs;
1295 for (
auto &
MBB :
MF) {
1301bool MipsAsmPrinter::isLongBranchPseudo(
int Opcode)
const {
1302 return (Opcode == Mips::LONG_BRANCH_LUi
1303 || Opcode == Mips::LONG_BRANCH_LUi2Op
1304 || Opcode == Mips::LONG_BRANCH_LUi2Op_64
1305 || Opcode == Mips::LONG_BRANCH_ADDiu
1306 || Opcode == Mips::LONG_BRANCH_ADDiu2Op
1307 || Opcode == Mips::LONG_BRANCH_DADDiu
1308 || Opcode == Mips::LONG_BRANCH_DADDiu2Op);
This file contains the simple types necessary to represent the attributes associated with functions a...
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
#define LLVM_EXTERNAL_VISIBILITY
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
This file declares the MachineConstantPool class which is an abstract constant pool to keep track of ...
unsigned const TargetRegisterInfo * TRI
cl::opt< bool > EmitJalrReloc
static void emitDirectiveRelocJalr(const MachineInstr &MI, MCContext &OutContext, TargetMachine &TM, MCStreamer &OutStreamer, const MipsSubtarget &Subtarget)
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsAsmPrinter()
cl::opt< bool > EmitJalrReloc
static GCMetadataPrinterRegistry::Add< OcamlGCMetadataPrinter > Y("ocaml", "ocaml 3.10-compatible collector")
const char LLVMTargetMachineRef TM
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file defines the SmallString class.
static bool contains(SmallPtrSetImpl< ConstantExpr * > &Cache, ConstantExpr *Expr, Constant *C)
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)
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.
const MCAsmInfo * MAI
Target Asm Printer information.
MachineFunction * MF
The current machine function.
virtual void emitMachineConstantPoolValue(MachineConstantPoolValue *MCPV)
void recordSled(MCSymbol *Sled, const MachineInstr &MI, SledKind Kind, uint8_t Version=0)
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.
void emitAlignment(Align Alignment, const GlobalObject *GV=nullptr, unsigned MaxBytesToEmit=0) const
Emit an alignment directive to the specified power of two boundary.
MCContext & OutContext
This is the context for the output file that we are streaming.
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.
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.
const MCSubtargetInfo & getSubtargetInfo() const
Return information about subtarget.
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.
LLVM Basic Block Representation.
bool isLittleEndian() const
Layout endianness...
StringRef getPrivateGlobalPrefix() const
bool hasFnAttribute(Attribute::AttrKind Kind) const
Return true if the function has the attribute.
static const MCBinaryExpr * createSub(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
Context object for machine code objects.
const MCObjectFileInfo * getObjectFileInfo() const
MCSymbol * createTempSymbol()
Create a temporary symbol with a unique name.
MCSectionELF * getELFSection(const Twine &Section, unsigned Type, unsigned Flags)
MCSymbol * getOrCreateSymbol(const Twine &Name)
Lookup the symbol inside with the specified 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)
bool isPositionIndependent() const
MCSection * getTextSection() const
Instances of this class represent operands of the MCInst class.
static MCOperand createReg(unsigned Reg)
static MCOperand createExpr(const MCExpr *Val)
MCRegister getRARegister() const
This method should return the register where the return address can be found.
This represents a section on linux, lots of unix variants and some bare metal systems.
Streaming machine code generation interface.
virtual std::optional< std::pair< bool, std::string > > emitRelocDirective(const MCExpr &Offset, StringRef Name, const MCExpr *Expr, SMLoc Loc, const MCSubtargetInfo &STI)
Record a relocation described by the .reloc directive.
virtual void emitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc())
Emit a label for Symbol into the current section.
Generic base class for all target subtargets.
Represent a reference to a symbol from inside an expression.
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx)
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
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.
bool isEHPad() const
Returns true if the block is a landing pad.
MCSymbol * getSymbol() const
Return the MCSymbol for this basic block.
const BasicBlock * getBasicBlock() const
Return the LLVM basic block that this instance corresponded to originally.
std::vector< MachineBasicBlock * >::const_iterator const_pred_iterator
bool hasAddressTaken() const
Test whether this block is used as something other than the target of a terminator,...
void setAlignment(Align A)
Set alignment of the basic block.
pred_iterator pred_begin()
bool isLayoutSuccessor(const MachineBasicBlock *MBB) const
Return true if the specified MBB will be emitted immediately after this block, such that if this bloc...
This class is a data container for one entry in a MachineConstantPool.
bool isMachineConstantPoolEntry() const
isMachineConstantPoolEntry - Return true if the MachineConstantPoolEntry is indeed a target specific ...
MachineConstantPoolValue * MachineCPVal
const Constant * ConstVal
union llvm::MachineConstantPoolEntry::@195 Val
The constant itself.
const std::vector< MachineConstantPoolEntry > & getConstants() const
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted.
uint64_t getStackSize() const
Return the number of bytes that must be allocated to hold all of the fixed size frame objects.
const std::vector< CalleeSavedInfo > & getCalleeSavedInfo() const
Returns a reference to call saved info vector for the current function.
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
MachineFrameInfo & getFrameInfo()
getFrameInfo - Return the frame info object for the current function.
MCContext & getContext() const
const DataLayout & getDataLayout() const
Return the DataLayout attached to the Module associated to this MF.
Align getAlignment() const
getAlignment - Return the alignment of the function.
Function & getFunction()
Return the LLVM function that this machine code represents.
Ty * getInfo()
getInfo - Keep track of various per-function pieces of information for backends that would like to do...
MachineConstantPool * getConstantPool()
getConstantPool - Return the constant pool object for the current function.
const MachineJumpTableInfo * getJumpTableInfo() const
getJumpTableInfo - Return the jump table info object for the current function.
Representation of each machine instruction.
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.
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)
const char * getCurrentABIString() const
Emit Set directives.
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 printMemOperand(const MachineInstr *MI, int opNum, raw_ostream &O)
void LowerPATCHABLE_TAIL_CALL(const MachineInstr &MI)
void printFCCOperand(const MachineInstr *MI, int opNum, raw_ostream &O, const char *Modifier=nullptr)
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 isBlockOnlyReachableByFallthrough(const MachineBasicBlock *MBB) const override
isBlockOnlyReachableByFallthough - Return true if the basic block has exactly one predecessor and the...
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 printMemOperandEA(const MachineInstr *MI, int opNum, raw_ostream &O)
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.
MipsFunctionInfo - This class is derived from MachineFunction private Mips target-specific informatio...
std::map< const char *, const Mips16HardFloatInfo::FuncSignature * > StubsNeeded
static const char * getRegisterName(MCRegister Reg)
void Lower(const MachineInstr *MI, MCInst &OutMI) const
MCOperand LowerOperand(const MachineOperand &MO, int64_t offset=0) const
void Initialize(MCContext *C)
bool inMicroMipsMode() const
bool useSoftFloat() const
bool inMips16Mode() const
bool isTargetNaCl() 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 emitFrame(unsigned StackReg, unsigned StackSize, unsigned ReturnReg)
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.
Wrapper class representing virtual and physical registers.
Represents a location in source code.
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
StringRef - Represent a constant reference to a string, i.e.
std::string lower() const
Primary interface to the complete machine description for the target machine.
const Triple & getTargetTriple() const
StringRef getTargetFeatureString() const
StringRef getTargetCPU() const
const Target & getTarget() const
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.
virtual const TargetRegisterInfo * getRegisterInfo() const
getRegisterInfo - If register information is available, return it.
Target - Wrapper for Target specific information.
MCSubtargetInfo * createMCSubtargetInfo(StringRef TheTriple, StringRef CPU, StringRef Features) const
createMCSubtargetInfo - Create a MCSubtargetInfo implementation.
Triple - Helper class for working with autoconf configuration names.
const std::string & str() const
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
static Twine utohexstr(const uint64_t &Val)
LLVM Value Representation.
Iterator for intrusive lists based on ilist_node.
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.
StringRef selectMipsCPU(const Triple &TT, StringRef CPU)
Select the Mips CPU for the given triple and cpu name.
@ MO_GOT_CALL
MO_GOT_CALL - Represents the offset into the global offset table at which the address of a call site ...
@ MO_TPREL_HI
MO_TPREL_HI/LO - Represents the hi and low part of the offset from.
@ MO_GOT
MO_GOT - Represents the offset into the global offset table at which the address the relocation entry...
@ MO_JALR
Helper operand used to generate R_MIPS_JALR.
@ MO_GOTTPREL
MO_GOTTPREL - Represents the offset from the thread pointer (Initial.
@ MO_ABS_HI
MO_ABS_HI/LO - Represents the hi or low part of an absolute symbol address.
@ MO_TLSGD
MO_TLSGD - Represents the offset into the global offset table at which.
@ MO_GPREL
MO_GPREL - Represents the offset from the current gp value to be used for the relocatable object file...
@ MO_HIGHER
MO_HIGHER/HIGHEST - Represents the highest or higher half word of a 64-bit symbol address.
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.
Target & getTheMips64Target()
constexpr bool isPowerOf2_64(uint64_t Value)
Return true if the argument is a power of two > 0 (64 bit edition.)
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
Target & getTheMips64elTarget()
static const Align MIPS_NACL_BUNDLE_ALIGN
Target & getTheMipselTarget()
Target & getTheMipsTarget()
@ MCSA_Global
.type _foo, @gnu_unique_object
@ MCSA_ELF_TypeFunction
.type _foo, STT_FUNC # aka @function
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,...