Home | History | Annotate | Download | only in ARM
      1 ; RUN: llc %s -mtriple=thumbv7-linux-gnueabi -relocation-model=pic \
      2 ; RUN: -filetype=obj -o - | llvm-readobj -s -sd -r -t | \
      3 ; RUN: FileCheck %s
      4 
      5 ; FIXME: This file needs to be in .s form!
      6 ; We wanna test relocatable thumb function call,
      7 ; but ARMAsmParser cannot handle "bl foo(PLT)" yet
      8 
      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"
     11 
     12 define void @foo() nounwind {
     13 entry:
     14   ret void
     15 }
     16 
     17 define void @bar() nounwind {
     18 entry:
     19   call void @foo()
     20   ret void
     21 }
     22 
     23 
     24 ; make sure that bl 0 <foo> (fff7feff) is correctly encoded
     25 ; CHECK: Sections [
     26 ; CHECK:   SectionData (
     27 ; CHECK:     0000: 704700BF 2DE90048 FFF7FEFF BDE80088
     28 ; CHECK:   )
     29 ; CHECK: ]
     30 
     31 ; CHECK:      Relocations [
     32 ; CHECK-NEXT:   Section (2) .rel.text {
     33 ; CHECK-NEXT:     0x8 R_ARM_THM_CALL foo 0x0
     34 ; CHECK-NEXT:   }
     35 ; CHECK-NEXT: ]
     36 
     37 ; make sure foo is thumb function: bit 0 = 1
     38 ; CHECK:      Symbols [
     39 ; CHECK:        Symbol {
     40 ; CHECK:          Name: foo
     41 ; CHECK-NEXT:     Value: 0x1
     42