#include "X86AsmPrinter.h"
#include "MCTargetDesc/X86ATTInstPrinter.h"
#include "MCTargetDesc/X86BaseInfo.h"
#include "MCTargetDesc/X86MCTargetDesc.h"
#include "MCTargetDesc/X86TargetStreamer.h"
#include "TargetInfo/X86TargetInfo.h"
#include "X86InstrInfo.h"
#include "X86MachineFunctionInfo.h"
#include "X86Subtarget.h"
#include "llvm/BinaryFormat/COFF.h"
#include "llvm/BinaryFormat/ELF.h"
#include "llvm/CodeGen/MachineConstantPool.h"
#include "llvm/CodeGen/MachineModuleInfoImpls.h"
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
#include "llvm/CodeGenTypes/MachineValueType.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/InstIterator.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/MCInst.h"
#include "llvm/MC/MCInstBuilder.h"
#include "llvm/MC/MCSectionCOFF.h"
#include "llvm/MC/MCSectionELF.h"
#include "llvm/MC/MCSectionMachO.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Target/TargetMachine.h"
usingnamespacellvm;
X86AsmPrinter::X86AsmPrinter(TargetMachine &TM,
std::unique_ptr<MCStreamer> Streamer)
: … { … }
bool X86AsmPrinter::runOnMachineFunction(MachineFunction &MF) { … }
void X86AsmPrinter::emitFunctionBodyStart() { … }
void X86AsmPrinter::emitFunctionBodyEnd() { … }
uint32_t X86AsmPrinter::MaskKCFIType(uint32_t Value) { … }
void X86AsmPrinter::EmitKCFITypePadding(const MachineFunction &MF,
bool HasType) { … }
void X86AsmPrinter::emitKCFITypeId(const MachineFunction &MF) { … }
void X86AsmPrinter::PrintSymbolOperand(const MachineOperand &MO,
raw_ostream &O) { … }
void X86AsmPrinter::PrintOperand(const MachineInstr *MI, unsigned OpNo,
raw_ostream &O) { … }
void X86AsmPrinter::PrintModifiedOperand(const MachineInstr *MI, unsigned OpNo,
raw_ostream &O, const char *Modifier) { … }
void X86AsmPrinter::PrintPCRelImm(const MachineInstr *MI, unsigned OpNo,
raw_ostream &O) { … }
void X86AsmPrinter::PrintLeaMemReference(const MachineInstr *MI, unsigned OpNo,
raw_ostream &O, const char *Modifier) { … }
static bool isSimpleReturn(const MachineInstr &MI) { … }
static bool isIndirectBranchOrTailCall(const MachineInstr &MI) { … }
void X86AsmPrinter::emitBasicBlockEnd(const MachineBasicBlock &MBB) { … }
void X86AsmPrinter::PrintMemReference(const MachineInstr *MI, unsigned OpNo,
raw_ostream &O, const char *Modifier) { … }
void X86AsmPrinter::PrintIntelMemReference(const MachineInstr *MI,
unsigned OpNo, raw_ostream &O,
const char *Modifier) { … }
const MCSubtargetInfo *X86AsmPrinter::getIFuncMCSubtargetInfo() const { … }
void X86AsmPrinter::emitMachOIFuncStubBody(Module &M, const GlobalIFunc &GI,
MCSymbol *LazyPointer) { … }
void X86AsmPrinter::emitMachOIFuncStubHelperBody(Module &M,
const GlobalIFunc &GI,
MCSymbol *LazyPointer) { … }
static bool printAsmMRegister(const X86AsmPrinter &P, const MachineOperand &MO,
char Mode, raw_ostream &O) { … }
static bool printAsmVRegister(const MachineOperand &MO, char Mode,
raw_ostream &O) { … }
bool X86AsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
const char *ExtraCode, raw_ostream &O) { … }
bool X86AsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
const char *ExtraCode,
raw_ostream &O) { … }
void X86AsmPrinter::emitStartOfAsmFile(Module &M) { … }
static void
emitNonLazySymbolPointer(MCStreamer &OutStreamer, MCSymbol *StubLabel,
MachineModuleInfoImpl::StubValueTy &MCSym) { … }
static void emitNonLazyStubs(MachineModuleInfo *MMI, MCStreamer &OutStreamer) { … }
static bool usesMSVCFloatingPoint(const Triple &TT, const Module &M) { … }
void X86AsmPrinter::emitEndOfAsmFile(Module &M) { … }
extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeX86AsmPrinter() { … }