summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-objdump
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2016-04-22 23:23:31 +0000
committerTim Northover <tnorthover@apple.com>2016-04-22 23:23:31 +0000
commit09ca33ebc4ccfce284b97a0cebaf5d0d84b26781 (patch)
treeaa5cf0bc96299b82abaf50e7b986ff3f11cb45a4 /llvm/test/tools/llvm-objdump
parent9e8eb418e583974c7d24ca3d81f567accd5adbfa (diff)
downloadbcm5719-llvm-09ca33ebc4ccfce284b97a0cebaf5d0d84b26781.tar.gz
bcm5719-llvm-09ca33ebc4ccfce284b97a0cebaf5d0d84b26781.zip
llvm-objdump: deal with invalid ARM encodings slightly better.
Before we printed a warning to stderr and left the actual output stream in a mess. This tries to print a .long or .short representation of what we saw (as if there was a data-in-code directive). This isn't guaranteed to restore synchronization in Thumb-mode (if the invalid instruction was supposed to be 32-bits, we may be off-by-16 for the rest of the function). But there's no certain way to deal with that, and it's invalid code anyway (if the data really wasn't an instruction, the user can add proper .data_in_code directives if they care) llvm-svn: 267250
Diffstat (limited to 'llvm/test/tools/llvm-objdump')
-rw-r--r--llvm/test/tools/llvm-objdump/ARM/macho-arm-and-thumb.test6
-rw-r--r--llvm/test/tools/llvm-objdump/ARM/macho-v7m.test6
2 files changed, 10 insertions, 2 deletions
diff --git a/llvm/test/tools/llvm-objdump/ARM/macho-arm-and-thumb.test b/llvm/test/tools/llvm-objdump/ARM/macho-arm-and-thumb.test
index f741f6cb27a..fab64f549ef 100644
--- a/llvm/test/tools/llvm-objdump/ARM/macho-arm-and-thumb.test
+++ b/llvm/test/tools/llvm-objdump/ARM/macho-arm-and-thumb.test
@@ -10,7 +10,11 @@ nop
.arm
_a:
nop
+.long 0xf8765432
+nop
@ CHECK: 00 bf nop
@ CHECK-NEXT: 00 bf nop
-@ CHECK: 00 f0 20 e3 nop
+@ CHECK: 00 f0 20 e3 nop
+@ CHECK-NEXT: .long 0xf8765432
+@ CHECK-NEXT: nop
diff --git a/llvm/test/tools/llvm-objdump/ARM/macho-v7m.test b/llvm/test/tools/llvm-objdump/ARM/macho-v7m.test
index 938aa4f7d60..3ba11220561 100644
--- a/llvm/test/tools/llvm-objdump/ARM/macho-v7m.test
+++ b/llvm/test/tools/llvm-objdump/ARM/macho-v7m.test
@@ -6,5 +6,9 @@
_t:
@ A nice Cortex-M only instruction to make sure the default CPU is sound.
msr msp, r0
+ .short 0xf000
+ b _t
-@ CHECK: msr msp, r0 \ No newline at end of file
+@ CHECK: msr msp, r0
+@ CHECK: .short 0xf000
+@ CHECK: b _t
OpenPOWER on IntegriCloud