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

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

Issue 9692048: MIPS: Added support for Loongson architectures. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-assembler-mips.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 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
11 // with the distribution. 11 // with the distribution.
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 COMPARE(div(v0, v1), 141 COMPARE(div(v0, v1),
142 "0043001a div v0, v1"); 142 "0043001a div v0, v1");
143 143
144 COMPARE(divu(a0, a1), 144 COMPARE(divu(a0, a1),
145 "0085001b divu a0, a1"); 145 "0085001b divu a0, a1");
146 COMPARE(divu(t2, t3), 146 COMPARE(divu(t2, t3),
147 "014b001b divu t2, t3"); 147 "014b001b divu t2, t3");
148 COMPARE(divu(v0, v1), 148 COMPARE(divu(v0, v1),
149 "0043001b divu v0, v1"); 149 "0043001b divu v0, v1");
150 150
151 COMPARE(mul(a0, a1, a2), 151 if (kArchVariant != kLoongson) {
152 "70a62002 mul a0, a1, a2"); 152 COMPARE(mul(a0, a1, a2),
153 COMPARE(mul(t2, t3, t4), 153 "70a62002 mul a0, a1, a2");
154 "716c5002 mul t2, t3, t4"); 154 COMPARE(mul(t2, t3, t4),
155 COMPARE(mul(v0, v1, s0), 155 "716c5002 mul t2, t3, t4");
156 "70701002 mul v0, v1, s0"); 156 COMPARE(mul(v0, v1, s0),
157 "70701002 mul v0, v1, s0");
158 }
157 159
158 COMPARE(addiu(a0, a1, 0x0), 160 COMPARE(addiu(a0, a1, 0x0),
159 "24a40000 addiu a0, a1, 0"); 161 "24a40000 addiu a0, a1, 0");
160 COMPARE(addiu(s0, s1, 32767), 162 COMPARE(addiu(s0, s1, 32767),
161 "26307fff addiu s0, s1, 32767"); 163 "26307fff addiu s0, s1, 32767");
162 COMPARE(addiu(t2, t3, -32768), 164 COMPARE(addiu(t2, t3, -32768),
163 "256a8000 addiu t2, t3, -32768"); 165 "256a8000 addiu t2, t3, -32768");
164 COMPARE(addiu(v0, v1, -1), 166 COMPARE(addiu(v0, v1, -1),
165 "2462ffff addiu v0, v1, -1"); 167 "2462ffff addiu v0, v1, -1");
166 168
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 269
268 COMPARE(srav(a0, a1, a2), 270 COMPARE(srav(a0, a1, a2),
269 "00c52007 srav a0, a1, a2"); 271 "00c52007 srav a0, a1, a2");
270 COMPARE(srav(s0, s1, s2), 272 COMPARE(srav(s0, s1, s2),
271 "02518007 srav s0, s1, s2"); 273 "02518007 srav s0, s1, s2");
272 COMPARE(srav(t2, t3, t4), 274 COMPARE(srav(t2, t3, t4),
273 "018b5007 srav t2, t3, t4"); 275 "018b5007 srav t2, t3, t4");
274 COMPARE(srav(v0, v1, fp), 276 COMPARE(srav(v0, v1, fp),
275 "03c31007 srav v0, v1, fp"); 277 "03c31007 srav v0, v1, fp");
276 278
277 if (mips32r2) { 279 if (kArchVariant == kMips32r2) {
278 COMPARE(rotr(a0, a1, 0), 280 COMPARE(rotr(a0, a1, 0),
279 "00252002 rotr a0, a1, 0"); 281 "00252002 rotr a0, a1, 0");
280 COMPARE(rotr(s0, s1, 8), 282 COMPARE(rotr(s0, s1, 8),
281 "00318202 rotr s0, s1, 8"); 283 "00318202 rotr s0, s1, 8");
282 COMPARE(rotr(t2, t3, 24), 284 COMPARE(rotr(t2, t3, 24),
283 "002b5602 rotr t2, t3, 24"); 285 "002b5602 rotr t2, t3, 24");
284 COMPARE(rotr(v0, v1, 31), 286 COMPARE(rotr(v0, v1, 31),
285 "002317c2 rotr v0, v1, 31"); 287 "002317c2 rotr v0, v1, 31");
286 288
287 COMPARE(rotrv(a0, a1, a2), 289 COMPARE(rotrv(a0, a1, a2),
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 "2862ffff slti v0, v1, -1"); 372 "2862ffff slti v0, v1, -1");
371 COMPARE(sltiu(a0, a1, 0), 373 COMPARE(sltiu(a0, a1, 0),
372 "2ca40000 sltiu a0, a1, 0"); 374 "2ca40000 sltiu a0, a1, 0");
373 COMPARE(sltiu(s0, s1, 32767), 375 COMPARE(sltiu(s0, s1, 32767),
374 "2e307fff sltiu s0, s1, 32767"); 376 "2e307fff sltiu s0, s1, 32767");
375 COMPARE(sltiu(t2, t3, -32768), 377 COMPARE(sltiu(t2, t3, -32768),
376 "2d6a8000 sltiu t2, t3, -32768"); 378 "2d6a8000 sltiu t2, t3, -32768");
377 COMPARE(sltiu(v0, v1, -1), 379 COMPARE(sltiu(v0, v1, -1),
378 "2c62ffff sltiu v0, v1, -1"); 380 "2c62ffff sltiu v0, v1, -1");
379 381
380 COMPARE(movz(a0, a1, a2), 382 if (kArchVariant != kLoongson) {
381 "00a6200a movz a0, a1, a2"); 383 COMPARE(movz(a0, a1, a2),
382 COMPARE(movz(s0, s1, s2), 384 "00a6200a movz a0, a1, a2");
383 "0232800a movz s0, s1, s2"); 385 COMPARE(movz(s0, s1, s2),
384 COMPARE(movz(t2, t3, t4), 386 "0232800a movz s0, s1, s2");
385 "016c500a movz t2, t3, t4"); 387 COMPARE(movz(t2, t3, t4),
386 COMPARE(movz(v0, v1, a2), 388 "016c500a movz t2, t3, t4");
387 "0066100a movz v0, v1, a2"); 389 COMPARE(movz(v0, v1, a2),
388 COMPARE(movn(a0, a1, a2), 390 "0066100a movz v0, v1, a2");
389 "00a6200b movn a0, a1, a2"); 391 COMPARE(movn(a0, a1, a2),
390 COMPARE(movn(s0, s1, s2), 392 "00a6200b movn a0, a1, a2");
391 "0232800b movn s0, s1, s2"); 393 COMPARE(movn(s0, s1, s2),
392 COMPARE(movn(t2, t3, t4), 394 "0232800b movn s0, s1, s2");
393 "016c500b movn t2, t3, t4"); 395 COMPARE(movn(t2, t3, t4),
394 COMPARE(movn(v0, v1, a2), 396 "016c500b movn t2, t3, t4");
395 "0066100b movn v0, v1, a2"); 397 COMPARE(movn(v0, v1, a2),
398 "0066100b movn v0, v1, a2");
396 399
397 COMPARE(movt(a0, a1, 1), 400 COMPARE(movt(a0, a1, 1),
398 "00a52001 movt a0, a1, 1"); 401 "00a52001 movt a0, a1, 1");
399 COMPARE(movt(s0, s1, 2), 402 COMPARE(movt(s0, s1, 2),
400 "02298001 movt s0, s1, 2"); 403 "02298001 movt s0, s1, 2");
401 COMPARE(movt(t2, t3, 3), 404 COMPARE(movt(t2, t3, 3),
402 "016d5001 movt t2, t3, 3"); 405 "016d5001 movt t2, t3, 3");
403 COMPARE(movt(v0, v1, 7), 406 COMPARE(movt(v0, v1, 7),
404 "007d1001 movt v0, v1, 7"); 407 "007d1001 movt v0, v1, 7");
405 COMPARE(movf(a0, a1, 0), 408 COMPARE(movf(a0, a1, 0),
406 "00a02001 movf a0, a1, 0"); 409 "00a02001 movf a0, a1, 0");
407 COMPARE(movf(s0, s1, 4), 410 COMPARE(movf(s0, s1, 4),
408 "02308001 movf s0, s1, 4"); 411 "02308001 movf s0, s1, 4");
409 COMPARE(movf(t2, t3, 5), 412 COMPARE(movf(t2, t3, 5),
410 "01745001 movf t2, t3, 5"); 413 "01745001 movf t2, t3, 5");
411 COMPARE(movf(v0, v1, 6), 414 COMPARE(movf(v0, v1, 6),
412 "00781001 movf v0, v1, 6"); 415 "00781001 movf v0, v1, 6");
413 416
414 COMPARE(clz(a0, a1), 417 COMPARE(clz(a0, a1),
415 "70a42020 clz a0, a1"); 418 "70a42020 clz a0, a1");
416 COMPARE(clz(s6, s7), 419 COMPARE(clz(s6, s7),
417 "72f6b020 clz s6, s7"); 420 "72f6b020 clz s6, s7");
418 COMPARE(clz(v0, v1), 421 COMPARE(clz(v0, v1),
419 "70621020 clz v0, v1"); 422 "70621020 clz v0, v1");
423 }
420 424
421 if (mips32r2) { 425 if (kArchVariant == kMips32r2) {
422 COMPARE(ins_(a0, a1, 31, 1), 426 COMPARE(ins_(a0, a1, 31, 1),
423 "7ca4ffc4 ins a0, a1, 31, 1"); 427 "7ca4ffc4 ins a0, a1, 31, 1");
424 COMPARE(ins_(s6, s7, 30, 2), 428 COMPARE(ins_(s6, s7, 30, 2),
425 "7ef6ff84 ins s6, s7, 30, 2"); 429 "7ef6ff84 ins s6, s7, 30, 2");
426 COMPARE(ins_(v0, v1, 0, 32), 430 COMPARE(ins_(v0, v1, 0, 32),
427 "7c62f804 ins v0, v1, 0, 32"); 431 "7c62f804 ins v0, v1, 0, 32");
428 COMPARE(ext_(a0, a1, 31, 1), 432 COMPARE(ext_(a0, a1, 31, 1),
429 "7ca407c0 ext a0, a1, 31, 1"); 433 "7ca407c0 ext a0, a1, 31, 1");
430 COMPARE(ext_(s6, s7, 30, 2), 434 COMPARE(ext_(s6, s7, 30, 2),
431 "7ef60f80 ext s6, s7, 30, 2"); 435 "7ef60f80 ext s6, s7, 30, 2");
432 COMPARE(ext_(v0, v1, 0, 32), 436 COMPARE(ext_(v0, v1, 0, 32),
433 "7c62f800 ext v0, v1, 0, 32"); 437 "7c62f800 ext v0, v1, 0, 32");
434 } 438 }
435 439
436 VERIFY_RUN(); 440 VERIFY_RUN();
437 } 441 }
OLDNEW
« no previous file with comments | « test/cctest/test-assembler-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698