LLVM  6.0.0svn
Functions
X86AsmPrinter.cpp File Reference
#include "X86AsmPrinter.h"
#include "InstPrinter/X86ATTInstPrinter.h"
#include "MCTargetDesc/X86BaseInfo.h"
#include "MCTargetDesc/X86TargetStreamer.h"
#include "X86InstrInfo.h"
#include "X86MachineFunctionInfo.h"
#include "llvm/BinaryFormat/COFF.h"
#include "llvm/CodeGen/MachineConstantPool.h"
#include "llvm/CodeGen/MachineModuleInfoImpls.h"
#include "llvm/CodeGen/MachineValueType.h"
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Mangler.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Type.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCCodeEmitter.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCSectionCOFF.h"
#include "llvm/MC/MCSectionMachO.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/TargetRegistry.h"
Include dependency graph for X86AsmPrinter.cpp:

Go to the source code of this file.

Functions

static void printSymbolOperand (X86AsmPrinter &P, const MachineOperand &MO, raw_ostream &O)
 printSymbolOperand - Print a raw symbol reference operand. More...
 
static void printOperand (X86AsmPrinter &P, const MachineInstr *MI, unsigned OpNo, raw_ostream &O, const char *Modifier=nullptr, unsigned AsmVariant=0)
 
static void printPCRelImm (X86AsmPrinter &P, const MachineInstr *MI, unsigned OpNo, raw_ostream &O)
 printPCRelImm - This is used to print an immediate value that ends up being encoded as a pc-relative value. More...
 
static void printLeaMemReference (X86AsmPrinter &P, const MachineInstr *MI, unsigned Op, raw_ostream &O, const char *Modifier=nullptr)
 
static void printMemReference (X86AsmPrinter &P, const MachineInstr *MI, unsigned Op, raw_ostream &O, const char *Modifier=nullptr)
 
static void printIntelMemReference (X86AsmPrinter &P, const MachineInstr *MI, unsigned Op, raw_ostream &O, const char *Modifier=nullptr, unsigned AsmVariant=1)
 
static bool printAsmMRegister (X86AsmPrinter &P, const MachineOperand &MO, char Mode, raw_ostream &O)
 
static void emitNonLazySymbolPointer (MCStreamer &OutStreamer, MCSymbol *StubLabel, MachineModuleInfoImpl::StubValueTy &MCSym)
 
void LLVMInitializeX86AsmPrinter ()
 

Function Documentation

◆ emitNonLazySymbolPointer()

static void emitNonLazySymbolPointer ( MCStreamer OutStreamer,
MCSymbol StubLabel,
MachineModuleInfoImpl::StubValueTy MCSym 
)
static

◆ LLVMInitializeX86AsmPrinter()

void LLVMInitializeX86AsmPrinter ( )

Definition at line 686 of file X86AsmPrinter.cpp.

References llvm::getTheX86_32Target(), llvm::getTheX86_64Target(), X, and Y.

◆ printAsmMRegister()

static bool printAsmMRegister ( X86AsmPrinter P,
const MachineOperand MO,
char  Mode,
raw_ostream O 
)
static

◆ printIntelMemReference()

static void printIntelMemReference ( X86AsmPrinter P,
const MachineInstr MI,
unsigned  Op,
raw_ostream O,
const char Modifier = nullptr,
unsigned  AsmVariant = 1 
)
static

◆ printLeaMemReference()

static void printLeaMemReference ( X86AsmPrinter P,
const MachineInstr MI,
unsigned  Op,
raw_ostream O,
const char Modifier = nullptr 
)
static

◆ printMemReference()

static void printMemReference ( X86AsmPrinter P,
const MachineInstr MI,
unsigned  Op,
raw_ostream O,
const char Modifier = nullptr 
)
static

◆ printOperand()

static void printOperand ( X86AsmPrinter P,
const MachineInstr MI,
unsigned  OpNo,
raw_ostream O,
const char Modifier = nullptr,
unsigned  AsmVariant = 0 
)
static

◆ printPCRelImm()

static void printPCRelImm ( X86AsmPrinter P,
const MachineInstr MI,
unsigned  OpNo,
raw_ostream O 
)
static

printPCRelImm - This is used to print an immediate value that ends up being encoded as a pc-relative value.

These print slightly differently, for example, a $ is not emitted.

Definition at line 205 of file X86AsmPrinter.cpp.

References llvm::MachineOperand::getImm(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getType(), llvm_unreachable, llvm::MachineOperand::MO_GlobalAddress, llvm::MachineOperand::MO_Immediate, llvm::MachineOperand::MO_Register, printOperand(), and printSymbolOperand().

Referenced by llvm::X86AsmPrinter::PrintAsmOperand().

◆ printSymbolOperand()

static void printSymbolOperand ( X86AsmPrinter P,
const MachineOperand MO,
raw_ostream O 
)
static

printSymbolOperand - Print a raw symbol reference operand.

This handles jump tables, constant pools, global address and external symbols, all of which print to a label with various suffixes for relocation types etc.

Definition at line 110 of file X86AsmPrinter.cpp.

References llvm::X86AsmPrinter::GetCPISymbol(), llvm::MachineOperand::getGlobal(), llvm::MachineOperand::getIndex(), llvm::MCSymbol::getName(), llvm::MachineModuleInfo::getObjFileInfo(), llvm::MachineOperand::getOffset(), llvm::MCContext::getOrCreateSymbol(), llvm::MachineFunction::getPICBaseSymbol(), llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::getPointer(), llvm::AsmPrinter::getSymbol(), llvm::AsmPrinter::getSymbolWithGlobalValueBase(), llvm::MachineOperand::getTargetFlags(), llvm::MachineOperand::getType(), llvm::GlobalValue::hasInternalLinkage(), llvm_unreachable, llvm::AsmPrinter::MAI, llvm::AsmPrinter::MF, MI, llvm::AsmPrinter::MMI, llvm::MachineOperand::MO_ConstantPoolIndex, llvm::X86II::MO_DARWIN_NONLAZY, llvm::X86II::MO_DARWIN_NONLAZY_PIC_BASE, llvm::X86II::MO_DLLIMPORT, llvm::X86II::MO_DTPOFF, llvm::MachineOperand::MO_GlobalAddress, llvm::X86II::MO_GOT, llvm::X86II::MO_GOT_ABSOLUTE_ADDRESS, llvm::X86II::MO_GOTNTPOFF, llvm::X86II::MO_GOTOFF, llvm::X86II::MO_GOTPCREL, llvm::X86II::MO_GOTTPOFF, llvm::X86II::MO_INDNTPOFF, llvm::X86II::MO_NO_FLAG, llvm::X86II::MO_NTPOFF, llvm::X86II::MO_PIC_BASE_OFFSET, llvm::X86II::MO_PLT, llvm::X86II::MO_SECREL, llvm::X86II::MO_TLSGD, llvm::X86II::MO_TLSLD, llvm::X86II::MO_TLSLDM, llvm::X86II::MO_TLVP, llvm::X86II::MO_TLVP_PIC_BASE, llvm::X86II::MO_TPOFF, llvm::RISCVFenceField::O, llvm::AsmPrinter::OutContext, P, llvm::Pass::print(), llvm::MCSymbol::print(), llvm::AsmPrinter::printOffset(), and printOperand().

Referenced by llvm::X86AsmPrinter::PrintAsmOperand(), printLeaMemReference(), printOperand(), and printPCRelImm().