1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/test/tools/llvm-objdump/ARM/macho-v7m.test
Tim Northover 2b39bb5c9b 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
2016-04-22 23:23:31 +00:00

15 lines
450 B
Plaintext

@ RUN: llvm-mc < %s -triple thumbv7m-apple-macho -filetype=obj | llvm-objdump -macho -d - | FileCheck %s
@ RUN: llvm-mc < %s -triple thumbv7em-apple-macho -filetype=obj | llvm-objdump -macho -d - | FileCheck %s
.thumb
.thumb_func _t
_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
@ CHECK: .short 0xf000
@ CHECK: b _t