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

Side by Side Diff: tests_lit/llvm2ice_tests/64bit.pnacl.ll

Issue 1187513006: ARM: Assign "actuals" at call site to the appropriate GPR/stack slot. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: tpypo Created 5 years, 6 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 ; This tries to be a comprehensive test of i64 operations, in 1 ; This tries to be a comprehensive test of i64 operations, in
2 ; particular the patterns for lowering i64 operations into constituent 2 ; particular the patterns for lowering i64 operations into constituent
3 ; i32 operations on x86-32. 3 ; i32 operations on x86-32.
4 4
5 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ 5 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \
6 ; RUN: --target x8632 -i %s --args -O2 \ 6 ; RUN: --target x8632 -i %s --args -O2 \
7 ; RUN: | %if --need=target_X8632 --command FileCheck %s 7 ; RUN: | %if --need=target_X8632 --command FileCheck %s
8 8
9 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ 9 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \
10 ; RUN: --target x8632 -i %s --args -Om1 \ 10 ; RUN: --target x8632 -i %s --args -Om1 \
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 ; OPTM1: mov DWORD PTR [esp+0xc] 75 ; OPTM1: mov DWORD PTR [esp+0xc]
76 ; OPTM1: call {{.*}} R_{{.*}} ignore64BitArgNoInline 76 ; OPTM1: call {{.*}} R_{{.*}} ignore64BitArgNoInline
77 ; OPTM1: sub esp 77 ; OPTM1: sub esp
78 ; OPTM1: mov DWORD PTR [esp+0x4] 78 ; OPTM1: mov DWORD PTR [esp+0x4]
79 ; OPTM1: mov DWORD PTR [esp] 79 ; OPTM1: mov DWORD PTR [esp]
80 ; OPTM1: mov DWORD PTR [esp+0x8],0x7b 80 ; OPTM1: mov DWORD PTR [esp+0x8],0x7b
81 ; OPTM1: mov DWORD PTR [esp+0x10] 81 ; OPTM1: mov DWORD PTR [esp+0x10]
82 ; OPTM1: mov DWORD PTR [esp+0xc] 82 ; OPTM1: mov DWORD PTR [esp+0xc]
83 ; OPTM1: call {{.*}} R_{{.*}} ignore64BitArgNoInline 83 ; OPTM1: call {{.*}} R_{{.*}} ignore64BitArgNoInline
84 84
85 ; ARM32-LABEL: pass64BitArg
86 ; ARM32: sub sp, {{.*}} #16
87 ; ARM32: str {{.*}}, [sp, #4]
88 ; ARM32: str {{.*}}, [sp]
89 ; ARM32: movw r2, #123
90 ; ARM32: bl {{.*}} ignore64BitArgNoInline
91 ; ARM32: add sp, {{.*}} #16
92 ; ARM32: sub sp, {{.*}} #16
93 ; ARM32: str {{.*}}, [sp, #4]
94 ; ARM32: str {{.*}}, [sp]
95 ; ARM32: mov r0
96 ; ARM32: mov r1
97 ; ARM32: movw r2, #123
98 ; ARM32: bl {{.*}} ignore64BitArgNoInline
99 ; ARM32: add sp, {{.*}} #16
100 ; ARM32: sub sp, {{.*}} #16
101 ; ARM32: str {{.*}}, [sp, #4]
102 ; ARM32: str {{.*}}, [sp]
103 ; ARM32: mov r0
104 ; ARM32: mov r1
105 ; ARM32: movw r2, #123
106 ; ARM32: bl {{.*}} ignore64BitArgNoInline
107 ; ARM32: add sp, {{.*}} #16
108
109
85 declare i32 @ignore64BitArgNoInline(i64, i32, i64) 110 declare i32 @ignore64BitArgNoInline(i64, i32, i64)
86 111
87 define internal i32 @pass64BitConstArg(i64 %a, i64 %b) { 112 define internal i32 @pass64BitConstArg(i64 %a, i64 %b) {
88 entry: 113 entry:
89 %call = call i32 @ignore64BitArgNoInline(i64 %a, i32 123, i64 -240105309230672 5256) 114 %call = call i32 @ignore64BitArgNoInline(i64 %b, i32 123, i64 -240105309230672 5256)
90 ret i32 %call 115 ret i32 %call
91 } 116 }
92 ; CHECK-LABEL: pass64BitConstArg 117 ; CHECK-LABEL: pass64BitConstArg
93 ; CHECK: sub esp 118 ; CHECK: sub esp
94 ; CHECK: mov DWORD PTR [esp+0x4] 119 ; CHECK: mov DWORD PTR [esp+0x4]
95 ; CHECK-NEXT: mov DWORD PTR [esp] 120 ; CHECK-NEXT: mov DWORD PTR [esp]
96 ; CHECK-NEXT: mov DWORD PTR [esp+0x8],0x7b 121 ; CHECK-NEXT: mov DWORD PTR [esp+0x8],0x7b
97 ; Bundle padding might be added (so not using -NEXT). 122 ; Bundle padding might be added (so not using -NEXT).
98 ; CHECK: mov DWORD PTR [esp+0x10],0xdeadbeef 123 ; CHECK: mov DWORD PTR [esp+0x10],0xdeadbeef
99 ; CHECK-NEXT: mov DWORD PTR [esp+0xc],0x12345678 124 ; CHECK-NEXT: mov DWORD PTR [esp+0xc],0x12345678
100 ; Bundle padding will push the call down. 125 ; Bundle padding will push the call down.
101 ; CHECK-NOT: mov 126 ; CHECK-NOT: mov
102 ; CHECK: call {{.*}} R_{{.*}} ignore64BitArgNoInline 127 ; CHECK: call {{.*}} R_{{.*}} ignore64BitArgNoInline
103 ; 128 ;
104 ; OPTM1-LABEL: pass64BitConstArg 129 ; OPTM1-LABEL: pass64BitConstArg
105 ; OPTM1: sub esp 130 ; OPTM1: sub esp
106 ; OPTM1: mov DWORD PTR [esp+0x4] 131 ; OPTM1: mov DWORD PTR [esp+0x4]
107 ; OPTM1-NEXT: mov DWORD PTR [esp] 132 ; OPTM1-NEXT: mov DWORD PTR [esp]
108 ; OPTM1-NEXT: mov DWORD PTR [esp+0x8],0x7b 133 ; OPTM1-NEXT: mov DWORD PTR [esp+0x8],0x7b
109 ; Bundle padding might be added (so not using -NEXT). 134 ; Bundle padding might be added (so not using -NEXT).
110 ; OPTM1: mov DWORD PTR [esp+0x10],0xdeadbeef 135 ; OPTM1: mov DWORD PTR [esp+0x10],0xdeadbeef
111 ; OPTM1-NEXT: mov DWORD PTR [esp+0xc],0x12345678 136 ; OPTM1-NEXT: mov DWORD PTR [esp+0xc],0x12345678
112 ; OPTM1-NOT: mov 137 ; OPTM1-NOT: mov
113 ; OPTM1: call {{.*}} R_{{.*}} ignore64BitArgNoInline 138 ; OPTM1: call {{.*}} R_{{.*}} ignore64BitArgNoInline
114 139
140 ; ARM32-LABEL: pass64BitConstArg
141 ; ARM32: sub sp, {{.*}} #16
142 ; ARM32: movw [[REG1:r.*]], {{.*}} ; 0xbeef
143 ; ARM32: movt [[REG1:r.*]], {{.*}} ; 0xdead
144 ; ARM32: movw [[REG2:r.*]], {{.*}} ; 0x5678
145 ; ARM32: movt [[REG2:r.*]], {{.*}} ; 0x1234
146 ; ARM32: str [[REG1]], [sp, #4]
147 ; ARM32: str [[REG2]], [sp]
148 ; ARM32: mov r0, r2
149 ; ARM32: mov r1, r3
150 ; ARM32: movw r2, #123
151 ; ARM32: bl {{.*}} ignore64BitArgNoInline
152 ; ARM32: add sp, {{.*}} #16
153
115 define internal i64 @return64BitArg(i64 %a) { 154 define internal i64 @return64BitArg(i64 %a) {
116 entry: 155 entry:
117 ret i64 %a 156 ret i64 %a
118 } 157 }
119 ; CHECK-LABEL: return64BitArg 158 ; CHECK-LABEL: return64BitArg
120 ; CHECK: mov {{.*}},DWORD PTR [esp+0x4] 159 ; CHECK: mov {{.*}},DWORD PTR [esp+0x4]
121 ; CHECK: mov {{.*}},DWORD PTR [esp+0x8] 160 ; CHECK: mov {{.*}},DWORD PTR [esp+0x8]
122 ; 161 ;
123 ; OPTM1-LABEL: return64BitArg 162 ; OPTM1-LABEL: return64BitArg
124 ; OPTM1: mov {{.*}},DWORD PTR [esp+0x4] 163 ; OPTM1: mov {{.*}},DWORD PTR [esp+0x4]
(...skipping 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after
1637 ret void 1676 ret void
1638 } 1677 }
1639 ; The following checks are not strictly necessary since one of the RUN 1678 ; The following checks are not strictly necessary since one of the RUN
1640 ; lines actually runs the output through the assembler. 1679 ; lines actually runs the output through the assembler.
1641 ; CHECK-LABEL: icmpLt64Imm 1680 ; CHECK-LABEL: icmpLt64Imm
1642 ; CHECK-NOT: cmp 0x{{[0-9a-f]+}}, 1681 ; CHECK-NOT: cmp 0x{{[0-9a-f]+}},
1643 ; OPTM1-LABEL: icmpLt64Imm 1682 ; OPTM1-LABEL: icmpLt64Imm
1644 ; OPTM1-NOT: cmp 0x{{[0-9a-f]+}}, 1683 ; OPTM1-NOT: cmp 0x{{[0-9a-f]+}},
1645 ; ARM32-LABEL: icmpLt64Imm 1684 ; ARM32-LABEL: icmpLt64Imm
1646 ; ARM32-NOT: cmp #{{[0-9a-f]+}}, 1685 ; ARM32-NOT: cmp #{{[0-9a-f]+}},
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698