1 //===- SystemZGNUInstPrinter.cpp - Convert SystemZ MCInst to GNU assembly -===// 2 // 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 6 // 7 //===----------------------------------------------------------------------===// 8 9 #include "SystemZGNUInstPrinter.h" 10 #include "llvm/MC/MCInst.h" 11 #include "llvm/MC/MCRegister.h" 12 #include "llvm/Support/raw_ostream.h" 13 14 using namespace llvm; 15 16 #define DEBUG_TYPE "asm-printer" 17 18 #include "SystemZGenGNUAsmWriter.inc" 19 20 void SystemZGNUInstPrinter::printFormattedRegName(const MCAsmInfo *MAI, 21 MCRegister Reg, 22 raw_ostream &O) { 23 const char *RegName = getRegisterName(Reg); 24 markup(O, Markup::Register) << '%' << RegName; 25 } 26 27 void SystemZGNUInstPrinter::printInst(const MCInst *MI, uint64_t Address, 28 StringRef Annot, 29 const MCSubtargetInfo &STI, 30 raw_ostream &O) { 31 printInstruction(MI, Address, O); 32 printAnnotation(O, Annot); 33 } 34