blob: b465ae2928033d30aaab303b20d4bb4be76973b5 [file] [log] [blame]
Diana Chenba0932c2012-05-29 11:26:35 +08001; RUN: cp %p/wrap_f.s %t.wrap_f.ll
2; RUN: cp %p/true_f.s %t.true_f.ll
Luba Tang81925c62012-05-15 14:14:30 +08003
Luba Tang0a9af862013-08-28 19:33:20 +08004; RUN: %LLC -mtriple="arm-none-linux-gnueabi" -march=arm \
5; RUN: -filetype=obj -relocation-model=pic %s -o %t.1.o
6; RUN: %LLC -mtriple="arm-none-linux-gnueabi" -march=arm \
7; RUN: -filetype=obj -relocation-model=pic %t.wrap_f.ll -o %t.2.o
8; RUN: %LLC -mtriple="arm-none-linux-gnueabi" -march=arm \
9; RUN: -filetype=obj -relocation-model=pic %t.true_f.ll -o %t.3.o
Luba Tang81925c62012-05-15 14:14:30 +080010; RUN: %MCLinker -mtriple="arm-none-linux-gnueabi" -march=arm \
Pete Chou350e22f2014-04-28 20:15:52 +080011; RUN: %t.1.o %t.2.o %t.3.o -o %t.4.o --wrap f -pie
Luba Tang1f6dbf12012-06-25 15:05:46 +080012
Luba Tang500490e2012-06-27 12:48:54 +080013; RUN: rm %t.1.o %t.2.o %t.3.o %t.4.o
Luba Tang1f6dbf12012-06-25 15:05:46 +080014; RUN: rm %t.wrap_f.ll
15; RUN: rm %t.true_f.ll
16
Luba Tang81925c62012-05-15 14:14:30 +080017target triple = "arm-none-linux-gnueabi"
18
19define i8* @g(i32 %c) nounwind uwtable ssp {
20entry:
21 %c.addr = alloca i32, align 4
22 store i32 %c, i32* %c.addr, align 4
23 %0 = load i32* %c.addr, align 4
24 %call = call i8* @f(i32 %0)
25 ret i8* %call
26}
27
28declare i8* @f(i32)