10 #ifndef LLVM_LIB_TARGET_X86_X86ASMPRINTER_H
11 #define LLVM_LIB_TARGET_X86_X86ASMPRINTER_H
41 class StackMapShadowTracker {
44 ~StackMapShadowTracker();
49 void reset(
unsigned RequiredSize) {
50 RequiredShadowSize = RequiredSize;
51 CurrentShadowSize = 0;
61 std::unique_ptr<MCCodeEmitter> CodeEmitter;
69 unsigned RequiredShadowSize, CurrentShadowSize;
72 StackMapShadowTracker SMShadowTracker;
80 void EmitAndCountInstruction(
MCInst &Inst);
84 void LowerPATCHPOINT(
const MachineInstr &MI, X86MCInstLower &MCIL);
85 void LowerSTATEPOINT(
const MachineInstr &MI, X86MCInstLower &MCIL);
86 void LowerFAULTING_LOAD_OP(
const MachineInstr &MI, X86MCInstLower &MCIL);
88 void LowerTlsAddr(X86MCInstLower &MCInstLowering,
const MachineInstr &MI);
92 std::unique_ptr<MCStreamer> Streamer)
93 :
AsmPrinter(TM, std::move(Streamer)), SM(*this), FM(*this),
94 SMShadowTracker(TM) {}
97 return "X86 Assembly / Object Emitter";
102 void EmitStartOfAsmFile(
Module &M)
override;
104 void EmitEndOfAsmFile(
Module &M)
override;
109 SMShadowTracker.emitShadowPadding(*OutStreamer, getSubtargetInfo());
112 bool PrintAsmOperand(
const MachineInstr *MI,
unsigned OpNo,
113 unsigned AsmVariant,
const char *ExtraCode,
115 bool PrintAsmMemoryOperand(
const MachineInstr *MI,
unsigned OpNo,
116 unsigned AsmVariant,
const char *ExtraCode,
120 MCSymbol *GetCPISymbol(
unsigned CPID)
const override;
123 SMShadowTracker.reset(0);
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
A Module instance is used to store all the information related to an LLVM module. ...
bool doInitialization(Module &M) override
Set up the AsmPrinter when we are working on a new module.
const char * getPassName() const override
getPassName - Return a nice clean name for a pass.
Instances of this class represent a single low-level machine instruction.
Streaming machine code generation interface.
This class is intended to be used as a driving class for all asm writers.
#define LLVM_LIBRARY_VISIBILITY
LLVM_LIBRARY_VISIBILITY - If a class marked with this attribute is linked into a shared library...
X86AsmPrinter(TargetMachine &TM, std::unique_ptr< MCStreamer > Streamer)
const X86Subtarget & getSubtarget() const
Representation of each machine instruction.
bool doInitialization(Module &M) override
Set up the AsmPrinter when we are working on a new module.
void EmitBasicBlockEnd(const MachineBasicBlock &MBB) override
Targets can override this to emit stuff at the end of a basic block.
MCSubtargetInfo - Generic base class for all target subtargets.
This class implements an extremely fast bulk output stream that can only output to a stream...
Primary interface to the complete machine description for the target machine.