brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · acf9073 Raw
46 lines · plain
1;Check AAPCS, 5.5 Parameters Passing, C4 and C5 rules.2;Check case when NSAA != 0, and NCRN < R4, NCRN+ParamSize > R43;RUN: llc -mtriple=thumbv7-linux-gnueabihf -float-abi=hard < %s | FileCheck %s4 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=SP9                 double %vfp1,     ; --> D1,              NSAA=SP10		 double %vfp2,     ; --> D2,              NSAA=SP11		 double %vfp3,     ; --> D3,              NSAA=SP12		 double %vfp4,     ; --> D4,              NSAA=SP13		 double %vfp5,     ; --> D5,              NSAA=SP14		 double %vfp6,     ; --> D6,              NSAA=SP15		 double %vfp7,     ; --> D7,              NSAA=SP16		 double %vfp8,     ; --> SP,              NSAA=SP+8 (!)17                 i32 %p0,          ; --> R0,              NSAA=SP+818		 ptr byval(%st_t) %p1, ; --> SP+8, 4 words    NSAA=SP+2419		 i32 %p2) #0 {     ; --> SP+24,           NSAA=SP+2420 21entry:22  ;CHECK:  push {r7, lr}23  ;CHECK:  ldr    r0, [sp, #32]24  ;CHECK:  bl     fooUseI3225  call void @fooUseI32(i32 %p2)26  ret void27}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, ptr byval(%st_t) @static_val, i32 1)43  ret void44}45 46