[llvm] r233484 - [Objdump] Pass the correct subtarget to printInst.

Akira Hatanaka ahatanaka at apple.com
Sat Mar 28 13:44:06 PDT 2015


Author: ahatanak
Date: Sat Mar 28 15:44:05 2015
New Revision: 233484

URL: http://llvm.org/viewvc/llvm-project?rev=233484&view=rev
Log:
[Objdump] Pass the correct subtarget to printInst.

This fixes a bug I introduced in r233411.

Added:
    llvm/trunk/test/tools/llvm-objdump/AArch64/Inputs/print-mrs.obj.macho-aarch64   (with props)
    llvm/trunk/test/tools/llvm-objdump/AArch64/macho-print-mrs.test
Modified:
    llvm/trunk/tools/llvm-objdump/MachODump.cpp

Added: llvm/trunk/test/tools/llvm-objdump/AArch64/Inputs/print-mrs.obj.macho-aarch64
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objdump/AArch64/Inputs/print-mrs.obj.macho-aarch64?rev=233484&view=auto
==============================================================================
Binary file - no diff available.

Propchange: llvm/trunk/test/tools/llvm-objdump/AArch64/Inputs/print-mrs.obj.macho-aarch64
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: llvm/trunk/test/tools/llvm-objdump/AArch64/macho-print-mrs.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objdump/AArch64/macho-print-mrs.test?rev=233484&view=auto
==============================================================================
--- llvm/trunk/test/tools/llvm-objdump/AArch64/macho-print-mrs.test (added)
+++ llvm/trunk/test/tools/llvm-objdump/AArch64/macho-print-mrs.test Sat Mar 28 15:44:05 2015
@@ -0,0 +1,3 @@
+RUN: llvm-objdump -d -m -no-show-raw-insn %p/Inputs/print-mrs.obj.macho-aarch64 | FileCheck %s
+
+CHECK: 0:  mrs x0, S3_7_C15_C2_0

Modified: llvm/trunk/tools/llvm-objdump/MachODump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/MachODump.cpp?rev=233484&r1=233483&r2=233484&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/MachODump.cpp (original)
+++ llvm/trunk/tools/llvm-objdump/MachODump.cpp Sat Mar 28 15:44:05 2015
@@ -3349,7 +3349,7 @@ static void DisassembleMachO(StringRef F
           if (isThumb)
             ThumbIP->printInst(&Inst, FormattedOS, AnnotationsStr, *ThumbSTI);
           else
-            IP->printInst(&Inst, FormattedOS, AnnotationsStr, *ThumbSTI);
+            IP->printInst(&Inst, FormattedOS, AnnotationsStr, *STI);
           emitComments(CommentStream, CommentsToEmit, FormattedOS, *AsmInfo);
 
           // Print debug info.
@@ -3408,7 +3408,7 @@ static void DisassembleMachO(StringRef F
             outs() << "\t";
             DumpBytes(ArrayRef<uint8_t>(Bytes.data() + Index, InstSize));
           }
-          IP->printInst(&Inst, outs(), "", *ThumbSTI);
+          IP->printInst(&Inst, outs(), "", *STI);
           outs() << "\n";
         } else {
           unsigned int Arch = MachOOF->getArch();





More information about the llvm-commits mailing list