diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-02-11 22:57:32 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-02-11 22:57:32 +0000 |
| commit | b1913c4df9a77821d1d399a277b9d8366addc94b (patch) | |
| tree | 2ed25b8688b0633a17988ef52fdcaed22ec645a1 /llvm/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp | |
| parent | 50dc219e8b1ca70a9b92aa3486c047636115cb27 (diff) | |
| download | bcm5719-llvm-b1913c4df9a77821d1d399a277b9d8366addc94b.tar.gz bcm5719-llvm-b1913c4df9a77821d1d399a277b9d8366addc94b.zip | |
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)>>
llvm-svn: 95935
Diffstat (limited to 'llvm/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp')
| -rw-r--r-- | llvm/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp b/llvm/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp index 4274d0a436c..610beb550b2 100644 --- a/llvm/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp +++ b/llvm/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()) { |

