Home | History | Annotate | Download | only in PowerPC
      1 ; RUN: llc < %s -relocation-model=static | FileCheck %s -check-prefix=STATIC
      2 ; RUN: llc < %s -relocation-model=pic -mtriple=powerpc-apple-darwin9 | FileCheck %s -check-prefix=PIC
      3 ; RUN: llc < %s -relocation-model=pic -mtriple=powerpc-unknown-linux | FileCheck %s -check-prefix=PICELF
      4 ; RUN: llc < %s -relocation-model=pic -mtriple=powerpc64-apple-darwin9 | FileCheck %s -check-prefix=PIC64
      5 ; RUN: llc < %s -relocation-model=dynamic-no-pic -mtriple=powerpc-apple-darwin9 | FileCheck %s -check-prefix=DYNAMIC
      6 ; RUN: llc < %s -relocation-model=dynamic-no-pic -mtriple=powerpc64-apple-darwin9 | FileCheck %s -check-prefix=DYNAMIC64
      7 ; PR4482
      8 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
      9 target triple = "powerpc-apple-darwin9"
     10 
     11 define i32 @foo(i64 %x) nounwind {
     12 entry:
     13 ; STATIC: _foo:
     14 ; STATIC: bl _exact_log2
     15 ; STATIC: blr
     16 ; STATIC: .subsections_via_symbols
     17 
     18 ; PIC: _foo:
     19 ; PIC: bl _exact_log2
     20 ; PIC: blr
     21 
     22 ; PICELF: foo:
     23 ; PICELF: bl exact_log2@PLT
     24 ; PICELF: blr
     25 
     26 ; PIC64: _foo:
     27 ; PIC64: bl _exact_log2
     28 ; PIC64: blr
     29 
     30 ; DYNAMIC: _foo:
     31 ; DYNAMIC: bl _exact_log2
     32 ; DYNAMIC: blr
     33 
     34 ; DYNAMIC64: _foo:
     35 ; DYNAMIC64: bl _exact_log2
     36 ; DYNAMIC64: blr
     37 
     38         %A = call i32 @exact_log2(i64 %x) nounwind
     39 	ret i32 %A
     40 }
     41 
     42 define available_externally i32 @exact_log2(i64 %x) nounwind {
     43 entry:
     44 	ret i32 42
     45 }
     46 
     47 
     48 ; PIC: .subsections_via_symbols
     49 
     50 
     51 ; PIC64: .subsections_via_symbols
     52