diff options
author | Gabor Buella <gabor.buella@intel.com> | 2018-06-05 10:41:39 +0000 |
---|---|---|
committer | Gabor Buella <gabor.buella@intel.com> | 2018-06-05 10:41:39 +0000 |
commit | 349ffcee8751a5b0196c842f8c6ee5f00b02a6ab (patch) | |
tree | 9695221ecec439ac9e66192e2931aef6973ea49e /llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h | |
parent | 5af11ab259bc736d74176144a651ee8c436e26a6 (diff) | |
download | bcm5719-llvm-349ffcee8751a5b0196c842f8c6ee5f00b02a6ab.tar.gz bcm5719-llvm-349ffcee8751a5b0196c842f8c6ee5f00b02a6ab.zip |
[X86] NFC Refactor some code in InstPrinters
Summary:
Bringing some come duplicated in the AT&T and the Intel printers
into a common parent class.
Reviewers: craig.topper
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D47682
llvm-svn: 334005
Diffstat (limited to 'llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h')
-rw-r--r-- | llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h b/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h index c8e1f0dbf8b..3b34a8052be 100644 --- a/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h +++ b/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h @@ -14,16 +14,16 @@ #ifndef LLVM_LIB_TARGET_X86_INSTPRINTER_X86INTELINSTPRINTER_H #define LLVM_LIB_TARGET_X86_INSTPRINTER_X86INTELINSTPRINTER_H -#include "llvm/MC/MCInstPrinter.h" +#include "X86InstPrinterCommon.h" #include "llvm/Support/raw_ostream.h" namespace llvm { -class X86IntelInstPrinter final : public MCInstPrinter { +class X86IntelInstPrinter final : public X86InstPrinterCommon { public: X86IntelInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI) - : MCInstPrinter(MAI, MII, MRI) {} + : X86InstPrinterCommon(MAI, MII, MRI) {} void printRegName(raw_ostream &OS, unsigned RegNo) const override; void printInst(const MCInst *MI, raw_ostream &OS, StringRef Annot, @@ -33,15 +33,11 @@ public: void printInstruction(const MCInst *MI, raw_ostream &O); static const char *getRegisterName(unsigned RegNo); - void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O); + void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O) override; void printMemReference(const MCInst *MI, unsigned Op, raw_ostream &O); - void printSSEAVXCC(const MCInst *MI, unsigned Op, raw_ostream &O); - void printXOPCC(const MCInst *MI, unsigned Op, raw_ostream &O); - void printPCRelImm(const MCInst *MI, unsigned OpNo, raw_ostream &O); void printMemOffset(const MCInst *MI, unsigned OpNo, raw_ostream &O); void printSrcIdx(const MCInst *MI, unsigned OpNo, raw_ostream &O); void printDstIdx(const MCInst *MI, unsigned OpNo, raw_ostream &O); - void printRoundingControl(const MCInst *MI, unsigned Op, raw_ostream &OS); void printU8Imm(const MCInst *MI, unsigned Op, raw_ostream &O); void printanymem(const MCInst *MI, unsigned OpNo, raw_ostream &O) { |