15 #define DEBUG_TYPE "asm-printer"
40 if (AArch64::FPR8RegClass.contains(*AR)) {
56 char Prefix = &RegClass == &AArch64::GPR32RegClass ?
'w' :
'x';
61 }
else if (MO.
isReg()) {
62 if (MO.
getReg() == AArch64::XSP || MO.
getReg() == AArch64::WSP) {
63 O << (Prefix ==
'x' ?
"sp" :
"wsp");
79 bool PrintImmediatePrefix,
94 if (GV->isThreadLocal()) {
103 Modifier =
"gottprel";
127 if (PrintImmediatePrefix)
133 if (Modifier ==
"" && Suffix ==
"")
135 else if (Modifier ==
"" && Suffix !=
"")
136 O <<
":" << Suffix <<
':' <<
Name;
137 else if (Modifier !=
"" && Suffix ==
"")
138 O <<
":" << Modifier <<
':' <<
Name;
140 O <<
":" << Modifier <<
'_' << Suffix <<
':' <<
Name;
153 switch(ExtraCode[0]) {
162 AArch64::GPR32RegClass, O))
169 AArch64::GPR64RegClass, O))
251 const char *ExtraCode,
257 assert(MO.
isReg() &&
"unexpected inline assembly memory operand");
262 #include "AArch64GenMCPseudoLowering.inc"
283 if (!Stubs.empty()) {
287 for (
unsigned i = 0, e = Stubs.size(); i != e; ++i) {
const GlobalValue * getGlobal() const
MCSymbol * getSymbol(const GlobalValue *GV) const
Reloc::Model getRelocationModel() const
const ConstantFP * getFPImm() const
The main container class for the LLVM Intermediate Representation.
void LowerAArch64MachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI, AArch64AsmPrinter &AP)
unsigned getPointerSize(unsigned AS=0) const
const MachineFunction * MF
The current machine function.
bool GVIsIndirectSymbol(const GlobalValue *GV, Reloc::Model RelocM) const
virtual void EmitInstruction(const MCInst &Inst)=0
const char * getSymbolName() const
std::vector< std::pair< MCSymbol *, StubValueTy > > SymbolListTy
bool printSymbolicAddress(const MachineOperand &MO, bool PrintImmediatePrefix, StringRef Suffix, raw_ostream &O)
static bool printModifiedGPRAsmOperand(const MachineOperand &MO, const TargetRegisterInfo *TRI, const TargetRegisterClass &RegClass, raw_ostream &O)
bool isImm() const
isImm - Tests if this is a MO_Immediate operand.
#define llvm_unreachable(msg)
void LLVMInitializeAArch64AsmPrinter()
bool isReg() const
isReg - Tests if this is a MO_Register operand.
virtual bool runOnMachineFunction(MachineFunction &MF)
void SwitchSection(const MCSection *Section, const MCExpr *Subsection=0)
void EmitInstruction(const MachineInstr *MI)
EmitInstruction - Targets should implement this to emit instructions.
Address of indexed Constant in Constant Pool.
MachineModuleInfo * MMI
MMI - This is a pointer to the current MachineModuleInfo.
SymbolListTy GetGVStubList() const
Accessor methods to return the set of stubs in sorted order.
virtual bool runOnMachineFunction(MachineFunction &MF)
const MachineOperand & getOperand(unsigned i) const
virtual bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode, raw_ostream &OS)
bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNum, unsigned AsmVariant, const char *ExtraCode, raw_ostream &O)
static bool printModifiedFPRAsmOperand(const MachineOperand &MO, const TargetRegisterInfo *TRI, char RegType, raw_ostream &O)
Floating-point immediate operand.
bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNum, unsigned AsmVariant, const char *ExtraCode, raw_ostream &O)
virtual void EmitLabel(MCSymbol *Symbol)
static const char * getRegisterName(unsigned RegNo)
MachineOperandType getType() const
std::string getName(ID id, ArrayRef< Type * > Tys=None)
virtual const DataLayout * getDataLayout() const
MCSymbol * GetBlockAddressSymbol(const BlockAddress *BA) const
const TargetMachine & getTarget() const
virtual const TargetRegisterInfo * getRegisterInfo() const
MCSymbol * GetCPISymbol(unsigned CPID) const
GetCPISymbol - Return the symbol for the specified constant pool entry.
TLSModel::Model getTLSModel(const GlobalValue *GV) const
bool isExactlyValue(const APFloat &V) const
unsigned getReg() const
getReg - Returns the register number.
const TargetLoweringObjectFile & getObjFileLowering() const
getObjFileLowering - Return information about object file lowering.
uint16_t getEncodingValue(unsigned RegNo) const
Returns the encoding for RegNo.
Address of a basic block.
void EmitEndOfAsmFile(Module &M)
void EmitSymbolValue(const MCSymbol *Sym, unsigned Size)
const BlockAddress * getBlockAddress() const
const MCSection * getDataRelSection() const
static RegisterPass< NVPTXAllocaHoisting > X("alloca-hoisting","Hoisting alloca instructions in non-entry ""blocks to the entry block")
INITIALIZE_PASS(GlobalMerge,"global-merge","Global Merge", false, false) bool GlobalMerge const DataLayout * TD
Address of a global value.
Name of external global symbol.
bool contains(unsigned Reg) const