blob: 42b6afdd98d4bfd95c3f7cb51272e8be35a8bebe [file] [log] [blame]
Ulrich Weigand9e3577f2013-05-06 16:17:29 +00001; Test direct calls.
2;
3; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
4
5declare i64 @bar()
6
7; We must allocate 160 bytes for the callee and save and restore %r14.
8define i64 @f1() {
Stephen Lind24ab202013-07-14 06:24:09 +00009; CHECK-LABEL: f1:
Ulrich Weigand9e3577f2013-05-06 16:17:29 +000010; CHECK: stmg %r14, %r15, 112(%r15)
11; CHECK: aghi %r15, -160
12; CHECK: brasl %r14, bar@PLT
13; CHECK: lmg %r14, %r15, 272(%r15)
14; CHECK: br %r14
15 %ret = call i64 @bar()
16 %inc = add i64 %ret, 1
17 ret i64 %inc
18}