xref: /aosp_15_r20/external/llvm/lib/Target/SystemZ/SystemZAsmPrinter.h (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker //===-- SystemZAsmPrinter.h - SystemZ LLVM assembly printer ----*- C++ -*--===//
2*9880d681SAndroid Build Coastguard Worker //
3*9880d681SAndroid Build Coastguard Worker //                     The LLVM Compiler Infrastructure
4*9880d681SAndroid Build Coastguard Worker //
5*9880d681SAndroid Build Coastguard Worker // This file is distributed under the University of Illinois Open Source
6*9880d681SAndroid Build Coastguard Worker // License. See LICENSE.TXT for details.
7*9880d681SAndroid Build Coastguard Worker //
8*9880d681SAndroid Build Coastguard Worker //===----------------------------------------------------------------------===//
9*9880d681SAndroid Build Coastguard Worker 
10*9880d681SAndroid Build Coastguard Worker #ifndef LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZASMPRINTER_H
11*9880d681SAndroid Build Coastguard Worker #define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZASMPRINTER_H
12*9880d681SAndroid Build Coastguard Worker 
13*9880d681SAndroid Build Coastguard Worker #include "SystemZTargetMachine.h"
14*9880d681SAndroid Build Coastguard Worker #include "llvm/CodeGen/AsmPrinter.h"
15*9880d681SAndroid Build Coastguard Worker #include "llvm/Support/Compiler.h"
16*9880d681SAndroid Build Coastguard Worker 
17*9880d681SAndroid Build Coastguard Worker namespace llvm {
18*9880d681SAndroid Build Coastguard Worker class MCStreamer;
19*9880d681SAndroid Build Coastguard Worker class MachineBasicBlock;
20*9880d681SAndroid Build Coastguard Worker class MachineInstr;
21*9880d681SAndroid Build Coastguard Worker class Module;
22*9880d681SAndroid Build Coastguard Worker class raw_ostream;
23*9880d681SAndroid Build Coastguard Worker 
24*9880d681SAndroid Build Coastguard Worker class LLVM_LIBRARY_VISIBILITY SystemZAsmPrinter : public AsmPrinter {
25*9880d681SAndroid Build Coastguard Worker public:
SystemZAsmPrinter(TargetMachine & TM,std::unique_ptr<MCStreamer> Streamer)26*9880d681SAndroid Build Coastguard Worker   SystemZAsmPrinter(TargetMachine &TM, std::unique_ptr<MCStreamer> Streamer)
27*9880d681SAndroid Build Coastguard Worker       : AsmPrinter(TM, std::move(Streamer)) {}
28*9880d681SAndroid Build Coastguard Worker 
29*9880d681SAndroid Build Coastguard Worker   // Override AsmPrinter.
getPassName()30*9880d681SAndroid Build Coastguard Worker   const char *getPassName() const override {
31*9880d681SAndroid Build Coastguard Worker     return "SystemZ Assembly Printer";
32*9880d681SAndroid Build Coastguard Worker   }
33*9880d681SAndroid Build Coastguard Worker   void EmitInstruction(const MachineInstr *MI) override;
34*9880d681SAndroid Build Coastguard Worker   void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV) override;
35*9880d681SAndroid Build Coastguard Worker   bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
36*9880d681SAndroid Build Coastguard Worker                        unsigned AsmVariant, const char *ExtraCode,
37*9880d681SAndroid Build Coastguard Worker                        raw_ostream &OS) override;
38*9880d681SAndroid Build Coastguard Worker   bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
39*9880d681SAndroid Build Coastguard Worker                              unsigned AsmVariant, const char *ExtraCode,
40*9880d681SAndroid Build Coastguard Worker                              raw_ostream &OS) override;
41*9880d681SAndroid Build Coastguard Worker };
42*9880d681SAndroid Build Coastguard Worker } // end namespace llvm
43*9880d681SAndroid Build Coastguard Worker 
44*9880d681SAndroid Build Coastguard Worker #endif
45