Gabor Buella | 349ffce | 2018-06-05 10:41:39 +0000 | [diff] [blame] | 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 |