LLVM 20.0.0git
SystemZGNUInstPrinter.cpp
Go to the documentation of this file.
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
10#include "llvm/MC/MCInst.h"
11#include "llvm/MC/MCRegister.h"
13
14using namespace llvm;
15
16#define DEBUG_TYPE "asm-printer"
17
18#include "SystemZGenGNUAsmWriter.inc"
19
20void 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
28 StringRef Annot,
29 const MCSubtargetInfo &STI,
30 raw_ostream &O) {
32 printAnnotation(O, Annot);
33}
IRTranslator LLVM IR MI
#define RegName(no)
This class is intended to be used as a base class for asm properties and features specific to the tar...
Definition: MCAsmInfo.h:56
WithMarkup markup(raw_ostream &OS, Markup M)
void printAnnotation(raw_ostream &OS, StringRef Annot)
Utility function for printing annotations.
Instances of this class represent a single low-level machine instruction.
Definition: MCInst.h:185
Wrapper class representing physical registers. Should be passed by value.
Definition: MCRegister.h:33
Generic base class for all target subtargets.
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:51
void printInst(const MCInst *MI, uint64_t Address, StringRef Annot, const MCSubtargetInfo &STI, raw_ostream &O) override
Print the specified MCInst to the specified raw_ostream.
void printInstruction(const MCInst *MI, uint64_t Address, raw_ostream &O)
static const char * getRegisterName(MCRegister Reg)
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18