mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-30 02:32:08 +00:00
8b2b8a1835
This update was done with the following bash script: find test/CodeGen -name "*.ll" | \ while read NAME; do echo "$NAME" if ! grep -q "^; *RUN: *llc.*debug" $NAME; then TEMP=`mktemp -t temp` cp $NAME $TEMP sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \ while read FUNC; do sed -i '' "s/;\(.*\)\([A-Za-z0-9_-]*\):\( *\)$FUNC: *\$/;\1\2-LABEL:\3$FUNC:/g" $TEMP done sed -i '' "s/;\(.*\)-LABEL-LABEL:/;\1-LABEL:/" $TEMP sed -i '' "s/;\(.*\)-NEXT-LABEL:/;\1-NEXT:/" $TEMP sed -i '' "s/;\(.*\)-NOT-LABEL:/;\1-NOT:/" $TEMP sed -i '' "s/;\(.*\)-DAG-LABEL:/;\1-DAG:/" $TEMP mv $TEMP $NAME fi done git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186280 91177308-0d34-0410-b5e6-96231b3b80d8
54 lines
1.4 KiB
LLVM
54 lines
1.4 KiB
LLVM
; 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
|
|
; in home stack slots allocated by the caller and that AP is correctly
|
|
; calculated.
|
|
define void @average_va(i32 %count, ...) nounwind {
|
|
entry:
|
|
; CHECK: pushq
|
|
; CHECK: movq %r9, 40(%rsp)
|
|
; CHECK: movq %r8, 32(%rsp)
|
|
; CHECK: movq %rdx, 24(%rsp)
|
|
; CHECK: leaq 24(%rsp), %rax
|
|
|
|
%ap = alloca i8*, align 8 ; <i8**> [#uses=1]
|
|
%ap1 = bitcast i8** %ap to i8* ; <i8*> [#uses=1]
|
|
call void @llvm.va_start(i8* %ap1)
|
|
ret void
|
|
}
|
|
|
|
declare void @llvm.va_start(i8*) nounwind
|
|
|
|
; CHECK-LABEL: f5:
|
|
; CHECK: pushq
|
|
; CHECK: leaq 56(%rsp),
|
|
define i8* @f5(i64 %a0, i64 %a1, i64 %a2, i64 %a3, i64 %a4, ...) nounwind {
|
|
entry:
|
|
%ap = alloca i8*, align 8
|
|
%ap1 = bitcast i8** %ap to i8*
|
|
call void @llvm.va_start(i8* %ap1)
|
|
ret i8* %ap1
|
|
}
|
|
|
|
; CHECK-LABEL: f4:
|
|
; CHECK: pushq
|
|
; CHECK: leaq 48(%rsp),
|
|
define i8* @f4(i64 %a0, i64 %a1, i64 %a2, i64 %a3, ...) nounwind {
|
|
entry:
|
|
%ap = alloca i8*, align 8
|
|
%ap1 = bitcast i8** %ap to i8*
|
|
call void @llvm.va_start(i8* %ap1)
|
|
ret i8* %ap1
|
|
}
|
|
|
|
; CHECK-LABEL: f3:
|
|
; CHECK: pushq
|
|
; CHECK: leaq 40(%rsp),
|
|
define i8* @f3(i64 %a0, i64 %a1, i64 %a2, ...) nounwind {
|
|
entry:
|
|
%ap = alloca i8*, align 8
|
|
%ap1 = bitcast i8** %ap to i8*
|
|
call void @llvm.va_start(i8* %ap1)
|
|
ret i8* %ap1
|
|
}
|