• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1;Check 5.5 Parameter Passing --> Stage C --> C.1.cp statement for VA functions.
2;Note: There are no VFP CPRCs in a variadic procedure.
3;Check that after %C was sent to stack, we set Next Core Register Number to R4.
4
5;This test is simplified IR version of
6;test-suite/SingleSource/UnitTests/2002-05-02-ManyArguments.c
7
8;RUN: llc -mtriple=thumbv7-linux-gnueabihf -float-abi=hard < %s | FileCheck %s
9
10@.str = private unnamed_addr constant [13 x i8] c"%d %d %f %i\0A\00", align 1
11
12;CHECK-LABEL: printfn:
13define void @printfn(i32 %a, i16 signext %b, double %C, i8 signext %E) {
14entry:
15  %conv = sext i16 %b to i32
16  %conv1 = sext i8 %E to i32
17  %call = tail call i32 (i8*, ...) @printf(
18	i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i32 0, i32 0), ; --> R0
19        i32 %a,                                          ; --> R1
20        i32 %conv,                                       ; --> R2
21        double %C,                                       ; --> SP, NCRN := R4
22;CHECK:    str r2, [sp, #8]
23        i32 %conv1)                                      ; --> SP+8
24  ret void
25}
26
27declare i32 @printf(i8* nocapture, ...)
28
29