1 //===-- SystemZAsmPrinter.h - SystemZ LLVM assembly printer ----*- C++ -*--===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZASMPRINTER_H
10 #define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZASMPRINTER_H
12 #include "SystemZTargetMachine.h"
13 #include "SystemZMCInstLower.h"
14 #include "llvm/CodeGen/AsmPrinter.h"
15 #include "llvm/CodeGen/StackMaps.h"
16 #include "llvm/Support/Compiler.h"
20 class MachineBasicBlock;
25 class LLVM_LIBRARY_VISIBILITY SystemZAsmPrinter : public AsmPrinter {
30 SystemZAsmPrinter(TargetMachine &TM, std::unique_ptr<MCStreamer> Streamer)
31 : AsmPrinter(TM, std::move(Streamer)), SM(*this) {}
33 // Override AsmPrinter.
34 StringRef getPassName() const override { return "SystemZ Assembly Printer"; }
35 void EmitInstruction(const MachineInstr *MI) override;
36 void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV) override;
37 void EmitEndOfAsmFile(Module &M) override;
38 bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
39 const char *ExtraCode, raw_ostream &OS) override;
40 bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
41 const char *ExtraCode, raw_ostream &OS) override;
43 bool doInitialization(Module &M) override {
45 return AsmPrinter::doInitialization(M);
49 void LowerFENTRY_CALL(const MachineInstr &MI, SystemZMCInstLower &MCIL);
50 void LowerSTACKMAP(const MachineInstr &MI);
51 void LowerPATCHPOINT(const MachineInstr &MI, SystemZMCInstLower &Lower);
53 } // end namespace llvm