blob: a451318f6e8c30f7deac5318c4e9ac128c332347 [file] [log] [blame]
Anton Korobeynikove7beda12010-10-03 22:52:07 +00001; RUN: llc < %s -mtriple=x86_64-pc-win32 | FileCheck %s
2
3; Verify that the var arg parameters which are passed in registers are stored
4; in home stack slots allocated by the caller and that AP is correctly
5; calculated.
6define void @average_va(i32 %count, ...) nounwind {
7entry:
NAKAMURA Takumi3f4be4f2011-02-05 15:11:32 +00008; CHECK: pushq
9; CHECK: movq %r9, 40(%rsp)
10; CHECK: movq %r8, 32(%rsp)
11; CHECK: movq %rdx, 24(%rsp)
12; CHECK: leaq 24(%rsp), %rax
Anton Korobeynikove7beda12010-10-03 22:52:07 +000013
14 %ap = alloca i8*, align 8 ; <i8**> [#uses=1]
15 %ap1 = bitcast i8** %ap to i8* ; <i8*> [#uses=1]
16 call void @llvm.va_start(i8* %ap1)
17 ret void
18}
19
20declare void @llvm.va_start(i8*) nounwind