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

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

Issue 647443005: Change usage of naclcall and nacljmp pseudo-instructions to match x86 gas (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: remove NACL_call32d and auto-align bare call Created 6 years, 2 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 ;;;;
11 ; Call to a NaCl trampoline (specific addresses). 11 ; Call to a NaCl trampoline (specific addresses).
12 define i32 @call_address() { 12 define i32 @call_address() {
13 entry: 13 entry:
14 call void inttoptr (i32 66496 to void ()*)() 14 call void inttoptr (i32 66496 to void ()*)()
15 ret i32 0 15 ret i32 0
16 } 16 }
17 ; NACL32-LABEL: call_address 17 ; NACL32-LABEL: call_address
18 ; NACL32: naclcall 66496 18 ; NACL32: calll 66496
19 ; NACL32O0-LABEL: call_address 19 ; NACL32O0-LABEL: call_address
20 ; NACL32O0: movl $66496, [[REG:%[a-z0-9]+]] 20 ; NACL32O0: movl $66496, [[REG:%[a-z0-9]+]]
21 ; NACL32O0: naclcall {{.*}}[[REG]] 21 ; NACL32O0: naclcall {{.*}}[[REG]]
22 ; NACL64-LABEL: call_address 22 ; NACL64-LABEL: call_address
23 ; NACL64: movl $66496, [[REG:%[a-z0-9]+]] 23 ; NACL64: movl $66496, [[REG:%[a-z0-9]+]]
24 ; NACL64: naclcall {{.*}}[[REG]],%r15 24 ; NACL64: naclcall {{.*}}[[REG]],%r15
25 25
26 define fastcc i32 @tail_call_address(i32 %arg) { 26 define fastcc i32 @tail_call_address(i32 %arg) {
27 entry: 27 entry:
28 %call1 = tail call fastcc i32 inttoptr (i32 66496 to i32 (i32)*)(i32 %arg) 28 %call1 = tail call fastcc i32 inttoptr (i32 66496 to i32 (i32)*)(i32 %arg)
(...skipping 18 matching lines...) Expand all
47 define internal void @call_other_function() { 47 define internal void @call_other_function() {
48 call void @other_function() 48 call void @other_function()
49 ret void 49 ret void
50 } 50 }
51 51
52 define void @call_other_function2() { 52 define void @call_other_function2() {
53 call void @call_other_function() 53 call void @call_other_function()
54 ret void 54 ret void
55 } 55 }
56 ; NACL32-LABEL: call_other_function 56 ; NACL32-LABEL: call_other_function
57 ; NACL32: naclcall other_function 57 ; NACL32: calll other_function
58 ; NACL32-LABEL: call_other_function2 58 ; NACL32-LABEL: call_other_function2
59 ; NACL32: naclcall call_other_function 59 ; NACL32: calll call_other_function
60 ; NACL32O0-LABEL: call_other_function 60 ; NACL32O0-LABEL: call_other_function
61 ; NACL32O0: naclcall other_function 61 ; NACL32O0: calll other_function
62 ; NACL64-LABEL: call_other_function 62 ; NACL64-LABEL: call_other_function
63 ; NACL64: naclcall other_function 63 ; NACL64: call other_function
64 ; NACL64-LABEL: call_other_function2 64 ; NACL64-LABEL: call_other_function2
65 ; NACL64: naclcall call_other_function 65 ; NACL64: call call_other_function
66 66
67 67
68 declare fastcc i32 @other_function_fast() 68 declare fastcc i32 @other_function_fast()
69 69
70 define internal fastcc i32 @tail_call_other_function() { 70 define internal fastcc i32 @tail_call_other_function() {
71 %i = tail call fastcc i32 @other_function_fast() 71 %i = tail call fastcc i32 @other_function_fast()
72 ret i32 %i 72 ret i32 %i
73 } 73 }
74 74
75 define fastcc i32 @tail_call_other_function2() { 75 define fastcc i32 @tail_call_other_function2() {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
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