xref: /llvm-project/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZGNUInstPrinter.cpp (revision facdae62b7be4fe177c8a130c68aef0305dc6eb3)
16512a8ddStltao //===- SystemZGNUInstPrinter.cpp - Convert SystemZ MCInst to GNU assembly -===//
26512a8ddStltao //
36512a8ddStltao // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
46512a8ddStltao // See https://llvm.org/LICENSE.txt for license information.
56512a8ddStltao // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66512a8ddStltao //
76512a8ddStltao //===----------------------------------------------------------------------===//
86512a8ddStltao 
96512a8ddStltao #include "SystemZGNUInstPrinter.h"
106512a8ddStltao #include "llvm/MC/MCInst.h"
116512a8ddStltao #include "llvm/MC/MCRegister.h"
126512a8ddStltao #include "llvm/Support/raw_ostream.h"
136512a8ddStltao 
146512a8ddStltao using namespace llvm;
156512a8ddStltao 
166512a8ddStltao #define DEBUG_TYPE "asm-printer"
176512a8ddStltao 
186512a8ddStltao #include "SystemZGenGNUAsmWriter.inc"
196512a8ddStltao 
206512a8ddStltao void SystemZGNUInstPrinter::printFormattedRegName(const MCAsmInfo *MAI,
216512a8ddStltao                                                   MCRegister Reg,
22*facdae62SFangrui Song                                                   raw_ostream &O) {
236512a8ddStltao   const char *RegName = getRegisterName(Reg);
246512a8ddStltao   markup(O, Markup::Register) << '%' << RegName;
256512a8ddStltao }
266512a8ddStltao 
276512a8ddStltao void SystemZGNUInstPrinter::printInst(const MCInst *MI, uint64_t Address,
286512a8ddStltao                                       StringRef Annot,
296512a8ddStltao                                       const MCSubtargetInfo &STI,
306512a8ddStltao                                       raw_ostream &O) {
316512a8ddStltao   printInstruction(MI, Address, O);
326512a8ddStltao   printAnnotation(O, Annot);
336512a8ddStltao }
34