blob: 46e053ca4ea5e2b15b2961cf768e801df737d485 [file] [log] [blame]
Dan Gohmanb7c0b242009-09-11 18:36:27 +00001; RUN: llc < %s -mtriple=thumbv7-apple-darwin -relocation-model=static | FileCheck %s -check-prefix=STATIC
2; RUN: llc < %s -mtriple=thumbv7-apple-darwin -relocation-model=dynamic-no-pic | FileCheck %s -check-prefix=DYNAMIC
3; RUN: llc < %s -mtriple=thumbv7-apple-darwin -relocation-model=pic | FileCheck %s -check-prefix=PIC
4; RUN: llc < %s -mtriple=thumbv7-linux-gnueabi -relocation-model=pic | FileCheck %s -check-prefix=LINUX
Evan Chenga09b9ca2009-06-24 23:47:58 +00005
6@G = external global i32
7
8define i32 @test1() {
Evan Chengeee839d2009-07-23 23:09:51 +00009; STATIC: _test1:
10; STATIC: .long _G
11
12; DYNAMIC: _test1:
13; DYNAMIC: .long L_G$non_lazy_ptr
14
15; PIC: _test1
Evan Cheng35d6c412009-08-04 23:47:55 +000016; PIC: add r0, pc
Dan Gohman9f23dee2010-04-17 16:29:15 +000017; PIC: .long L_G$non_lazy_ptr-(LPC0_0+4)
Evan Chengeee839d2009-07-23 23:09:51 +000018
19; LINUX: test1
20; LINUX: .long G(GOT)
Evan Chenga09b9ca2009-06-24 23:47:58 +000021 %tmp = load i32* @G
22 ret i32 %tmp
23}