summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-objdump/AArch64
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2017-09-21 21:45:02 +0000
committerKevin Enderby <enderby@apple.com>2017-09-21 21:45:02 +0000
commitf310e62b77199c295a280b492996ce8a883e4bd9 (patch)
tree379b30825dbe0a9f11b407d574d1d285ffc7ca4f /llvm/test/tools/llvm-objdump/AArch64
parentd51d38f6f9e9528ad5c98f5c80ebbffd1f930273 (diff)
downloadbcm5719-llvm-f310e62b77199c295a280b492996ce8a883e4bd9.tar.gz
bcm5719-llvm-f310e62b77199c295a280b492996ce8a883e4bd9.zip
Fix a bug in llvm-objdump when disassembling using the wrong default CPU
in the second slice of a Mach-O universal file. The code in llvm-objdump in in DisassembleMachO() was getting the default CPU then incorrectly setting into the global variable used for the -mcpu option if that was not set. This caused a second call to DisassembleMachO() to use the wrong default CPU when disassembling the next slice in a Mach-O universal file. And would result in bad disassembly and an error message about an recognized processor for the target: % llvm-objdump -d -m -arch all fat.macho-armv7s-arm64 fat.macho-armv7s-arm64 (architecture armv7s): (__TEXT,__text) section armv7: 0: 60 47 bx r12 fat.macho-armv7s-arm64 (architecture arm64): 'cortex-a7' is not a recognized processor for this target (ignoring processor) 'cortex-a7' is not a recognized processor for this target (ignoring processor) (__TEXT,__text) section ___multc3: 0: .long 0x1e620810 rdar://34439149 llvm-svn: 313921
Diffstat (limited to 'llvm/test/tools/llvm-objdump/AArch64')
-rw-r--r--llvm/test/tools/llvm-objdump/AArch64/Inputs/fat.macho-armv7s-arm64bin0 -> 33112 bytes
-rw-r--r--llvm/test/tools/llvm-objdump/AArch64/macho-fat-arm-disasm.test6
2 files changed, 6 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-objdump/AArch64/Inputs/fat.macho-armv7s-arm64 b/llvm/test/tools/llvm-objdump/AArch64/Inputs/fat.macho-armv7s-arm64
new file mode 100644
index 00000000000..5a61a78247a
--- /dev/null
+++ b/llvm/test/tools/llvm-objdump/AArch64/Inputs/fat.macho-armv7s-arm64
Binary files differ
diff --git a/llvm/test/tools/llvm-objdump/AArch64/macho-fat-arm-disasm.test b/llvm/test/tools/llvm-objdump/AArch64/macho-fat-arm-disasm.test
new file mode 100644
index 00000000000..69ff25436b6
--- /dev/null
+++ b/llvm/test/tools/llvm-objdump/AArch64/macho-fat-arm-disasm.test
@@ -0,0 +1,6 @@
+RUN: llvm-objdump -d -m -no-show-raw-insn -arch all %p/Inputs/fat.macho-armv7s-arm64 | FileCheck %s
+
+CHECK: (architecture armv7s):
+CHECK: bx r12
+CHECK: (architecture arm64):
+CHECK: fmul d16, d0, d2
OpenPOWER on IntegriCloud