Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: test/CodeGen/ARM/varargs-spill-stack-align-nacl.ll

Issue 180483005: Fix PNaCl-local files after merging LLVM 3.4 (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@hs-merge-before-fixes
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/Transforms/NaCl/PromoteIntegers.cpp ('k') | test/NaCl/PNaClLLC/test-runs-verify.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ; RUN: llc < %s -mtriple=arm-nacl-gnueabi | FileCheck %s 1 ; RUN: llc < %s -mtriple=arm-nacl-gnueabi | FileCheck %s
2 2
3 declare void @llvm.va_start(i8*) 3 declare void @llvm.va_start(i8*)
4 declare void @external_func(i8*) 4 declare void @external_func(i8*)
5 5
6 @va_list = external global i8* 6 @va_list = external global i8*
7 7
8 ; On ARM, varargs arguments are passed in r0-r3 with the rest on the 8 ; On ARM, varargs arguments are passed in r0-r3 with the rest on the
9 ; stack. A varargs function must therefore spill rN-r3 just below the 9 ; stack. A varargs function must therefore spill rN-r3 just below the
10 ; function's initial stack pointer. 10 ; function's initial stack pointer.
11 ; 11 ;
12 ; This test checks for a bug in which a gap was left between the spill 12 ; This test checks for a bug in which a gap was left between the spill
13 ; area and varargs arguments on the stack when using 16 byte stack 13 ; area and varargs arguments on the stack when using 16 byte stack
14 ; alignment. 14 ; alignment.
15 15
16 define void @varargs_func(i32 %arg1, ...) { 16 define void @varargs_func(i32 %arg1, ...) {
17 call void @llvm.va_start(i8* bitcast (i8** @va_list to i8*)) 17 call void @llvm.va_start(i8* bitcast (i8** @va_list to i8*))
18 call void @external_func(i8* bitcast (i8** @va_list to i8*)) 18 call void @external_func(i8* bitcast (i8** @va_list to i8*))
19 ret void 19 ret void
20 } 20 }
21 ; CHECK-LABEL: varargs_func: 21 ; CHECK-LABEL: varargs_func:
22 ; Reserve space for the varargs save area. This currently reserves 22 ; Reserve space for the varargs save area. This currently reserves
23 ; more than enough (16 bytes rather than the 12 bytes needed). 23 ; more than enough (16 bytes rather than the 12 bytes needed).
24 ; CHECK: sub sp, sp, #16 24 ; CHECK: sub sp, sp, #16
25 ; CHECK: push {lr} 25 ; CHECK: push {lr}
26 ; Align the stack pointer to a multiple of 16. 26 ; Align the stack pointer to a multiple of 16.
27 ; CHECK: sub sp, sp, #12 27 ; CHECK: sub sp, sp, #12
28 ; Calculate the address of the varargs save area and save varargs 28 ; Calculate the address of the varargs save area and save varargs
29 ; arguments into it. 29 ; arguments into it.
30 ; CHECK-NEXT: add r0, sp, #20 30 ; @LOCALMOD: Adjust test expectation, removing NEXT to allow CFI
31 ; directive to intervene in the output.
32 ; CHECK: add r0, sp, #20
31 ; CHECK-NEXT: stm r0, {r1, r2, r3} 33 ; CHECK-NEXT: stm r0, {r1, r2, r3}
OLDNEW
« no previous file with comments | « lib/Transforms/NaCl/PromoteIntegers.cpp ('k') | test/NaCl/PNaClLLC/test-runs-verify.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698