2009-07-01 00:01:13 +00:00
|
|
|
; RUN: llvm-as < %s | \
|
2009-07-23 23:09:51 +00:00
|
|
|
; RUN: llc -mtriple=thumbv7-apple-darwin -relocation-model=static | FileCheck %s -check-prefix=STATIC
|
2009-07-01 00:01:13 +00:00
|
|
|
; RUN: llvm-as < %s | \
|
2009-07-23 23:09:51 +00:00
|
|
|
; RUN: llc -mtriple=thumbv7-apple-darwin -relocation-model=dynamic-no-pic | FileCheck %s -check-prefix=DYNAMIC
|
2009-07-01 00:01:13 +00:00
|
|
|
; RUN: llvm-as < %s | \
|
2009-07-23 23:09:51 +00:00
|
|
|
; RUN: llc -mtriple=thumbv7-apple-darwin -relocation-model=pic | FileCheck %s -check-prefix=PIC
|
2009-07-01 00:01:13 +00:00
|
|
|
; RUN: llvm-as < %s | \
|
2009-07-23 23:09:51 +00:00
|
|
|
; RUN: llc -mtriple=thumbv7-linux-gnueabi -relocation-model=pic | FileCheck %s -check-prefix=LINUX
|
2009-06-24 23:47:58 +00:00
|
|
|
|
|
|
|
@G = external global i32
|
|
|
|
|
|
|
|
define i32 @test1() {
|
2009-07-23 23:09:51 +00:00
|
|
|
; STATIC: _test1:
|
|
|
|
; STATIC: .long _G
|
|
|
|
|
|
|
|
; DYNAMIC: _test1:
|
|
|
|
; DYNAMIC: .long L_G$non_lazy_ptr
|
|
|
|
|
|
|
|
; PIC: _test1
|
2009-08-04 23:47:55 +00:00
|
|
|
; PIC: add r0, pc
|
2009-07-23 23:09:51 +00:00
|
|
|
; PIC: .long L_G$non_lazy_ptr-(LPC0+4)
|
|
|
|
|
|
|
|
; LINUX: test1
|
|
|
|
; LINUX: .long G(GOT)
|
2009-06-24 23:47:58 +00:00
|
|
|
%tmp = load i32* @G
|
|
|
|
ret i32 %tmp
|
|
|
|
}
|