aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-11 22:57:32 +0000
committerChris Lattner <sabre@nondot.org>2010-02-11 22:57:32 +0000
commit0d7b0aa76036abc3118d148fbf02ad287bc7be6c (patch)
tree049210f63a79db55cb033a24f1b83d7226aba692 /lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp
parent7e85180d15c4d5a451fbc078f7194a41c6230a57 (diff)
enhance llvm-mc -show-inst to print the enum of an instruction, like so:
testb %al, %al ## <MCInst #2412 TEST8rr ## <MCOperand Reg:2> ## <MCOperand Reg:2>> jne LBB1_7 ## <MCInst #938 JNE_1 ## <MCOperand Expr:(LBB1_7)>> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95935 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp')
-rw-r--r--lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp b/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp
index 38ccbf9d50..1a35a4941c 100644
--- a/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp
+++ b/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp
@@ -25,10 +25,15 @@ using namespace llvm;
// Include the auto-generated portion of the assembly writer.
#define MachineInstr MCInst
+#define GET_INSTRUCTION_NAME
#include "X86GenAsmWriter.inc"
#undef MachineInstr
void X86ATTInstPrinter::printInst(const MCInst *MI) { printInstruction(MI); }
+StringRef X86ATTInstPrinter::getOpcodeName(unsigned Opcode) const {
+ return getInstructionName(Opcode);
+}
+
void X86ATTInstPrinter::printSSECC(const MCInst *MI, unsigned Op) {
switch (MI->getOperand(Op).getImm()) {