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 4 5%st_t = type { i32, i32, i32, i32 } 6@static_val = constant %st_t { i32 777, i32 888, i32 787, i32 878} 7 8define 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 20 21entry: 22 ;CHECK: push {r7, lr} 23 ;CHECK: ldr r0, [sp, #32] 24 ;CHECK: bl fooUseI32 25 call void @fooUseI32(i32 %p2) 26 ret void 27} 28 29declare void @fooUseI32(i32) 30 31define void @doFoo() { 32entry: 33 call void @foo(double 23.0, 34 double 23.1, 35 double 23.2, 36 double 23.3, 37 double 23.4, 38 double 23.5, 39 double 23.6, 40 double 23.7, 41 double 23.8, 42 i32 0, %st_t* byval @static_val, i32 1) 43 ret void 44} 45 46