51 Suffix =
"$non_lazy_ptr";
56 unsigned PrefixLen = Name.
size();
59 assert(MO.
isSymbol() &&
"Isn't a symbol reference");
66 unsigned OrigLen = Name.
size() - PrefixLen;
103 assert(MO.
isGlobal() &&
"Extern symbol not handled yet");
186 assert(!MO.
getSubReg() &&
"Subregs should be eliminated!");
187 assert(MO.
getReg() > PPC::NoRegister &&
188 MO.
getReg() < PPC::NUM_TARGET_REGS &&
189 "Invalid register for this target!");
PointerIntPair< MCSymbol *, 1, bool > StubValueTy
StubValueTy & getHiddenGVStubEntry(MCSymbol *Sym)
const MachineFunction * getParent() const
getParent - Return the MachineFunction containing this basic block.
A parsed version of the target data layout string in and methods for querying it. ...
MachineInstr * getParent()
getParent - Return the instruction that this operand belongs to.
const GlobalValue * getGlobal() const
void getNameWithPrefix(SmallVectorImpl< char > &Name, const GlobalValue *GV, Mangler &Mang, bool MayAlwaysUsePrivate=false) const
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx)
MCSymbol * getSymbol(const GlobalValue *GV) const
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 MachineModuleInfoMachO & getMachOMMI(AsmPrinter &AP)
static MCOperand createExpr(const MCExpr *Val)
MO_LO, MO_HA - lo16(symbol) and ha16(symbol)
Address of indexed Jump Table for switch.
const char * getPrivateGlobalPrefix() const
StringRef substr(size_t Start, size_t N=npos) const
Return a reference to the substring from [Start, Start + N).
MachineBasicBlock reference.
const char * getSymbolName() const
print alias Alias Set Printer
Mask of preserved registers.
const Triple & getTargetTriple() const
bool isJTI() const
isJTI - Tests if this is a MO_JumpTableIndex operand.
MO_PLT_OR_STUB - On a symbol operand "FOO", this indicates that the reference is actually to the "FOO...
static MCOperand createReg(unsigned Reg)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
bool hasInternalLinkage() const
Base class for the full range of assembler expressions which are needed for parsing.
Name of external global symbol.
MCSymbol * GetJTISymbol(unsigned JTID, bool isLinkerPrivate=false) const
Return the symbol for the specified jump table entry.
unsigned getNumOperands() const
Access to explicit operands of the instruction.
bool isGlobal() const
isGlobal - Tests if this is a MO_GlobalAddress operand.
Context object for machine code objects.
Mangler * Mang
Name-mangler for global names.
static const MCBinaryExpr * createSub(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
MO_NLP_HIDDEN_FLAG - If this bit is set, the symbol reference is to a symbol with hidden visibility...
static const MCBinaryExpr * createAdd(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
MachineModuleInfo * MMI
This is a pointer to the current MachineModuleInfo.
Instances of this class represent a single low-level machine instruction.
unsigned getOpcode() const
Returns the opcode of this MachineInstr.
const MachineBasicBlock * getParent() const
Address of a global value.
unsigned getTargetFlags() const
PointerIntPair - This class implements a pair of a pointer and small integer.
MO_NLP_FLAG - If this bit is set, the symbol reference is actually to the non_lazy_ptr for the global...
const MachineOperand & getOperand(unsigned i) const
TargetMachine & TM
Target machine description.
This class is intended to be used as a driving class for all asm writers.
bool isSymbol() const
isSymbol - Tests if this is a MO_ExternalSymbol operand.
Address of a basic block.
int64_t getOffset() const
Return the offset from the symbol in this operand.
Ty & getObjFileInfo()
getInfo - Keep track of various per-function pieces of information for backends that would like to do...
static const PPCMCExpr * createLo(const MCExpr *Expr, bool isDarwin, MCContext &Ctx)
unsigned getSubReg() const
MCSymbol * getSymbol() const
getSymbol - Return the MCSymbol for this basic block.
StubValueTy & getGVStubEntry(MCSymbol *Sym)
The next are not flags but distinct values.
bool isOSDarwin() const
isOSDarwin - Is this a "Darwin" OS (OS X or iOS).
PointerTy getPointer() const
void setOpcode(unsigned Op)
static MCOperand GetSymbolRef(const MachineOperand &MO, const MCSymbol *Symbol, AsmPrinter &Printer, bool isDarwin)
MCSymbol * getPICBaseSymbol() const
getPICBaseSymbol - Return a function-local symbol to represent the PIC base.
const DataLayout * getDataLayout() const
Deprecated in 3.7, will be removed in 3.8.
MachineOperand class - Representation of each machine instruction operand.
These values identify relocations on immediates folded into memory operations.
StubValueTy & getFnStubEntry(MCSymbol *Sym)
Representation of each machine instruction.
MachineOperandType getType() const
getType - Returns the MachineOperandType for this operand.
MCSymbol * getOrCreateSymbol(const Twine &Name)
Lookup the symbol inside with the specified Name.
void getNameWithPrefix(raw_ostream &OS, const GlobalValue *GV, bool CannotUsePrivateLabel) const
Print the appropriate prefix and the specified global variable's name.
MCSymbol * GetBlockAddressSymbol(const BlockAddress *BA) const
Return the MCSymbol used to satisfy BlockAddress uses of the specified basic block.
MachineModuleInfoMachO - This is a MachineModuleInfoImpl implementation for MachO targets...
virtual MCSymbol * GetCPISymbol(unsigned CPID) const
Return the symbol for the specified constant pool entry.
unsigned getReg() const
getReg - Returns the register number.
static const PPCMCExpr * createHa(const MCExpr *Expr, bool isDarwin, MCContext &Ctx)
Primary interface to the complete machine description for the target machine.
void LowerPPCMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI, AsmPrinter &AP, bool isDarwin)
std::error_code access(const Twine &Path, AccessMode Mode)
Can the file be accessed?
void addOperand(const MCOperand &Op)
StringRef - Represent a constant reference to a string, i.e.
const BlockAddress * getBlockAddress() const
Address of indexed Constant in Constant Pool.
static MCSymbol * GetSymbolFromOperand(const MachineOperand &MO, AsmPrinter &AP)
Instances of this class represent operands of the MCInst class.
static MCOperand createImm(int64_t Val)
static const MCConstantExpr * create(int64_t Value, MCContext &Ctx)
MO_PIC_FLAG - If this bit is set, the symbol reference is relative to the function's picbase...
This file describes how to lower LLVM code to machine code.
bool empty() const
empty - Check if the string is empty.