aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.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/X86IntelInstPrinter.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/X86IntelInstPrinter.cpp')
-rw-r--r--lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp b/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp
index 4274d0a436..610beb550b 100644
--- a/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp
+++ b/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp
@@ -24,10 +24,14 @@ using namespace llvm;
// Include the auto-generated portion of the assembly writer.
#define MachineInstr MCInst
+#define GET_INSTRUCTION_NAME
#include "X86GenAsmWriter1.inc"
#undef MachineInstr
void X86IntelInstPrinter::printInst(const MCInst *MI) { printInstruction(MI); }
+StringRef X86IntelInstPrinter::getOpcodeName(unsigned Opcode) const {
+ return getInstructionName(Opcode);
+}
void X86IntelInstPrinter::printSSECC(const MCInst *MI, unsigned Op) {
switch (MI->getOperand(Op).getImm()) {