1 ;Check AAPCS, 5.5 Parameters Passing, C4 and C5 rules.
2 ;Check case when NSAA != 0, and NCRN < R4, NCRN+ParamSize > R4
3 ;RUN: llc -mtriple=thumbv7-linux-gnueabihf -float-abi=hard < %s | FileCheck %s
5 %st_t = type { i32, i32, i32, i32 }
6 @static_val = constant %st_t { i32 777, i32 888, i32 787, i32 878}
8 define void @foo(double %vfp0, ; --> D0, NSAA=SP
9 double %vfp1, ; --> D1, NSAA=SP
10 double %vfp2, ; --> D2, NSAA=SP
11 double %vfp3, ; --> D3, NSAA=SP
12 double %vfp4, ; --> D4, NSAA=SP
13 double %vfp5, ; --> D5, NSAA=SP
14 double %vfp6, ; --> D6, NSAA=SP
15 double %vfp7, ; --> D7, NSAA=SP
16 double %vfp8, ; --> SP, NSAA=SP+8 (!)
17 i32 %p0, ; --> R0, NSAA=SP+8
18 %st_t* byval %p1, ; --> SP+8, 4 words NSAA=SP+24
19 i32 %p2) #0 { ; --> SP+24, NSAA=SP+24
23 ;CHECK: ldr r0, [sp, #32]
25 call void @fooUseI32(i32 %p2)
29 declare void @fooUseI32(i32)
31 define void @doFoo() {
33 call void @foo(double 23.0,
42 i32 0, %st_t* byval @static_val, i32 1)