• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3
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
6
7@ CHECK: movw r1, :lower16:((_bar-8)-3)
8@ [...]
9@ CHECK: .long {{[0-9]*[13579]}}
10
11        .thumb
12        .thumb_func _foo
13_foo:
14        movw r1, :lower16:(_bar-(LPC2_0+4))
15        movt r1, :upper16:(_bar-(LPC2_0+4))
16LPC2_0:
17        add r1, pc
18        ldr r0, Lconstpool
19        bx lr
20Lconstpool:
21        .data_region
22        .word _bar
23        .end_data_region
24
25        .thumb_func _bar
26_bar:
27        bx lr
28
29        .subsections_via_symbols
30