summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp4
-rw-r--r--llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h6
-rw-r--r--llvm/test/MC/X86/x86-32-coverage.s8
3 files changed, 17 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp b/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp
index 9015aa14768..6c597166dbf 100644
--- a/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp
+++ b/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp
@@ -28,6 +28,8 @@ using namespace llvm;
#define DEBUG_TYPE "asm-printer"
+// Include the auto-generated portion of the assembly writer.
+#define PRINT_ALIAS_INSTR
#include "X86GenAsmWriter1.inc"
void X86IntelInstPrinter::printRegName(raw_ostream &OS, unsigned RegNo) const {
@@ -43,7 +45,7 @@ void X86IntelInstPrinter::printInst(const MCInst *MI, raw_ostream &OS,
if (MI->getOpcode() == X86::DATA16_PREFIX &&
STI.getFeatureBits()[X86::Mode16Bit]) {
OS << "\tdata32";
- } else
+ } else if (!printAliasInstr(MI, OS))
printInstruction(MI, OS);
// Next always print the annotation.
diff --git a/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h b/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h
index 5155dee178a..67ea9b7fa97 100644
--- a/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h
+++ b/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h
@@ -28,6 +28,12 @@ public:
void printInst(const MCInst *MI, raw_ostream &OS, StringRef Annot,
const MCSubtargetInfo &STI) override;
+ // Autogenerated by tblgen, returns true if we successfully printed an
+ // alias.
+ bool printAliasInstr(const MCInst *MI, raw_ostream &OS);
+ void printCustomAliasOperand(const MCInst *MI, unsigned OpIdx,
+ unsigned PrintMethodIdx, raw_ostream &O);
+
// Autogenerated by tblgen.
void printInstruction(const MCInst *MI, raw_ostream &O);
static const char *getRegisterName(unsigned RegNo);
diff --git a/llvm/test/MC/X86/x86-32-coverage.s b/llvm/test/MC/X86/x86-32-coverage.s
index ba59fb357b9..6b0da89b821 100644
--- a/llvm/test/MC/X86/x86-32-coverage.s
+++ b/llvm/test/MC/X86/x86-32-coverage.s
@@ -10808,3 +10808,11 @@ enclu
// CHECK: enclv
// CHECK: encoding: [0x0f,0x01,0xc0]
enclv
+
+// CHECK: aam # encoding: [0xd4,0x0a]
+// INTEL: aam{{$}}
+aam $10
+
+// CHECK: aad # encoding: [0xd5,0x0a]
+// INTEL: aad{{$}}
+aad $10
OpenPOWER on IntegriCloud