~ubuntu-branches/ubuntu/trusty/llvm-toolchain-snapshot/trusty-201310232150

« back to all changes in this revision

Viewing changes to test/CodeGen/ARM/2013-04-21-AAPCS-VA-C.1.cp.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-27 15:01:57 UTC
  • mfrom: (0.10.1) (0.9.1) (0.8.1) (0.7.1) (0.6.1) (0.5.2)
  • Revision ID: package-import@ubuntu.com-20130527150157-tdkrsjpuvht7v0qx
Tags: 1:3.4~svn182733-1~exp1
* New snapshot release (3.4 release)
* Add a symlink of libLLVM-3.4.so.1 to usr/lib/llvm-3.4/lib/libLLVM-3.4.so
    to fix make the llvm-config-3.4 --libdir work (Closes: #708677)
  * Various packages rename to allow co installations:
    * libclang1 => libclang1-3.4
    * libclang1-dbg => libclang1-3.4-dbg
    * libclang-dev => libclang-3.4-dev
    * libclang-common-dev => libclang-common-3.4-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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: printfn:
 
13
define void @printfn(i32 %a, i16 signext %b, double %C, i8 signext %E) {
 
14
entry:
 
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]* @.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
 
 
27
declare i32 @printf(i8* nocapture, ...)
 
28