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-mips.cc

Issue 458193002: Revert 23028 - "MIPS: Add support for arch. revision 6 to mips32 port." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 COMPARE(addu(v0, v1, s0), 103 COMPARE(addu(v0, v1, s0),
104 "00701021 addu v0, v1, s0"); 104 "00701021 addu v0, v1, s0");
105 105
106 COMPARE(subu(a0, a1, a2), 106 COMPARE(subu(a0, a1, a2),
107 "00a62023 subu a0, a1, a2"); 107 "00a62023 subu a0, a1, a2");
108 COMPARE(subu(t2, t3, t4), 108 COMPARE(subu(t2, t3, t4),
109 "016c5023 subu t2, t3, t4"); 109 "016c5023 subu t2, t3, t4");
110 COMPARE(subu(v0, v1, s0), 110 COMPARE(subu(v0, v1, s0),
111 "00701023 subu v0, v1, s0"); 111 "00701023 subu v0, v1, s0");
112 112
113 if (!IsMipsArchVariant(kMips32r6)) { 113 COMPARE(mult(a0, a1),
114 COMPARE(mult(a0, a1), 114 "00850018 mult a0, a1");
115 "00850018 mult a0, a1"); 115 COMPARE(mult(t2, t3),
116 COMPARE(mult(t2, t3), 116 "014b0018 mult t2, t3");
117 "014b0018 mult t2, t3"); 117 COMPARE(mult(v0, v1),
118 COMPARE(mult(v0, v1), 118 "00430018 mult v0, v1");
119 "00430018 mult v0, v1");
120 119
121 COMPARE(multu(a0, a1), 120 COMPARE(multu(a0, a1),
122 "00850019 multu a0, a1"); 121 "00850019 multu a0, a1");
123 COMPARE(multu(t2, t3), 122 COMPARE(multu(t2, t3),
124 "014b0019 multu t2, t3"); 123 "014b0019 multu t2, t3");
125 COMPARE(multu(v0, v1), 124 COMPARE(multu(v0, v1),
126 "00430019 multu v0, v1"); 125 "00430019 multu v0, v1");
127 126
128 COMPARE(div(a0, a1), 127 COMPARE(div(a0, a1),
129 "0085001a div a0, a1"); 128 "0085001a div a0, a1");
130 COMPARE(div(t2, t3), 129 COMPARE(div(t2, t3),
131 "014b001a div t2, t3"); 130 "014b001a div t2, t3");
132 COMPARE(div(v0, v1), 131 COMPARE(div(v0, v1),
133 "0043001a div v0, v1"); 132 "0043001a div v0, v1");
134 133
135 COMPARE(divu(a0, a1), 134 COMPARE(divu(a0, a1),
136 "0085001b divu a0, a1"); 135 "0085001b divu a0, a1");
137 COMPARE(divu(t2, t3), 136 COMPARE(divu(t2, t3),
138 "014b001b divu t2, t3"); 137 "014b001b divu t2, t3");
139 COMPARE(divu(v0, v1), 138 COMPARE(divu(v0, v1),
140 "0043001b divu v0, v1"); 139 "0043001b divu v0, v1");
141 140
142 if (!IsMipsArchVariant(kLoongson)) { 141 if (kArchVariant != kLoongson) {
143 COMPARE(mul(a0, a1, a2),
144 "70a62002 mul a0, a1, a2");
145 COMPARE(mul(t2, t3, t4),
146 "716c5002 mul t2, t3, t4");
147 COMPARE(mul(v0, v1, s0),
148 "70701002 mul v0, v1, s0");
149 }
150 } else { // MIPS32r6.
151 COMPARE(mul(a0, a1, a2), 142 COMPARE(mul(a0, a1, a2),
152 "00a62098 mul a0, a1, a2"); 143 "70a62002 mul a0, a1, a2");
153 COMPARE(muh(a0, a1, a2), 144 COMPARE(mul(t2, t3, t4),
154 "00a620d8 muh a0, a1, a2"); 145 "716c5002 mul t2, t3, t4");
155 COMPARE(mul(t1, t2, t3), 146 COMPARE(mul(v0, v1, s0),
156 "014b4898 mul t1, t2, t3"); 147 "70701002 mul v0, v1, s0");
157 COMPARE(muh(t1, t2, t3),
158 "014b48d8 muh t1, t2, t3");
159 COMPARE(mul(v0, v1, a0),
160 "00641098 mul v0, v1, a0");
161 COMPARE(muh(v0, v1, a0),
162 "006410d8 muh v0, v1, a0");
163
164 COMPARE(mulu(a0, a1, a2),
165 "00a62099 mulu a0, a1, a2");
166 COMPARE(muhu(a0, a1, a2),
167 "00a620d9 muhu a0, a1, a2");
168 COMPARE(mulu(t1, t2, t3),
169 "014b4899 mulu t1, t2, t3");
170 COMPARE(muhu(t1, t2, t3),
171 "014b48d9 muhu t1, t2, t3");
172 COMPARE(mulu(v0, v1, a0),
173 "00641099 mulu v0, v1, a0");
174 COMPARE(muhu(v0, v1, a0),
175 "006410d9 muhu v0, v1, a0");
176
177 COMPARE(div(a0, a1, a2),
178 "00a6209a div a0, a1, a2");
179 COMPARE(mod(a0, a1, a2),
180 "00a620da mod a0, a1, a2");
181 COMPARE(div(t1, t2, t3),
182 "014b489a div t1, t2, t3");
183 COMPARE(mod(t1, t2, t3),
184 "014b48da mod t1, t2, t3");
185 COMPARE(div(v0, v1, a0),
186 "0064109a div v0, v1, a0");
187 COMPARE(mod(v0, v1, a0),
188 "006410da mod v0, v1, a0");
189
190 COMPARE(divu(a0, a1, a2),
191 "00a6209b divu a0, a1, a2");
192 COMPARE(modu(a0, a1, a2),
193 "00a620db modu a0, a1, a2");
194 COMPARE(divu(t1, t2, t3),
195 "014b489b divu t1, t2, t3");
196 COMPARE(modu(t1, t2, t3),
197 "014b48db modu t1, t2, t3");
198 COMPARE(divu(v0, v1, a0),
199 "0064109b divu v0, v1, a0");
200 COMPARE(modu(v0, v1, a0),
201 "006410db modu v0, v1, a0");
202
203 COMPARE(bovc(a0, a0, static_cast<int16_t>(0)),
204 "20840000 bovc a0, a0, 0");
205 COMPARE(bovc(a1, a0, static_cast<int16_t>(0)),
206 "20a40000 bovc a1, a0, 0");
207 COMPARE(bovc(a1, a0, 32767),
208 "20a47fff bovc a1, a0, 32767");
209 COMPARE(bovc(a1, a0, -32768),
210 "20a48000 bovc a1, a0, -32768");
211
212 COMPARE(bnvc(a0, a0, static_cast<int16_t>(0)),
213 "60840000 bnvc a0, a0, 0");
214 COMPARE(bnvc(a1, a0, static_cast<int16_t>(0)),
215 "60a40000 bnvc a1, a0, 0");
216 COMPARE(bnvc(a1, a0, 32767),
217 "60a47fff bnvc a1, a0, 32767");
218 COMPARE(bnvc(a1, a0, -32768),
219 "60a48000 bnvc a1, a0, -32768");
220
221 COMPARE(beqzc(a0, 0),
222 "d8800000 beqzc a0, 0x0");
223 COMPARE(beqzc(a0, 0xfffff), // 0x0fffff == 1048575.
224 "d88fffff beqzc a0, 0xfffff");
225 COMPARE(beqzc(a0, 0x100000), // 0x100000 == -1048576.
226 "d8900000 beqzc a0, 0x100000");
227
228 COMPARE(bnezc(a0, 0),
229 "f8800000 bnezc a0, 0x0");
230 COMPARE(bnezc(a0, 0xfffff), // 0x0fffff == 1048575.
231 "f88fffff bnezc a0, 0xfffff");
232 COMPARE(bnezc(a0, 0x100000), // 0x100000 == -1048576.
233 "f8900000 bnezc a0, 0x100000");
234 } 148 }
235 149
236 COMPARE(addiu(a0, a1, 0x0), 150 COMPARE(addiu(a0, a1, 0x0),
237 "24a40000 addiu a0, a1, 0"); 151 "24a40000 addiu a0, a1, 0");
238 COMPARE(addiu(s0, s1, 32767), 152 COMPARE(addiu(s0, s1, 32767),
239 "26307fff addiu s0, s1, 32767"); 153 "26307fff addiu s0, s1, 32767");
240 COMPARE(addiu(t2, t3, -32768), 154 COMPARE(addiu(t2, t3, -32768),
241 "256a8000 addiu t2, t3, -32768"); 155 "256a8000 addiu t2, t3, -32768");
242 COMPARE(addiu(v0, v1, -1), 156 COMPARE(addiu(v0, v1, -1),
243 "2462ffff addiu v0, v1, -1"); 157 "2462ffff addiu v0, v1, -1");
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 259
346 COMPARE(srav(a0, a1, a2), 260 COMPARE(srav(a0, a1, a2),
347 "00c52007 srav a0, a1, a2"); 261 "00c52007 srav a0, a1, a2");
348 COMPARE(srav(s0, s1, s2), 262 COMPARE(srav(s0, s1, s2),
349 "02518007 srav s0, s1, s2"); 263 "02518007 srav s0, s1, s2");
350 COMPARE(srav(t2, t3, t4), 264 COMPARE(srav(t2, t3, t4),
351 "018b5007 srav t2, t3, t4"); 265 "018b5007 srav t2, t3, t4");
352 COMPARE(srav(v0, v1, fp), 266 COMPARE(srav(v0, v1, fp),
353 "03c31007 srav v0, v1, fp"); 267 "03c31007 srav v0, v1, fp");
354 268
355 if (IsMipsArchVariant(kMips32r2)) { 269 if (kArchVariant == kMips32r2) {
356 COMPARE(rotr(a0, a1, 0), 270 COMPARE(rotr(a0, a1, 0),
357 "00252002 rotr a0, a1, 0"); 271 "00252002 rotr a0, a1, 0");
358 COMPARE(rotr(s0, s1, 8), 272 COMPARE(rotr(s0, s1, 8),
359 "00318202 rotr s0, s1, 8"); 273 "00318202 rotr s0, s1, 8");
360 COMPARE(rotr(t2, t3, 24), 274 COMPARE(rotr(t2, t3, 24),
361 "002b5602 rotr t2, t3, 24"); 275 "002b5602 rotr t2, t3, 24");
362 COMPARE(rotr(v0, v1, 31), 276 COMPARE(rotr(v0, v1, 31),
363 "002317c2 rotr v0, v1, 31"); 277 "002317c2 rotr v0, v1, 31");
364 278
365 COMPARE(rotrv(a0, a1, a2), 279 COMPARE(rotrv(a0, a1, a2),
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 "2862ffff slti v0, v1, -1"); 362 "2862ffff slti v0, v1, -1");
449 COMPARE(sltiu(a0, a1, 0), 363 COMPARE(sltiu(a0, a1, 0),
450 "2ca40000 sltiu a0, a1, 0"); 364 "2ca40000 sltiu a0, a1, 0");
451 COMPARE(sltiu(s0, s1, 32767), 365 COMPARE(sltiu(s0, s1, 32767),
452 "2e307fff sltiu s0, s1, 32767"); 366 "2e307fff sltiu s0, s1, 32767");
453 COMPARE(sltiu(t2, t3, -32768), 367 COMPARE(sltiu(t2, t3, -32768),
454 "2d6a8000 sltiu t2, t3, -32768"); 368 "2d6a8000 sltiu t2, t3, -32768");
455 COMPARE(sltiu(v0, v1, -1), 369 COMPARE(sltiu(v0, v1, -1),
456 "2c62ffff sltiu v0, v1, -1"); 370 "2c62ffff sltiu v0, v1, -1");
457 371
458 if (!IsMipsArchVariant(kLoongson)) { 372 if (kArchVariant != kLoongson) {
459 COMPARE(movz(a0, a1, a2), 373 COMPARE(movz(a0, a1, a2),
460 "00a6200a movz a0, a1, a2"); 374 "00a6200a movz a0, a1, a2");
461 COMPARE(movz(s0, s1, s2), 375 COMPARE(movz(s0, s1, s2),
462 "0232800a movz s0, s1, s2"); 376 "0232800a movz s0, s1, s2");
463 COMPARE(movz(t2, t3, t4), 377 COMPARE(movz(t2, t3, t4),
464 "016c500a movz t2, t3, t4"); 378 "016c500a movz t2, t3, t4");
465 COMPARE(movz(v0, v1, a2), 379 COMPARE(movz(v0, v1, a2),
466 "0066100a movz v0, v1, a2"); 380 "0066100a movz v0, v1, a2");
467 COMPARE(movn(a0, a1, a2), 381 COMPARE(movn(a0, a1, a2),
468 "00a6200b movn a0, a1, a2"); 382 "00a6200b movn a0, a1, a2");
(...skipping 14 matching lines...) Expand all
483 "007d1001 movt v0, v1, 7"); 397 "007d1001 movt v0, v1, 7");
484 COMPARE(movf(a0, a1, 0), 398 COMPARE(movf(a0, a1, 0),
485 "00a02001 movf a0, a1, 0"); 399 "00a02001 movf a0, a1, 0");
486 COMPARE(movf(s0, s1, 4), 400 COMPARE(movf(s0, s1, 4),
487 "02308001 movf s0, s1, 4"); 401 "02308001 movf s0, s1, 4");
488 COMPARE(movf(t2, t3, 5), 402 COMPARE(movf(t2, t3, 5),
489 "01745001 movf t2, t3, 5"); 403 "01745001 movf t2, t3, 5");
490 COMPARE(movf(v0, v1, 6), 404 COMPARE(movf(v0, v1, 6),
491 "00781001 movf v0, v1, 6"); 405 "00781001 movf v0, v1, 6");
492 406
493 if (IsMipsArchVariant(kMips32r6)) { 407 COMPARE(clz(a0, a1),
494 COMPARE(clz(a0, a1), 408 "70a42020 clz a0, a1");
495 "00a02050 clz a0, a1"); 409 COMPARE(clz(s6, s7),
496 COMPARE(clz(s6, s7), 410 "72f6b020 clz s6, s7");
497 "02e0b050 clz s6, s7"); 411 COMPARE(clz(v0, v1),
498 COMPARE(clz(v0, v1), 412 "70621020 clz v0, v1");
499 "00601050 clz v0, v1");
500 } else {
501 COMPARE(clz(a0, a1),
502 "70a42020 clz a0, a1");
503 COMPARE(clz(s6, s7),
504 "72f6b020 clz s6, s7");
505 COMPARE(clz(v0, v1),
506 "70621020 clz v0, v1");
507 }
508 } 413 }
509 414
510 if (IsMipsArchVariant(kMips32r2)) { 415 if (kArchVariant == kMips32r2) {
511 COMPARE(ins_(a0, a1, 31, 1), 416 COMPARE(ins_(a0, a1, 31, 1),
512 "7ca4ffc4 ins a0, a1, 31, 1"); 417 "7ca4ffc4 ins a0, a1, 31, 1");
513 COMPARE(ins_(s6, s7, 30, 2), 418 COMPARE(ins_(s6, s7, 30, 2),
514 "7ef6ff84 ins s6, s7, 30, 2"); 419 "7ef6ff84 ins s6, s7, 30, 2");
515 COMPARE(ins_(v0, v1, 0, 32), 420 COMPARE(ins_(v0, v1, 0, 32),
516 "7c62f804 ins v0, v1, 0, 32"); 421 "7c62f804 ins v0, v1, 0, 32");
517 COMPARE(ext_(a0, a1, 31, 1), 422 COMPARE(ext_(a0, a1, 31, 1),
518 "7ca407c0 ext a0, a1, 31, 1"); 423 "7ca407c0 ext a0, a1, 31, 1");
519 COMPARE(ext_(s6, s7, 30, 2), 424 COMPARE(ext_(s6, s7, 30, 2),
520 "7ef60f80 ext s6, s7, 30, 2"); 425 "7ef60f80 ext s6, s7, 30, 2");
521 COMPARE(ext_(v0, v1, 0, 32), 426 COMPARE(ext_(v0, v1, 0, 32),
522 "7c62f800 ext v0, v1, 0, 32"); 427 "7c62f800 ext v0, v1, 0, 32");
523 } 428 }
524 429
525 VERIFY_RUN(); 430 VERIFY_RUN();
526 } 431 }
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