diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-10-28 21:37:33 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-10-28 21:37:33 +0000 |
| commit | f20f79808e96e12a5023206588369b3ab820afb7 (patch) | |
| tree | 73d2ca8ee39003e50cd2cd32b235ff7969919042 /llvm/lib/Target/ARM/InstPrinter | |
| parent | 8aefb66376b8bd874aa0600b9797906018ec8718 (diff) | |
| download | bcm5719-llvm-f20f79808e96e12a5023206588369b3ab820afb7.tar.gz bcm5719-llvm-f20f79808e96e12a5023206588369b3ab820afb7.zip | |
hook up getOpcodeName for ARM so that "llc -show-mc-inst" includes
the opcode string in the inst dump, e.g.:
vmov r2, r3, d17 @ encoding: [0x31,0x2b,0x53,0xec]
@ <MCInst #989 VMOVRRD
@ <MCOperand Reg:68>
@ <MCOperand Reg:69>
@ <MCOperand Reg:19>
@ <MCOperand Imm:14>
@ <MCOperand Reg:0>>
The "VMOVRRD" is new.
llvm-svn: 117609
Diffstat (limited to 'llvm/lib/Target/ARM/InstPrinter')
| -rw-r--r-- | llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp | 6 | ||||
| -rw-r--r-- | llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp b/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp index 21b3e1c32a2..7ea438bebd3 100644 --- a/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp +++ b/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp @@ -22,8 +22,14 @@ #include "llvm/Support/raw_ostream.h" using namespace llvm; +#define GET_INSTRUCTION_NAME #include "ARMGenAsmWriter.inc" +StringRef ARMInstPrinter::getOpcodeName(unsigned Opcode) const { + return getInstructionName(Opcode); +} + + void ARMInstPrinter::printInst(const MCInst *MI, raw_ostream &O) { // Check for MOVs and print canonical forms, instead. if (MI->getOpcode() == ARM::MOVs) { diff --git a/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h b/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h index 47c74700fee..1ae0988d924 100644 --- a/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h +++ b/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h @@ -24,6 +24,9 @@ public: ARMInstPrinter(const MCAsmInfo &MAI) : MCInstPrinter(MAI) {} virtual void printInst(const MCInst *MI, raw_ostream &O); + virtual StringRef getOpcodeName(unsigned Opcode) const; + + static const char *getInstructionName(unsigned Opcode); // Autogenerated by tblgen. void printInstruction(const MCInst *MI, raw_ostream &O); |

