1 //===-- SystemZAsmPrinter.h - SystemZ LLVM assembly printer ----*- C++ -*--===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef SYSTEMZASMPRINTER_H
11 #define SYSTEMZASMPRINTER_H
13 #include "SystemZTargetMachine.h"
14 #include "llvm/CodeGen/AsmPrinter.h"
15 #include "llvm/Support/Compiler.h"
19 class MachineBasicBlock;
24 class LLVM_LIBRARY_VISIBILITY SystemZAsmPrinter : public AsmPrinter {
26 const SystemZSubtarget *Subtarget;
29 SystemZAsmPrinter(TargetMachine &TM, MCStreamer &Streamer)
30 : AsmPrinter(TM, Streamer) {
31 Subtarget = &TM.getSubtarget<SystemZSubtarget>();
34 // Override AsmPrinter.
35 virtual const char *getPassName() const LLVM_OVERRIDE {
36 return "SystemZ Assembly Printer";
38 virtual void EmitInstruction(const MachineInstr *MI) LLVM_OVERRIDE;
39 virtual void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV)
41 virtual bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
42 unsigned AsmVariant, const char *ExtraCode,
43 raw_ostream &OS) LLVM_OVERRIDE;
44 virtual bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
46 const char *ExtraCode,
47 raw_ostream &OS) LLVM_OVERRIDE;
48 virtual void EmitEndOfAsmFile(Module &M) LLVM_OVERRIDE;
50 } // end namespace llvm