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

Side by Side Diff: test/cctest/test-disasm-mips64.cc

Issue 371923006: Add mips64 port. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-code-stubs-mips64.cc ('k') | test/cctest/test-hashing.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 if (failure) { \ 91 if (failure) { \
92 V8_Fatal(__FILE__, __LINE__, "MIPS Disassembler tests failed.\n"); \ 92 V8_Fatal(__FILE__, __LINE__, "MIPS Disassembler tests failed.\n"); \
93 } 93 }
94 94
95 95
96 TEST(Type0) { 96 TEST(Type0) {
97 SET_UP(); 97 SET_UP();
98 98
99 COMPARE(addu(a0, a1, a2), 99 COMPARE(addu(a0, a1, a2),
100 "00a62021 addu a0, a1, a2"); 100 "00a62021 addu a0, a1, a2");
101 COMPARE(addu(t2, t3, t4), 101 COMPARE(daddu(a0, a1, a2),
102 "016c5021 addu t2, t3, t4"); 102 "00a6202d daddu a0, a1, a2");
103 COMPARE(addu(a6, a7, t0),
104 "016c5021 addu a6, a7, t0");
105 COMPARE(daddu(a6, a7, t0),
106 "016c502d daddu a6, a7, t0");
103 COMPARE(addu(v0, v1, s0), 107 COMPARE(addu(v0, v1, s0),
104 "00701021 addu v0, v1, s0"); 108 "00701021 addu v0, v1, s0");
109 COMPARE(daddu(v0, v1, s0),
110 "0070102d daddu v0, v1, s0");
105 111
106 COMPARE(subu(a0, a1, a2), 112 COMPARE(subu(a0, a1, a2),
107 "00a62023 subu a0, a1, a2"); 113 "00a62023 subu a0, a1, a2");
108 COMPARE(subu(t2, t3, t4), 114 COMPARE(dsubu(a0, a1, a2),
109 "016c5023 subu t2, t3, t4"); 115 "00a6202f dsubu a0, a1, a2");
116 COMPARE(subu(a6, a7, t0),
117 "016c5023 subu a6, a7, t0");
118 COMPARE(dsubu(a6, a7, t0),
119 "016c502f dsubu a6, a7, t0");
110 COMPARE(subu(v0, v1, s0), 120 COMPARE(subu(v0, v1, s0),
111 "00701023 subu v0, v1, s0"); 121 "00701023 subu v0, v1, s0");
122 COMPARE(dsubu(v0, v1, s0),
123 "0070102f dsubu v0, v1, s0");
112 124
113 COMPARE(mult(a0, a1), 125 COMPARE(mult(a0, a1),
114 "00850018 mult a0, a1"); 126 "00850018 mult a0, a1");
115 COMPARE(mult(t2, t3), 127 COMPARE(dmult(a0, a1),
116 "014b0018 mult t2, t3"); 128 "0085001c dmult a0, a1");
129 COMPARE(mult(a6, a7),
130 "014b0018 mult a6, a7");
131 COMPARE(dmult(a6, a7),
132 "014b001c dmult a6, a7");
117 COMPARE(mult(v0, v1), 133 COMPARE(mult(v0, v1),
118 "00430018 mult v0, v1"); 134 "00430018 mult v0, v1");
135 COMPARE(dmult(v0, v1),
136 "0043001c dmult v0, v1");
119 137
120 COMPARE(multu(a0, a1), 138 COMPARE(multu(a0, a1),
121 "00850019 multu a0, a1"); 139 "00850019 multu a0, a1");
122 COMPARE(multu(t2, t3), 140 COMPARE(dmultu(a0, a1),
123 "014b0019 multu t2, t3"); 141 "0085001d dmultu a0, a1");
142 COMPARE(multu(a6, a7),
143 "014b0019 multu a6, a7");
144 COMPARE(dmultu(a6, a7),
145 "014b001d dmultu a6, a7");
124 COMPARE(multu(v0, v1), 146 COMPARE(multu(v0, v1),
125 "00430019 multu v0, v1"); 147 "00430019 multu v0, v1");
148 COMPARE(dmultu(v0, v1),
149 "0043001d dmultu v0, v1");
126 150
127 COMPARE(div(a0, a1), 151 COMPARE(div(a0, a1),
128 "0085001a div a0, a1"); 152 "0085001a div a0, a1");
129 COMPARE(div(t2, t3), 153 COMPARE(div(a6, a7),
130 "014b001a div t2, t3"); 154 "014b001a div a6, a7");
131 COMPARE(div(v0, v1), 155 COMPARE(div(v0, v1),
132 "0043001a div v0, v1"); 156 "0043001a div v0, v1");
157 COMPARE(ddiv(a0, a1),
158 "0085001e ddiv a0, a1");
159 COMPARE(ddiv(a6, a7),
160 "014b001e ddiv a6, a7");
161 COMPARE(ddiv(v0, v1),
162 "0043001e ddiv v0, v1");
133 163
134 COMPARE(divu(a0, a1), 164 COMPARE(divu(a0, a1),
135 "0085001b divu a0, a1"); 165 "0085001b divu a0, a1");
136 COMPARE(divu(t2, t3), 166 COMPARE(divu(a6, a7),
137 "014b001b divu t2, t3"); 167 "014b001b divu a6, a7");
138 COMPARE(divu(v0, v1), 168 COMPARE(divu(v0, v1),
139 "0043001b divu v0, v1"); 169 "0043001b divu v0, v1");
170 COMPARE(ddivu(a0, a1),
171 "0085001f ddivu a0, a1");
172 COMPARE(ddivu(a6, a7),
173 "014b001f ddivu a6, a7");
174 COMPARE(ddivu(v0, v1),
175 "0043001f ddivu v0, v1");
140 176
141 if (kArchVariant != kLoongson) { 177 if (kArchVariant != kLoongson) {
142 COMPARE(mul(a0, a1, a2), 178 COMPARE(mul(a0, a1, a2),
143 "70a62002 mul a0, a1, a2"); 179 "70a62002 mul a0, a1, a2");
144 COMPARE(mul(t2, t3, t4), 180 COMPARE(mul(a6, a7, t0),
145 "716c5002 mul t2, t3, t4"); 181 "716c5002 mul a6, a7, t0");
146 COMPARE(mul(v0, v1, s0), 182 COMPARE(mul(v0, v1, s0),
147 "70701002 mul v0, v1, s0"); 183 "70701002 mul v0, v1, s0");
148 } 184 }
149 185
150 COMPARE(addiu(a0, a1, 0x0), 186 COMPARE(addiu(a0, a1, 0x0),
151 "24a40000 addiu a0, a1, 0"); 187 "24a40000 addiu a0, a1, 0");
152 COMPARE(addiu(s0, s1, 32767), 188 COMPARE(addiu(s0, s1, 32767),
153 "26307fff addiu s0, s1, 32767"); 189 "26307fff addiu s0, s1, 32767");
154 COMPARE(addiu(t2, t3, -32768), 190 COMPARE(addiu(a6, a7, -32768),
155 "256a8000 addiu t2, t3, -32768"); 191 "256a8000 addiu a6, a7, -32768");
156 COMPARE(addiu(v0, v1, -1), 192 COMPARE(addiu(v0, v1, -1),
157 "2462ffff addiu v0, v1, -1"); 193 "2462ffff addiu v0, v1, -1");
194 COMPARE(daddiu(a0, a1, 0x0),
195 "64a40000 daddiu a0, a1, 0");
196 COMPARE(daddiu(s0, s1, 32767),
197 "66307fff daddiu s0, s1, 32767");
198 COMPARE(daddiu(a6, a7, -32768),
199 "656a8000 daddiu a6, a7, -32768");
200 COMPARE(daddiu(v0, v1, -1),
201 "6462ffff daddiu v0, v1, -1");
158 202
159 COMPARE(and_(a0, a1, a2), 203 COMPARE(and_(a0, a1, a2),
160 "00a62024 and a0, a1, a2"); 204 "00a62024 and a0, a1, a2");
161 COMPARE(and_(s0, s1, s2), 205 COMPARE(and_(s0, s1, s2),
162 "02328024 and s0, s1, s2"); 206 "02328024 and s0, s1, s2");
163 COMPARE(and_(t2, t3, t4), 207 COMPARE(and_(a6, a7, t0),
164 "016c5024 and t2, t3, t4"); 208 "016c5024 and a6, a7, t0");
165 COMPARE(and_(v0, v1, a2), 209 COMPARE(and_(v0, v1, a2),
166 "00661024 and v0, v1, a2"); 210 "00661024 and v0, v1, a2");
167 211
168 COMPARE(or_(a0, a1, a2), 212 COMPARE(or_(a0, a1, a2),
169 "00a62025 or a0, a1, a2"); 213 "00a62025 or a0, a1, a2");
170 COMPARE(or_(s0, s1, s2), 214 COMPARE(or_(s0, s1, s2),
171 "02328025 or s0, s1, s2"); 215 "02328025 or s0, s1, s2");
172 COMPARE(or_(t2, t3, t4), 216 COMPARE(or_(a6, a7, t0),
173 "016c5025 or t2, t3, t4"); 217 "016c5025 or a6, a7, t0");
174 COMPARE(or_(v0, v1, a2), 218 COMPARE(or_(v0, v1, a2),
175 "00661025 or v0, v1, a2"); 219 "00661025 or v0, v1, a2");
176 220
177 COMPARE(xor_(a0, a1, a2), 221 COMPARE(xor_(a0, a1, a2),
178 "00a62026 xor a0, a1, a2"); 222 "00a62026 xor a0, a1, a2");
179 COMPARE(xor_(s0, s1, s2), 223 COMPARE(xor_(s0, s1, s2),
180 "02328026 xor s0, s1, s2"); 224 "02328026 xor s0, s1, s2");
181 COMPARE(xor_(t2, t3, t4), 225 COMPARE(xor_(a6, a7, t0),
182 "016c5026 xor t2, t3, t4"); 226 "016c5026 xor a6, a7, t0");
183 COMPARE(xor_(v0, v1, a2), 227 COMPARE(xor_(v0, v1, a2),
184 "00661026 xor v0, v1, a2"); 228 "00661026 xor v0, v1, a2");
185 229
186 COMPARE(nor(a0, a1, a2), 230 COMPARE(nor(a0, a1, a2),
187 "00a62027 nor a0, a1, a2"); 231 "00a62027 nor a0, a1, a2");
188 COMPARE(nor(s0, s1, s2), 232 COMPARE(nor(s0, s1, s2),
189 "02328027 nor s0, s1, s2"); 233 "02328027 nor s0, s1, s2");
190 COMPARE(nor(t2, t3, t4), 234 COMPARE(nor(a6, a7, t0),
191 "016c5027 nor t2, t3, t4"); 235 "016c5027 nor a6, a7, t0");
192 COMPARE(nor(v0, v1, a2), 236 COMPARE(nor(v0, v1, a2),
193 "00661027 nor v0, v1, a2"); 237 "00661027 nor v0, v1, a2");
194 238
195 COMPARE(andi(a0, a1, 0x1), 239 COMPARE(andi(a0, a1, 0x1),
196 "30a40001 andi a0, a1, 0x1"); 240 "30a40001 andi a0, a1, 0x1");
197 COMPARE(andi(v0, v1, 0xffff), 241 COMPARE(andi(v0, v1, 0xffff),
198 "3062ffff andi v0, v1, 0xffff"); 242 "3062ffff andi v0, v1, 0xffff");
199 243
200 COMPARE(ori(a0, a1, 0x1), 244 COMPARE(ori(a0, a1, 0x1),
201 "34a40001 ori a0, a1, 0x1"); 245 "34a40001 ori a0, a1, 0x1");
202 COMPARE(ori(v0, v1, 0xffff), 246 COMPARE(ori(v0, v1, 0xffff),
203 "3462ffff ori v0, v1, 0xffff"); 247 "3462ffff ori v0, v1, 0xffff");
204 248
205 COMPARE(xori(a0, a1, 0x1), 249 COMPARE(xori(a0, a1, 0x1),
206 "38a40001 xori a0, a1, 0x1"); 250 "38a40001 xori a0, a1, 0x1");
207 COMPARE(xori(v0, v1, 0xffff), 251 COMPARE(xori(v0, v1, 0xffff),
208 "3862ffff xori v0, v1, 0xffff"); 252 "3862ffff xori v0, v1, 0xffff");
209 253
210 COMPARE(lui(a0, 0x1), 254 COMPARE(lui(a0, 0x1),
211 "3c040001 lui a0, 0x1"); 255 "3c040001 lui a0, 0x1");
212 COMPARE(lui(v0, 0xffff), 256 COMPARE(lui(v0, 0xffff),
213 "3c02ffff lui v0, 0xffff"); 257 "3c02ffff lui v0, 0xffff");
214 258
215 COMPARE(sll(a0, a1, 0), 259 COMPARE(sll(a0, a1, 0),
216 "00052000 sll a0, a1, 0"); 260 "00052000 sll a0, a1, 0");
217 COMPARE(sll(s0, s1, 8), 261 COMPARE(sll(s0, s1, 8),
218 "00118200 sll s0, s1, 8"); 262 "00118200 sll s0, s1, 8");
219 COMPARE(sll(t2, t3, 24), 263 COMPARE(sll(a6, a7, 24),
220 "000b5600 sll t2, t3, 24"); 264 "000b5600 sll a6, a7, 24");
221 COMPARE(sll(v0, v1, 31), 265 COMPARE(sll(v0, v1, 31),
222 "000317c0 sll v0, v1, 31"); 266 "000317c0 sll v0, v1, 31");
267 COMPARE(dsll(a0, a1, 0),
268 "00052038 dsll a0, a1, 0");
269 COMPARE(dsll(s0, s1, 8),
270 "00118238 dsll s0, s1, 8");
271 COMPARE(dsll(a6, a7, 24),
272 "000b5638 dsll a6, a7, 24");
273 COMPARE(dsll(v0, v1, 31),
274 "000317f8 dsll v0, v1, 31");
223 275
224 COMPARE(sllv(a0, a1, a2), 276 COMPARE(sllv(a0, a1, a2),
225 "00c52004 sllv a0, a1, a2"); 277 "00c52004 sllv a0, a1, a2");
226 COMPARE(sllv(s0, s1, s2), 278 COMPARE(sllv(s0, s1, s2),
227 "02518004 sllv s0, s1, s2"); 279 "02518004 sllv s0, s1, s2");
228 COMPARE(sllv(t2, t3, t4), 280 COMPARE(sllv(a6, a7, t0),
229 "018b5004 sllv t2, t3, t4"); 281 "018b5004 sllv a6, a7, t0");
230 COMPARE(sllv(v0, v1, fp), 282 COMPARE(sllv(v0, v1, fp),
231 "03c31004 sllv v0, v1, fp"); 283 "03c31004 sllv v0, v1, fp");
284 COMPARE(dsllv(a0, a1, a2),
285 "00c52014 dsllv a0, a1, a2");
286 COMPARE(dsllv(s0, s1, s2),
287 "02518014 dsllv s0, s1, s2");
288 COMPARE(dsllv(a6, a7, t0),
289 "018b5014 dsllv a6, a7, t0");
290 COMPARE(dsllv(v0, v1, fp),
291 "03c31014 dsllv v0, v1, fp");
232 292
233 COMPARE(srl(a0, a1, 0), 293 COMPARE(srl(a0, a1, 0),
234 "00052002 srl a0, a1, 0"); 294 "00052002 srl a0, a1, 0");
235 COMPARE(srl(s0, s1, 8), 295 COMPARE(srl(s0, s1, 8),
236 "00118202 srl s0, s1, 8"); 296 "00118202 srl s0, s1, 8");
237 COMPARE(srl(t2, t3, 24), 297 COMPARE(srl(a6, a7, 24),
238 "000b5602 srl t2, t3, 24"); 298 "000b5602 srl a6, a7, 24");
239 COMPARE(srl(v0, v1, 31), 299 COMPARE(srl(v0, v1, 31),
240 "000317c2 srl v0, v1, 31"); 300 "000317c2 srl v0, v1, 31");
301 COMPARE(dsrl(a0, a1, 0),
302 "0005203a dsrl a0, a1, 0");
303 COMPARE(dsrl(s0, s1, 8),
304 "0011823a dsrl s0, s1, 8");
305 COMPARE(dsrl(a6, a7, 24),
306 "000b563a dsrl a6, a7, 24");
307 COMPARE(dsrl(v0, v1, 31),
308 "000317fa dsrl v0, v1, 31");
241 309
242 COMPARE(srlv(a0, a1, a2), 310 COMPARE(srlv(a0, a1, a2),
243 "00c52006 srlv a0, a1, a2"); 311 "00c52006 srlv a0, a1, a2");
244 COMPARE(srlv(s0, s1, s2), 312 COMPARE(srlv(s0, s1, s2),
245 "02518006 srlv s0, s1, s2"); 313 "02518006 srlv s0, s1, s2");
246 COMPARE(srlv(t2, t3, t4), 314 COMPARE(srlv(a6, a7, t0),
247 "018b5006 srlv t2, t3, t4"); 315 "018b5006 srlv a6, a7, t0");
248 COMPARE(srlv(v0, v1, fp), 316 COMPARE(srlv(v0, v1, fp),
249 "03c31006 srlv v0, v1, fp"); 317 "03c31006 srlv v0, v1, fp");
318 COMPARE(dsrlv(a0, a1, a2),
319 "00c52016 dsrlv a0, a1, a2");
320 COMPARE(dsrlv(s0, s1, s2),
321 "02518016 dsrlv s0, s1, s2");
322 COMPARE(dsrlv(a6, a7, t0),
323 "018b5016 dsrlv a6, a7, t0");
324 COMPARE(dsrlv(v0, v1, fp),
325 "03c31016 dsrlv v0, v1, fp");
250 326
251 COMPARE(sra(a0, a1, 0), 327 COMPARE(sra(a0, a1, 0),
252 "00052003 sra a0, a1, 0"); 328 "00052003 sra a0, a1, 0");
253 COMPARE(sra(s0, s1, 8), 329 COMPARE(sra(s0, s1, 8),
254 "00118203 sra s0, s1, 8"); 330 "00118203 sra s0, s1, 8");
255 COMPARE(sra(t2, t3, 24), 331 COMPARE(sra(a6, a7, 24),
256 "000b5603 sra t2, t3, 24"); 332 "000b5603 sra a6, a7, 24");
257 COMPARE(sra(v0, v1, 31), 333 COMPARE(sra(v0, v1, 31),
258 "000317c3 sra v0, v1, 31"); 334 "000317c3 sra v0, v1, 31");
335 COMPARE(dsra(a0, a1, 0),
336 "0005203b dsra a0, a1, 0");
337 COMPARE(dsra(s0, s1, 8),
338 "0011823b dsra s0, s1, 8");
339 COMPARE(dsra(a6, a7, 24),
340 "000b563b dsra a6, a7, 24");
341 COMPARE(dsra(v0, v1, 31),
342 "000317fb dsra v0, v1, 31");
259 343
260 COMPARE(srav(a0, a1, a2), 344 COMPARE(srav(a0, a1, a2),
261 "00c52007 srav a0, a1, a2"); 345 "00c52007 srav a0, a1, a2");
262 COMPARE(srav(s0, s1, s2), 346 COMPARE(srav(s0, s1, s2),
263 "02518007 srav s0, s1, s2"); 347 "02518007 srav s0, s1, s2");
264 COMPARE(srav(t2, t3, t4), 348 COMPARE(srav(a6, a7, t0),
265 "018b5007 srav t2, t3, t4"); 349 "018b5007 srav a6, a7, t0");
266 COMPARE(srav(v0, v1, fp), 350 COMPARE(srav(v0, v1, fp),
267 "03c31007 srav v0, v1, fp"); 351 "03c31007 srav v0, v1, fp");
352 COMPARE(dsrav(a0, a1, a2),
353 "00c52017 dsrav a0, a1, a2");
354 COMPARE(dsrav(s0, s1, s2),
355 "02518017 dsrav s0, s1, s2");
356 COMPARE(dsrav(a6, a7, t0),
357 "018b5017 dsrav a6, a7, t0");
358 COMPARE(dsrav(v0, v1, fp),
359 "03c31017 dsrav v0, v1, fp");
268 360
269 if (kArchVariant == kMips32r2) { 361 if (kArchVariant == kMips64r2) {
270 COMPARE(rotr(a0, a1, 0), 362 COMPARE(rotr(a0, a1, 0),
271 "00252002 rotr a0, a1, 0"); 363 "00252002 rotr a0, a1, 0");
272 COMPARE(rotr(s0, s1, 8), 364 COMPARE(rotr(s0, s1, 8),
273 "00318202 rotr s0, s1, 8"); 365 "00318202 rotr s0, s1, 8");
274 COMPARE(rotr(t2, t3, 24), 366 COMPARE(rotr(a6, a7, 24),
275 "002b5602 rotr t2, t3, 24"); 367 "002b5602 rotr a6, a7, 24");
276 COMPARE(rotr(v0, v1, 31), 368 COMPARE(rotr(v0, v1, 31),
277 "002317c2 rotr v0, v1, 31"); 369 "002317c2 rotr v0, v1, 31");
370 COMPARE(drotr(a0, a1, 0),
371 "0025203a drotr a0, a1, 0");
372 COMPARE(drotr(s0, s1, 8),
373 "0031823a drotr s0, s1, 8");
374 COMPARE(drotr(a6, a7, 24),
375 "002b563a drotr a6, a7, 24");
376 COMPARE(drotr(v0, v1, 31),
377 "002317fa drotr v0, v1, 31");
278 378
279 COMPARE(rotrv(a0, a1, a2), 379 COMPARE(rotrv(a0, a1, a2),
280 "00c52046 rotrv a0, a1, a2"); 380 "00c52046 rotrv a0, a1, a2");
281 COMPARE(rotrv(s0, s1, s2), 381 COMPARE(rotrv(s0, s1, s2),
282 "02518046 rotrv s0, s1, s2"); 382 "02518046 rotrv s0, s1, s2");
283 COMPARE(rotrv(t2, t3, t4), 383 COMPARE(rotrv(a6, a7, t0),
284 "018b5046 rotrv t2, t3, t4"); 384 "018b5046 rotrv a6, a7, t0");
285 COMPARE(rotrv(v0, v1, fp), 385 COMPARE(rotrv(v0, v1, fp),
286 "03c31046 rotrv v0, v1, fp"); 386 "03c31046 rotrv v0, v1, fp");
387 COMPARE(drotrv(a0, a1, a2),
388 "00c52056 drotrv a0, a1, a2");
389 COMPARE(drotrv(s0, s1, s2),
390 "02518056 drotrv s0, s1, s2");
391 COMPARE(drotrv(a6, a7, t0),
392 "018b5056 drotrv a6, a7, t0");
393 COMPARE(drotrv(v0, v1, fp),
394 "03c31056 drotrv v0, v1, fp");
287 } 395 }
288 396
289 COMPARE(break_(0), 397 COMPARE(break_(0),
290 "0000000d break, code: 0x00000 (0)"); 398 "0000000d break, code: 0x00000 (0)");
291 COMPARE(break_(261120), 399 COMPARE(break_(261120),
292 "00ff000d break, code: 0x3fc00 (261120)"); 400 "00ff000d break, code: 0x3fc00 (261120)");
293 COMPARE(break_(1047552), 401 COMPARE(break_(1047552),
294 "03ff000d break, code: 0xffc00 (1047552)"); 402 "03ff000d break, code: 0xffc00 (1047552)");
295 403
296 COMPARE(tge(a0, a1, 0), 404 COMPARE(tge(a0, a1, 0),
(...skipping 18 matching lines...) Expand all
315 "0211fff4 teq s0, s1, code: 0x3ff"); 423 "0211fff4 teq s0, s1, code: 0x3ff");
316 COMPARE(tne(a0, a1, 0), 424 COMPARE(tne(a0, a1, 0),
317 "00850036 tne a0, a1, code: 0x000"); 425 "00850036 tne a0, a1, code: 0x000");
318 COMPARE(tne(s0, s1, 1023), 426 COMPARE(tne(s0, s1, 1023),
319 "0211fff6 tne s0, s1, code: 0x3ff"); 427 "0211fff6 tne s0, s1, code: 0x3ff");
320 428
321 COMPARE(mfhi(a0), 429 COMPARE(mfhi(a0),
322 "00002010 mfhi a0"); 430 "00002010 mfhi a0");
323 COMPARE(mfhi(s2), 431 COMPARE(mfhi(s2),
324 "00009010 mfhi s2"); 432 "00009010 mfhi s2");
325 COMPARE(mfhi(t4), 433 COMPARE(mfhi(t0),
326 "00006010 mfhi t4"); 434 "00006010 mfhi t0");
327 COMPARE(mfhi(v1), 435 COMPARE(mfhi(v1),
328 "00001810 mfhi v1"); 436 "00001810 mfhi v1");
329 COMPARE(mflo(a0), 437 COMPARE(mflo(a0),
330 "00002012 mflo a0"); 438 "00002012 mflo a0");
331 COMPARE(mflo(s2), 439 COMPARE(mflo(s2),
332 "00009012 mflo s2"); 440 "00009012 mflo s2");
333 COMPARE(mflo(t4), 441 COMPARE(mflo(t0),
334 "00006012 mflo t4"); 442 "00006012 mflo t0");
335 COMPARE(mflo(v1), 443 COMPARE(mflo(v1),
336 "00001812 mflo v1"); 444 "00001812 mflo v1");
337 445
338 COMPARE(slt(a0, a1, a2), 446 COMPARE(slt(a0, a1, a2),
339 "00a6202a slt a0, a1, a2"); 447 "00a6202a slt a0, a1, a2");
340 COMPARE(slt(s0, s1, s2), 448 COMPARE(slt(s0, s1, s2),
341 "0232802a slt s0, s1, s2"); 449 "0232802a slt s0, s1, s2");
342 COMPARE(slt(t2, t3, t4), 450 COMPARE(slt(a6, a7, t0),
343 "016c502a slt t2, t3, t4"); 451 "016c502a slt a6, a7, t0");
344 COMPARE(slt(v0, v1, a2), 452 COMPARE(slt(v0, v1, a2),
345 "0066102a slt v0, v1, a2"); 453 "0066102a slt v0, v1, a2");
346 COMPARE(sltu(a0, a1, a2), 454 COMPARE(sltu(a0, a1, a2),
347 "00a6202b sltu a0, a1, a2"); 455 "00a6202b sltu a0, a1, a2");
348 COMPARE(sltu(s0, s1, s2), 456 COMPARE(sltu(s0, s1, s2),
349 "0232802b sltu s0, s1, s2"); 457 "0232802b sltu s0, s1, s2");
350 COMPARE(sltu(t2, t3, t4), 458 COMPARE(sltu(a6, a7, t0),
351 "016c502b sltu t2, t3, t4"); 459 "016c502b sltu a6, a7, t0");
352 COMPARE(sltu(v0, v1, a2), 460 COMPARE(sltu(v0, v1, a2),
353 "0066102b sltu v0, v1, a2"); 461 "0066102b sltu v0, v1, a2");
354 462
355 COMPARE(slti(a0, a1, 0), 463 COMPARE(slti(a0, a1, 0),
356 "28a40000 slti a0, a1, 0"); 464 "28a40000 slti a0, a1, 0");
357 COMPARE(slti(s0, s1, 32767), 465 COMPARE(slti(s0, s1, 32767),
358 "2a307fff slti s0, s1, 32767"); 466 "2a307fff slti s0, s1, 32767");
359 COMPARE(slti(t2, t3, -32768), 467 COMPARE(slti(a6, a7, -32768),
360 "296a8000 slti t2, t3, -32768"); 468 "296a8000 slti a6, a7, -32768");
361 COMPARE(slti(v0, v1, -1), 469 COMPARE(slti(v0, v1, -1),
362 "2862ffff slti v0, v1, -1"); 470 "2862ffff slti v0, v1, -1");
363 COMPARE(sltiu(a0, a1, 0), 471 COMPARE(sltiu(a0, a1, 0),
364 "2ca40000 sltiu a0, a1, 0"); 472 "2ca40000 sltiu a0, a1, 0");
365 COMPARE(sltiu(s0, s1, 32767), 473 COMPARE(sltiu(s0, s1, 32767),
366 "2e307fff sltiu s0, s1, 32767"); 474 "2e307fff sltiu s0, s1, 32767");
367 COMPARE(sltiu(t2, t3, -32768), 475 COMPARE(sltiu(a6, a7, -32768),
368 "2d6a8000 sltiu t2, t3, -32768"); 476 "2d6a8000 sltiu a6, a7, -32768");
369 COMPARE(sltiu(v0, v1, -1), 477 COMPARE(sltiu(v0, v1, -1),
370 "2c62ffff sltiu v0, v1, -1"); 478 "2c62ffff sltiu v0, v1, -1");
371 479
372 if (kArchVariant != kLoongson) { 480 if (kArchVariant != kLoongson) {
373 COMPARE(movz(a0, a1, a2), 481 COMPARE(movz(a0, a1, a2),
374 "00a6200a movz a0, a1, a2"); 482 "00a6200a movz a0, a1, a2");
375 COMPARE(movz(s0, s1, s2), 483 COMPARE(movz(s0, s1, s2),
376 "0232800a movz s0, s1, s2"); 484 "0232800a movz s0, s1, s2");
377 COMPARE(movz(t2, t3, t4), 485 COMPARE(movz(a6, a7, t0),
378 "016c500a movz t2, t3, t4"); 486 "016c500a movz a6, a7, t0");
379 COMPARE(movz(v0, v1, a2), 487 COMPARE(movz(v0, v1, a2),
380 "0066100a movz v0, v1, a2"); 488 "0066100a movz v0, v1, a2");
381 COMPARE(movn(a0, a1, a2), 489 COMPARE(movn(a0, a1, a2),
382 "00a6200b movn a0, a1, a2"); 490 "00a6200b movn a0, a1, a2");
383 COMPARE(movn(s0, s1, s2), 491 COMPARE(movn(s0, s1, s2),
384 "0232800b movn s0, s1, s2"); 492 "0232800b movn s0, s1, s2");
385 COMPARE(movn(t2, t3, t4), 493 COMPARE(movn(a6, a7, t0),
386 "016c500b movn t2, t3, t4"); 494 "016c500b movn a6, a7, t0");
387 COMPARE(movn(v0, v1, a2), 495 COMPARE(movn(v0, v1, a2),
388 "0066100b movn v0, v1, a2"); 496 "0066100b movn v0, v1, a2");
389 497
390 COMPARE(movt(a0, a1, 1), 498 COMPARE(movt(a0, a1, 1),
391 "00a52001 movt a0, a1, 1"); 499 "00a52001 movt a0, a1, 1");
392 COMPARE(movt(s0, s1, 2), 500 COMPARE(movt(s0, s1, 2),
393 "02298001 movt s0, s1, 2"); 501 "02298001 movt s0, s1, 2");
394 COMPARE(movt(t2, t3, 3), 502 COMPARE(movt(a6, a7, 3),
395 "016d5001 movt t2, t3, 3"); 503 "016d5001 movt a6, a7, 3");
396 COMPARE(movt(v0, v1, 7), 504 COMPARE(movt(v0, v1, 7),
397 "007d1001 movt v0, v1, 7"); 505 "007d1001 movt v0, v1, 7");
398 COMPARE(movf(a0, a1, 0), 506 COMPARE(movf(a0, a1, 0),
399 "00a02001 movf a0, a1, 0"); 507 "00a02001 movf a0, a1, 0");
400 COMPARE(movf(s0, s1, 4), 508 COMPARE(movf(s0, s1, 4),
401 "02308001 movf s0, s1, 4"); 509 "02308001 movf s0, s1, 4");
402 COMPARE(movf(t2, t3, 5), 510 COMPARE(movf(a6, a7, 5),
403 "01745001 movf t2, t3, 5"); 511 "01745001 movf a6, a7, 5");
404 COMPARE(movf(v0, v1, 6), 512 COMPARE(movf(v0, v1, 6),
405 "00781001 movf v0, v1, 6"); 513 "00781001 movf v0, v1, 6");
406 514
407 COMPARE(clz(a0, a1), 515 COMPARE(clz(a0, a1),
408 "70a42020 clz a0, a1"); 516 "70a42020 clz a0, a1");
409 COMPARE(clz(s6, s7), 517 COMPARE(clz(s6, s7),
410 "72f6b020 clz s6, s7"); 518 "72f6b020 clz s6, s7");
411 COMPARE(clz(v0, v1), 519 COMPARE(clz(v0, v1),
412 "70621020 clz v0, v1"); 520 "70621020 clz v0, v1");
413 } 521 }
414 522
415 if (kArchVariant == kMips32r2) { 523 if (kArchVariant == kMips64r2) {
416 COMPARE(ins_(a0, a1, 31, 1), 524 COMPARE(ins_(a0, a1, 31, 1),
417 "7ca4ffc4 ins a0, a1, 31, 1"); 525 "7ca4ffc4 ins a0, a1, 31, 1");
418 COMPARE(ins_(s6, s7, 30, 2), 526 COMPARE(ins_(s6, s7, 30, 2),
419 "7ef6ff84 ins s6, s7, 30, 2"); 527 "7ef6ff84 ins s6, s7, 30, 2");
420 COMPARE(ins_(v0, v1, 0, 32), 528 COMPARE(ins_(v0, v1, 0, 32),
421 "7c62f804 ins v0, v1, 0, 32"); 529 "7c62f804 ins v0, v1, 0, 32");
422 COMPARE(ext_(a0, a1, 31, 1), 530 COMPARE(ext_(a0, a1, 31, 1),
423 "7ca407c0 ext a0, a1, 31, 1"); 531 "7ca407c0 ext a0, a1, 31, 1");
424 COMPARE(ext_(s6, s7, 30, 2), 532 COMPARE(ext_(s6, s7, 30, 2),
425 "7ef60f80 ext s6, s7, 30, 2"); 533 "7ef60f80 ext s6, s7, 30, 2");
426 COMPARE(ext_(v0, v1, 0, 32), 534 COMPARE(ext_(v0, v1, 0, 32),
427 "7c62f800 ext v0, v1, 0, 32"); 535 "7c62f800 ext v0, v1, 0, 32");
428 } 536 }
429 537
430 VERIFY_RUN(); 538 VERIFY_RUN();
431 } 539 }
OLDNEW
« no previous file with comments | « test/cctest/test-code-stubs-mips64.cc ('k') | test/cctest/test-hashing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698