1 ; RUN: llc %s -mtriple=thumbv7-linux-gnueabi -relocation-model=pic \
2 ; RUN: -filetype=obj -o - | llvm-readobj -s -sd -r -t | \
5 ; FIXME: This file needs to be in .s form!
6 ; We want to test relocatable thumb function call,
7 ; but ARMAsmParser cannot handle "bl foo(PLT)" yet
9 target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:64:128-a0:0:32-n32"
10 target triple = "thumbv7-none--gnueabi"
12 define void @foo() nounwind {
17 define void @bar() nounwind {
24 ; make sure that bl 0 <foo> (fff7feff) is correctly encoded
26 ; CHECK: SectionData (
27 ; CHECK: 0000: 704780B5 FFF7FEFF 80BD
31 ; CHECK: Relocations [
32 ; CHECK-NEXT: Section {{.*}} .rel.text {
33 ; CHECK-NEXT: 0x4 R_ARM_THM_CALL foo 0x0
35 ; CHECK-NEXT: Section {{.*}} .rel.ARM.exidx {
36 ; CHECK-NEXT: 0x0 R_ARM_PREL31 .text 0x0
37 ; CHECK-NEXT: 0x8 R_ARM_PREL31 .text 0x0
41 ; make sure foo is thumb function: bit 0 = 1
45 ; CHECK-NEXT: Value: 0x1