class MachineJumpTableInfo;
class MCContext;
class MCInst;
-class MCOperand;
class MCStreamer;
class MCSymbol;
virtual const char *getPassName() const {
return "X86 AT&T-Style Assembly Printer";
}
+
+ const X86Subtarget &getSubtarget() const { return *Subtarget; }
void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
AsmPrinter::getAnalysisUsage(AU);
}
- bool doFinalization(Module &M);
-
- /// printInstruction - This method is automatically generated by tablegen
- /// from the instruction set description. This method returns true if the
- /// machine instruction was sufficiently described to print it, otherwise it
- /// returns false.
- void printInstruction(const MachineInstr *MI);
-
+
+ virtual void EmitEndOfAsmFile(Module &M);
+
void printInstructionThroughMCStreamer(const MachineInstr *MI);
-
- // New MCInst printing stuff.
- void printInstruction(const MCInst *MI);
- MCSymbol *GetPICBaseSymbol();
- MCOperand LowerJumpTableOperand(const MachineOperand &MO);
- MCOperand LowerGlobalAddressOperand(const MachineOperand &MO);
- MCOperand LowerExternalSymbolOperand(const MachineOperand &MO);
- virtual void printMCInst(const MCInst *MI) { printInstruction(MI); }
+ void printMCInst(const MCInst *MI);
void printSymbolOperand(const MachineOperand &MO);
- void printOperand(const MCInst *MI, unsigned OpNo,
- const char *Modifier = 0);
- void printMemReference(const MCInst *MI, unsigned Op);
- void printLeaMemReference(const MCInst *MI, unsigned Op);
- void printSSECC(const MCInst *MI, unsigned Op);
- void printPICLabel(const MCInst *MI, unsigned Op);
- void print_pcrel_imm(const MCInst *MI, unsigned OpNo);
-
- void printi8mem(const MCInst *MI, unsigned OpNo) {
- printMemReference(MI, OpNo);
- }
- void printi16mem(const MCInst *MI, unsigned OpNo) {
- printMemReference(MI, OpNo);
- }
- void printi32mem(const MCInst *MI, unsigned OpNo) {
- printMemReference(MI, OpNo);
- }
- void printi64mem(const MCInst *MI, unsigned OpNo) {
- printMemReference(MI, OpNo);
- }
- void printi128mem(const MCInst *MI, unsigned OpNo) {
- printMemReference(MI, OpNo);
- }
- void printf32mem(const MCInst *MI, unsigned OpNo) {
- printMemReference(MI, OpNo);
- }
- void printf64mem(const MCInst *MI, unsigned OpNo) {
- printMemReference(MI, OpNo);
- }
- void printf80mem(const MCInst *MI, unsigned OpNo) {
- printMemReference(MI, OpNo);
- }
- void printf128mem(const MCInst *MI, unsigned OpNo) {
- printMemReference(MI, OpNo);
- }
- void printlea32mem(const MCInst *MI, unsigned OpNo) {
- printLeaMemReference(MI, OpNo);
- }
- void printlea64mem(const MCInst *MI, unsigned OpNo) {
- printLeaMemReference(MI, OpNo);
- }
- void printlea64_32mem(const MCInst *MI, unsigned OpNo) {
- printLeaMemReference(MI, OpNo);
- }
void printOperand(const MachineInstr *MI, unsigned OpNo,
const char *Modifier = 0);
void print_pcrel_imm(const MachineInstr *MI, unsigned OpNo);
+
+ void printopaquemem(const MachineInstr *MI, unsigned OpNo) {
+ printMemReference(MI, OpNo);
+ }
+
void printi8mem(const MachineInstr *MI, unsigned OpNo) {
printMemReference(MI, OpNo);
}
void emitFunctionHeader(const MachineFunction &MF);
- // Necessary for Darwin to print out the apprioriate types of linker stubs
- StringMap<std::string> FnStubs, GVStubs, HiddenGVStubs;
-
- // Necessary for dllexport support
- StringSet<> CygMingStubs, DLLExportedFns, DLLExportedGVs;
-
- // We have to propagate some information about MachineFunction to
- // AsmPrinter. It's ok, when we're printing the function, since we have
- // access to MachineFunction and can get the appropriate MachineFunctionInfo.
- // Unfortunately, this is not possible when we're printing reference to
- // Function (e.g. calling it and so on). Even more, there is no way to get the
- // corresponding MachineFunctions: it can even be not created at all. That's
- // why we should use additional structure, when we're collecting all necessary
- // information.
- //
- // This structure is using e.g. for name decoration for stdcall & fastcall'ed
- // function, since we have to use arguments' size for decoration.
- typedef std::map<const Function*, X86MachineFunctionInfo> FMFInfoMap;
- FMFInfoMap FunctionInfoMap;
-
- void DecorateCygMingName(std::string &Name, const GlobalValue *GV);
};
} // end namespace llvm