2015-03-11 18:54:22 +00:00
|
|
|
; RUN: llc < %s -mtriple=armv7-linux-gnueabihf | FileCheck %s -check-prefix=EABI
|
2009-09-24 20:23:02 +00:00
|
|
|
; RUN: llc < %s -march=arm -mtriple=arm-linux-gnu | FileCheck %s -check-prefix=OABI
|
2007-02-23 20:32:57 +00:00
|
|
|
|
|
|
|
define i32 @f(i32 %a, ...) {
|
|
|
|
entry:
|
|
|
|
%a_addr = alloca i32 ; <i32*> [#uses=1]
|
|
|
|
%retval = alloca i32, align 4 ; <i32*> [#uses=2]
|
|
|
|
%tmp = alloca i32, align 4 ; <i32*> [#uses=2]
|
|
|
|
store i32 %a, i32* %a_addr
|
|
|
|
store i32 0, i32* %tmp
|
2015-02-27 21:17:42 +00:00
|
|
|
%tmp1 = load i32, i32* %tmp ; <i32> [#uses=1]
|
2007-02-23 20:32:57 +00:00
|
|
|
store i32 %tmp1, i32* %retval
|
2014-08-22 21:59:26 +00:00
|
|
|
call void @llvm.va_start(i8* null)
|
2015-03-11 18:54:22 +00:00
|
|
|
call void asm sideeffect "", "~{d8}"()
|
2007-02-23 20:32:57 +00:00
|
|
|
br label %return
|
|
|
|
|
|
|
|
return: ; preds = %entry
|
2015-02-27 21:17:42 +00:00
|
|
|
%retval2 = load i32, i32* %retval ; <i32> [#uses=1]
|
2007-02-23 20:32:57 +00:00
|
|
|
ret i32 %retval2
|
2009-09-24 20:23:02 +00:00
|
|
|
; EABI: add sp, sp, #16
|
2015-03-11 18:54:22 +00:00
|
|
|
; EABI: vpop {d8}
|
|
|
|
; EABI: add sp, sp, #4
|
|
|
|
; EABI: add sp, sp, #12
|
|
|
|
|
2009-09-24 20:23:02 +00:00
|
|
|
; OABI: add sp, sp, #12
|
|
|
|
; OABI: add sp, sp, #12
|
2007-02-23 20:32:57 +00:00
|
|
|
}
|
2014-08-22 21:59:26 +00:00
|
|
|
|
|
|
|
declare void @llvm.va_start(i8*) nounwind
|