LLVM 22.0.0git
X86InstPrinterCommon.h
Go to the documentation of this file.
1//===-- X86InstPrinterCommon.cpp - X86 assembly instruction printing ------===//
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// This file includes code common for rendering MCInst instances as AT&T-style
10// and Intel-style assembly.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_LIB_TARGET_X86_MCTARGETDESC_X86INSTPRINTERCOMMON_H
15#define LLVM_LIB_TARGET_X86_MCTARGETDESC_X86INSTPRINTERCOMMON_H
16
18
19namespace llvm {
20class MCExpr;
21
23public:
25
26 virtual void printExprOperand(raw_ostream &OS, const MCExpr &E);
27 virtual void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O) = 0;
28 void printCondCode(const MCInst *MI, unsigned Op, raw_ostream &OS);
29 void printCondFlags(const MCInst *MI, unsigned Op, raw_ostream &OS);
30 void printSSEAVXCC(const MCInst *MI, unsigned Op, raw_ostream &OS);
31 void printVPCOMMnemonic(const MCInst *MI, raw_ostream &OS);
32 void printVPCMPMnemonic(const MCInst *MI, raw_ostream &OS);
33 void printCMPMnemonic(const MCInst *MI, bool IsVCmp, raw_ostream &OS);
34 void printRoundingControl(const MCInst *MI, unsigned Op, raw_ostream &O);
35 void printPCRelImm(const MCInst *MI, uint64_t Address, unsigned OpNo,
36 raw_ostream &O);
37
38protected:
39 void printInstFlags(const MCInst *MI, raw_ostream &O,
40 const MCSubtargetInfo &STI);
41 void printOptionalSegReg(const MCInst *MI, unsigned OpNo, raw_ostream &O);
42 void printVKPair(const MCInst *MI, unsigned OpNo, raw_ostream &OS);
43 void printTILEPair(const MCInst *MI, unsigned OpNo, raw_ostream &OS);
44};
45
46} // end namespace llvm
47
48#endif // LLVM_LIB_TARGET_X86_MCTARGETDESC_X86INSTPRINTERCOMMON_H
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
IRTranslator LLVM IR MI
Base class for the full range of assembler expressions which are needed for parsing.
Definition MCExpr.h:34
MCInstPrinter(const MCAsmInfo &mai, const MCInstrInfo &mii, const MCRegisterInfo &mri)
Instances of this class represent a single low-level machine instruction.
Definition MCInst.h:188
Generic base class for all target subtargets.
void printRoundingControl(const MCInst *MI, unsigned Op, raw_ostream &O)
void printPCRelImm(const MCInst *MI, uint64_t Address, unsigned OpNo, raw_ostream &O)
value (e.g.
void printOptionalSegReg(const MCInst *MI, unsigned OpNo, raw_ostream &O)
void printVPCOMMnemonic(const MCInst *MI, raw_ostream &OS)
void printTILEPair(const MCInst *MI, unsigned OpNo, raw_ostream &OS)
void printSSEAVXCC(const MCInst *MI, unsigned Op, raw_ostream &OS)
void printVKPair(const MCInst *MI, unsigned OpNo, raw_ostream &OS)
virtual void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O)=0
void printCondCode(const MCInst *MI, unsigned Op, raw_ostream &OS)
void printCondFlags(const MCInst *MI, unsigned Op, raw_ostream &OS)
void printCMPMnemonic(const MCInst *MI, bool IsVCmp, raw_ostream &OS)
void printInstFlags(const MCInst *MI, raw_ostream &O, const MCSubtargetInfo &STI)
void printVPCMPMnemonic(const MCInst *MI, raw_ostream &OS)
virtual void printExprOperand(raw_ostream &OS, const MCExpr &E)
MCInstPrinter(const MCAsmInfo &mai, const MCInstrInfo &mii, const MCRegisterInfo &mri)
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition raw_ostream.h:53
This is an optimization pass for GlobalISel generic memory operations.
DWARFExpression::Operation Op