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

Side by Side Diff: test/NaCl/X86/nacl-calls.ll

Issue 1151093004: Changes from 3.7 merge to files not in upstream (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Created 5 years, 7 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
OLDNEW
1 ; RUN: pnacl-llc -mtriple=i686-unknown-nacl -filetype=asm %s -o - \ 1 ; RUN: pnacl-llc -mtriple=i686-unknown-nacl -filetype=asm %s -o - \
2 ; RUN: | FileCheck %s --check-prefix=NACL32 2 ; RUN: | FileCheck %s --check-prefix=NACL32
3 ; RUN: pnacl-llc -mtriple=i686-unknown-nacl -filetype=asm -O0 %s -o - \ 3 ; RUN: pnacl-llc -mtriple=i686-unknown-nacl -filetype=asm -O0 %s -o - \
4 ; RUN: | FileCheck %s --check-prefix=NACL32O0 4 ; RUN: | FileCheck %s --check-prefix=NACL32O0
5 ; RUN: pnacl-llc -mtriple=x86_64-unknown-nacl -filetype=asm %s -o - \ 5 ; RUN: pnacl-llc -mtriple=x86_64-unknown-nacl -filetype=asm %s -o - \
6 ; RUN: | FileCheck %s --check-prefix=NACL64 6 ; RUN: | FileCheck %s --check-prefix=NACL64
7 ; RUN: pnacl-llc -mtriple=x86_64-unknown-nacl -filetype=asm -O0 %s -o - \ 7 ; RUN: pnacl-llc -mtriple=x86_64-unknown-nacl -filetype=asm -O0 %s -o - \
8 ; RUN: | FileCheck %s --check-prefix=NACL64 8 ; RUN: | FileCheck %s --check-prefix=NACL64
9 9
10 ;;;; 10 ;;;;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 ; NACL64-LABEL: tail_call_other_function2 89 ; NACL64-LABEL: tail_call_other_function2
90 ; NACL64: jmp tail_call_other_function 90 ; NACL64: jmp tail_call_other_function
91 91
92 ;;;;; 92 ;;;;;
93 ; Indirect call, but not a specific address. 93 ; Indirect call, but not a specific address.
94 94
95 @fp = external global i32 (i32)* 95 @fp = external global i32 (i32)*
96 96
97 ; With a load. 97 ; With a load.
98 define i32 @call_indirect() { 98 define i32 @call_indirect() {
99 %1 = load i32 (i32)** @fp, align 4 99 %1 = load i32 (i32)*, i32 (i32)** @fp, align 4
100 %call1 = call i32 %1(i32 10) 100 %call1 = call i32 %1(i32 10)
101 ret i32 %call1 101 ret i32 %call1
102 } 102 }
103 ; NACL32-LABEL: call_indirect 103 ; NACL32-LABEL: call_indirect
104 ; NACL32: movl fp, [[REG:%[a-z0-9]+]] 104 ; NACL32: movl fp, [[REG:%[a-z0-9]+]]
105 ; NACL32: naclcall {{.*}}[[REG]] 105 ; NACL32: naclcall {{.*}}[[REG]]
106 ; NACL32O0-LABEL: call_indirect 106 ; NACL32O0-LABEL: call_indirect
107 ; NACL32O0: movl fp, [[REG:%[a-z0-9]+]] 107 ; NACL32O0: movl fp, [[REG:%[a-z0-9]+]]
108 ; NACL32O0: naclcall {{.*}}[[REG]] 108 ; NACL32O0: naclcall {{.*}}[[REG]]
109 ; NACL64-LABEL: call_indirect 109 ; NACL64-LABEL: call_indirect
110 ; NACL64: movl fp({{.*}}), %{{.*}} 110 ; NACL64: movl fp({{.*}}), %{{.*}}
111 ; NACL64: naclcall %{{.*}},%r15 111 ; NACL64: naclcall %{{.*}},%r15
112 112
113 define fastcc i32 @tail_call_indirect() { 113 define fastcc i32 @tail_call_indirect() {
114 %1 = load i32 (i32)** @fp, align 4 114 %1 = load i32 (i32)*, i32 (i32)** @fp, align 4
115 %call1 = tail call fastcc i32 %1(i32 10) 115 %call1 = tail call fastcc i32 %1(i32 10)
116 ret i32 %call1 116 ret i32 %call1
117 } 117 }
118 ; NACL32-LABEL: tail_call_indirect 118 ; NACL32-LABEL: tail_call_indirect
119 ; NACL32: movl fp, [[REG:%[a-z0-9]+]] 119 ; NACL32: movl fp, [[REG:%[a-z0-9]+]]
120 ; NACL32: nacljmp {{.*}}[[REG]] 120 ; NACL32: nacljmp {{.*}}[[REG]]
121 ; NACL32O0-LABEL: tail_call_indirect 121 ; NACL32O0-LABEL: tail_call_indirect
122 ; NACL32O0: movl fp, [[REG:%[a-z0-9]+]] 122 ; NACL32O0: movl fp, [[REG:%[a-z0-9]+]]
123 ; NACL32O0: nacljmp {{.*}}[[REG]] 123 ; NACL32O0: nacljmp {{.*}}[[REG]]
124 ; NACL64-LABEL: tail_call_indirect 124 ; NACL64-LABEL: tail_call_indirect
(...skipping 15 matching lines...) Expand all
140 define fastcc i32 @tail_call_indirect_arg(i32 ()* %argfp) { 140 define fastcc i32 @tail_call_indirect_arg(i32 ()* %argfp) {
141 %call1 = tail call fastcc i32 %argfp() 141 %call1 = tail call fastcc i32 %argfp()
142 ret i32 %call1 142 ret i32 %call1
143 } 143 }
144 ; NACL32-LABEL: tail_call_indirect_arg 144 ; NACL32-LABEL: tail_call_indirect_arg
145 ; NACL32: nacljmp {{%[a-z0-9]+}} 145 ; NACL32: nacljmp {{%[a-z0-9]+}}
146 ; NACL32O0-LABEL: tail_call_indirect_arg 146 ; NACL32O0-LABEL: tail_call_indirect_arg
147 ; NACL32O0: nacljmp {{%[a-z0-9]+}} 147 ; NACL32O0: nacljmp {{%[a-z0-9]+}}
148 ; NACL64-LABEL: tail_call_indirect_arg 148 ; NACL64-LABEL: tail_call_indirect_arg
149 ; NACL64: nacljmp {{%[a-z0-9]+}}, %r15 149 ; NACL64: nacljmp {{%[a-z0-9]+}}, %r15
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698