Changeset View
Changeset View
Standalone View
Standalone View
llvm/test/CodeGen/X86/win64_vararg.ll
; RUN: llc < %s -mcpu=generic -mtriple=x86_64-pc-win32 | FileCheck %s | ; RUN: llc < %s -mcpu=generic -mtriple=x86_64-pc-win32 | FileCheck %s | ||||
; Verify that the var arg parameters which are passed in registers are stored | ; Verify that the var arg parameters which are passed in registers are stored | ||||
; in home stack slots allocated by the caller and that AP is correctly | ; in home stack slots allocated by the caller and that AP is correctly | ||||
; calculated. | ; calculated. | ||||
define void @average_va(i32 %count, ...) nounwind { | define void @average_va(i32 %count, ...) nounwind { | ||||
entry: | entry: | ||||
; CHECK: pushq | ; CHECK: pushq | ||||
; CHECK: movq %r9, 40(%rsp) | ; CHECK-DAG: movq %r9, 40(%rsp) | ||||
; CHECK: movq %r8, 32(%rsp) | ; CHECK-DAG: movq %r8, 32(%rsp) | ||||
; CHECK: movq %rdx, 24(%rsp) | ; CHECK-DAG: movq %rdx, 24(%rsp) | ||||
; CHECK: leaq 24(%rsp), %rax | ; CHECK: leaq 24(%rsp), %rax | ||||
%ap = alloca i8*, align 8 ; <i8**> [#uses=1] | %ap = alloca i8*, align 8 ; <i8**> [#uses=1] | ||||
%ap1 = bitcast i8** %ap to i8* ; <i8*> [#uses=1] | %ap1 = bitcast i8** %ap to i8* ; <i8*> [#uses=1] | ||||
call void @llvm.va_start(i8* %ap1) | call void @llvm.va_start(i8* %ap1) | ||||
ret void | ret void | ||||
} | } | ||||
▲ Show 20 Lines • Show All 112 Lines • Show Last 20 Lines |