[llvm-readobj] - Simplify stack-sizes.test test case.
[llvm-complete.git] / test / MC / ARM / macho-word-reloc-thumb.s
blob1562f21747a80201e1c6901b6b05dd6a05d92e7e
1 @ RUN: llvm-mc -triple thumbv7-apple-ios %s -filetype=obj -o %t
2 @ RUN: llvm-objdump -macho -d %t -triple thumbv7-apple-ios | FileCheck %s
4 @ ARM relocatable object files try to look like they're pre-linked, so the
5 @ offsets in the instructions are a best-guess. I suspect the "-3" should b
7 @ CHECK: movw r1, :lower16:((_bar-8)-3)
8 @ [...]
9 @ CHECK: .long {{[0-9]*[13579]}}
11 .thumb
12 .thumb_func _foo
13 _foo:
14 movw r1, :lower16:(_bar-(LPC2_0+4))
15 movt r1, :upper16:(_bar-(LPC2_0+4))
16 LPC2_0:
17 add r1, pc
18 ldr r0, Lconstpool
19 bx lr
20 Lconstpool:
21 .data_region
22 .word _bar
23 .end_data_region
25 .thumb_func _bar
26 .global _bar
27 _bar:
28 bx lr
30 .subsections_via_symbols