diff --git a/test/tools/llvm-objdump/AArch64/Inputs/print-mrs.obj.macho-aarch64 b/test/tools/llvm-objdump/AArch64/Inputs/print-mrs.obj.macho-aarch64 new file mode 100644 index 00000000000..06cb13d07da Binary files /dev/null and b/test/tools/llvm-objdump/AArch64/Inputs/print-mrs.obj.macho-aarch64 differ diff --git a/test/tools/llvm-objdump/AArch64/macho-print-mrs.test b/test/tools/llvm-objdump/AArch64/macho-print-mrs.test new file mode 100644 index 00000000000..cc1d14faf8d --- /dev/null +++ b/test/tools/llvm-objdump/AArch64/macho-print-mrs.test @@ -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 diff --git a/tools/llvm-objdump/MachODump.cpp b/tools/llvm-objdump/MachODump.cpp index 08573eeb0d2..43cf6671e61 100644 --- a/tools/llvm-objdump/MachODump.cpp +++ b/tools/llvm-objdump/MachODump.cpp @@ -3349,7 +3349,7 @@ static void DisassembleMachO(StringRef Filename, MachOObjectFile *MachOOF, 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 Filename, MachOObjectFile *MachOOF, outs() << "\t"; DumpBytes(ArrayRef(Bytes.data() + Index, InstSize)); } - IP->printInst(&Inst, outs(), "", *ThumbSTI); + IP->printInst(&Inst, outs(), "", *STI); outs() << "\n"; } else { unsigned int Arch = MachOOF->getArch();