]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/lib/Target/X86/InstPrinter/X86InstPrinterCommon.h
Merge clang 7.0.1 and several follow-up changes
[FreeBSD/FreeBSD.git] / contrib / llvm / lib / Target / X86 / InstPrinter / X86InstPrinterCommon.h
1 //===-- X86InstPrinterCommon.cpp - X86 assembly instruction printing ------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file includes code common for rendering MCInst instances as AT&T-style
11 // and Intel-style assembly.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_LIB_TARGET_X86_INSTPRINTER_X86INSTPRINTERCOMMON_H
16 #define LLVM_LIB_TARGET_X86_INSTPRINTER_X86INSTPRINTERCOMMON_H
17
18 #include "llvm/MC/MCInstPrinter.h"
19
20 namespace llvm {
21
22 class X86InstPrinterCommon : public MCInstPrinter {
23 public:
24   using MCInstPrinter::MCInstPrinter;
25
26   virtual void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O) = 0;
27   void printSSEAVXCC(const MCInst *MI, unsigned Op, raw_ostream &OS);
28   void printXOPCC(const MCInst *MI, unsigned Op, raw_ostream &OS);
29   void printRoundingControl(const MCInst *MI, unsigned Op, raw_ostream &O);
30   void printPCRelImm(const MCInst *MI, unsigned OpNo, raw_ostream &O);
31 protected:
32   void printInstFlags(const MCInst *MI, raw_ostream &O);
33   void printOptionalSegReg(const MCInst *MI, unsigned OpNo, raw_ostream &O);
34 };
35
36 } // end namespace llvm
37
38 #endif // LLVM_LIB_TARGET_X86_INSTPRINTER_X86ATTINSTPRINTER_H