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

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

Issue 426863006: MIPS64: Add support for architecture revision 6. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments. 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-mips64.cc ('k') | test/mjsunit/mjsunit.status » ('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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 "00a6202f dsubu a0, a1, a2"); 115 "00a6202f dsubu a0, a1, a2");
116 COMPARE(subu(a6, a7, t0), 116 COMPARE(subu(a6, a7, t0),
117 "016c5023 subu a6, a7, t0"); 117 "016c5023 subu a6, a7, t0");
118 COMPARE(dsubu(a6, a7, t0), 118 COMPARE(dsubu(a6, a7, t0),
119 "016c502f dsubu a6, a7, t0"); 119 "016c502f dsubu a6, a7, t0");
120 COMPARE(subu(v0, v1, s0), 120 COMPARE(subu(v0, v1, s0),
121 "00701023 subu v0, v1, s0"); 121 "00701023 subu v0, v1, s0");
122 COMPARE(dsubu(v0, v1, s0), 122 COMPARE(dsubu(v0, v1, s0),
123 "0070102f dsubu v0, v1, s0"); 123 "0070102f dsubu v0, v1, s0");
124 124
125 COMPARE(mult(a0, a1), 125 if (kArchVariant != kMips64r6) {
126 "00850018 mult a0, a1"); 126 COMPARE(mult(a0, a1),
127 COMPARE(dmult(a0, a1), 127 "00850018 mult a0, a1");
128 "0085001c dmult a0, a1"); 128 COMPARE(dmult(a0, a1),
129 COMPARE(mult(a6, a7), 129 "0085001c dmult a0, a1");
130 "014b0018 mult a6, a7"); 130 COMPARE(mult(a6, a7),
131 COMPARE(dmult(a6, a7), 131 "014b0018 mult a6, a7");
132 "014b001c dmult a6, a7"); 132 COMPARE(dmult(a6, a7),
133 COMPARE(mult(v0, v1), 133 "014b001c dmult a6, a7");
134 "00430018 mult v0, v1"); 134 COMPARE(mult(v0, v1),
135 COMPARE(dmult(v0, v1), 135 "00430018 mult v0, v1");
136 "0043001c dmult v0, v1"); 136 COMPARE(dmult(v0, v1),
137 "0043001c dmult v0, v1");
137 138
138 COMPARE(multu(a0, a1), 139 COMPARE(multu(a0, a1),
139 "00850019 multu a0, a1"); 140 "00850019 multu a0, a1");
140 COMPARE(dmultu(a0, a1), 141 COMPARE(dmultu(a0, a1),
141 "0085001d dmultu a0, a1"); 142 "0085001d dmultu a0, a1");
142 COMPARE(multu(a6, a7), 143 COMPARE(multu(a6, a7),
143 "014b0019 multu a6, a7"); 144 "014b0019 multu a6, a7");
144 COMPARE(dmultu(a6, a7), 145 COMPARE(dmultu(a6, a7),
145 "014b001d dmultu a6, a7"); 146 "014b001d dmultu a6, a7");
146 COMPARE(multu(v0, v1), 147 COMPARE(multu(v0, v1),
147 "00430019 multu v0, v1"); 148 "00430019 multu v0, v1");
148 COMPARE(dmultu(v0, v1), 149 COMPARE(dmultu(v0, v1),
149 "0043001d dmultu v0, v1"); 150 "0043001d dmultu v0, v1");
150 151
151 COMPARE(div(a0, a1), 152 COMPARE(div(a0, a1),
152 "0085001a div a0, a1"); 153 "0085001a div a0, a1");
153 COMPARE(div(a6, a7), 154 COMPARE(div(a6, a7),
154 "014b001a div a6, a7"); 155 "014b001a div a6, a7");
155 COMPARE(div(v0, v1), 156 COMPARE(div(v0, v1),
156 "0043001a div v0, v1"); 157 "0043001a div v0, v1");
157 COMPARE(ddiv(a0, a1), 158 COMPARE(ddiv(a0, a1),
158 "0085001e ddiv a0, a1"); 159 "0085001e ddiv a0, a1");
159 COMPARE(ddiv(a6, a7), 160 COMPARE(ddiv(a6, a7),
160 "014b001e ddiv a6, a7"); 161 "014b001e ddiv a6, a7");
161 COMPARE(ddiv(v0, v1), 162 COMPARE(ddiv(v0, v1),
162 "0043001e ddiv v0, v1"); 163 "0043001e ddiv v0, v1");
163 164
164 COMPARE(divu(a0, a1), 165 COMPARE(divu(a0, a1),
165 "0085001b divu a0, a1"); 166 "0085001b divu a0, a1");
166 COMPARE(divu(a6, a7), 167 COMPARE(divu(a6, a7),
167 "014b001b divu a6, a7"); 168 "014b001b divu a6, a7");
168 COMPARE(divu(v0, v1), 169 COMPARE(divu(v0, v1),
169 "0043001b divu v0, v1"); 170 "0043001b divu v0, v1");
170 COMPARE(ddivu(a0, a1), 171 COMPARE(ddivu(a0, a1),
171 "0085001f ddivu a0, a1"); 172 "0085001f ddivu a0, a1");
172 COMPARE(ddivu(a6, a7), 173 COMPARE(ddivu(a6, a7),
173 "014b001f ddivu a6, a7"); 174 "014b001f ddivu a6, a7");
174 COMPARE(ddivu(v0, v1), 175 COMPARE(ddivu(v0, v1),
175 "0043001f ddivu v0, v1"); 176 "0043001f ddivu v0, v1");
176
177 if (kArchVariant != kLoongson) {
178 COMPARE(mul(a0, a1, a2), 177 COMPARE(mul(a0, a1, a2),
179 "70a62002 mul a0, a1, a2"); 178 "70a62002 mul a0, a1, a2");
180 COMPARE(mul(a6, a7, t0), 179 COMPARE(mul(a6, a7, t0),
181 "716c5002 mul a6, a7, t0"); 180 "716c5002 mul a6, a7, t0");
182 COMPARE(mul(v0, v1, s0), 181 COMPARE(mul(v0, v1, s0),
183 "70701002 mul v0, v1, s0"); 182 "70701002 mul v0, v1, s0");
183 } else { // MIPS64r6.
184 COMPARE(mul(a0, a1, a2),
185 "00a62098 mul a0, a1, a2");
186 COMPARE(muh(a0, a1, a2),
187 "00a620d8 muh a0, a1, a2");
188 COMPARE(dmul(a0, a1, a2),
189 "00a6209c dmul a0, a1, a2");
190 COMPARE(dmuh(a0, a1, a2),
191 "00a620dc dmuh a0, a1, a2");
192 COMPARE(mul(a5, a6, a7),
193 "014b4898 mul a5, a6, a7");
194 COMPARE(muh(a5, a6, a7),
195 "014b48d8 muh a5, a6, a7");
196 COMPARE(dmul(a5, a6, a7),
197 "014b489c dmul a5, a6, a7");
198 COMPARE(dmuh(a5, a6, a7),
199 "014b48dc dmuh a5, a6, a7");
200 COMPARE(mul(v0, v1, a0),
201 "00641098 mul v0, v1, a0");
202 COMPARE(muh(v0, v1, a0),
203 "006410d8 muh v0, v1, a0");
204 COMPARE(dmul(v0, v1, a0),
205 "0064109c dmul v0, v1, a0");
206 COMPARE(dmuh(v0, v1, a0),
207 "006410dc dmuh v0, v1, a0");
208
209 COMPARE(mulu(a0, a1, a2),
210 "00a62099 mulu a0, a1, a2");
211 COMPARE(muhu(a0, a1, a2),
212 "00a620d9 muhu a0, a1, a2");
213 COMPARE(dmulu(a0, a1, a2),
214 "00a6209d dmulu a0, a1, a2");
215 COMPARE(dmuhu(a0, a1, a2),
216 "00a620dd dmuhu a0, a1, a2");
217 COMPARE(mulu(a5, a6, a7),
218 "014b4899 mulu a5, a6, a7");
219 COMPARE(muhu(a5, a6, a7),
220 "014b48d9 muhu a5, a6, a7");
221 COMPARE(dmulu(a5, a6, a7),
222 "014b489d dmulu a5, a6, a7");
223 COMPARE(dmuhu(a5, a6, a7),
224 "014b48dd dmuhu a5, a6, a7");
225 COMPARE(mulu(v0, v1, a0),
226 "00641099 mulu v0, v1, a0");
227 COMPARE(muhu(v0, v1, a0),
228 "006410d9 muhu v0, v1, a0");
229 COMPARE(dmulu(v0, v1, a0),
230 "0064109d dmulu v0, v1, a0");
231 COMPARE(dmuhu(v0, v1, a0),
232 "006410dd dmuhu v0, v1, a0");
233
234 COMPARE(div(a0, a1, a2),
235 "00a6209a div a0, a1, a2");
236 COMPARE(mod(a0, a1, a2),
237 "00a620da mod a0, a1, a2");
238 COMPARE(ddiv(a0, a1, a2),
239 "00a6209e ddiv a0, a1, a2");
240 COMPARE(dmod(a0, a1, a2),
241 "00a620de dmod a0, a1, a2");
242 COMPARE(div(a5, a6, a7),
243 "014b489a div a5, a6, a7");
244 COMPARE(mod(a5, a6, a7),
245 "014b48da mod a5, a6, a7");
246 COMPARE(ddiv(a5, a6, a7),
247 "014b489e ddiv a5, a6, a7");
248 COMPARE(dmod(a5, a6, a7),
249 "014b48de dmod a5, a6, a7");
250 COMPARE(div(v0, v1, a0),
251 "0064109a div v0, v1, a0");
252 COMPARE(mod(v0, v1, a0),
253 "006410da mod v0, v1, a0");
254 COMPARE(ddiv(v0, v1, a0),
255 "0064109e ddiv v0, v1, a0");
256 COMPARE(dmod(v0, v1, a0),
257 "006410de dmod v0, v1, a0");
258
259 COMPARE(divu(a0, a1, a2),
260 "00a6209b divu a0, a1, a2");
261 COMPARE(modu(a0, a1, a2),
262 "00a620db modu a0, a1, a2");
263 COMPARE(ddivu(a0, a1, a2),
264 "00a6209f ddivu a0, a1, a2");
265 COMPARE(dmodu(a0, a1, a2),
266 "00a620df dmodu a0, a1, a2");
267 COMPARE(divu(a5, a6, a7),
268 "014b489b divu a5, a6, a7");
269 COMPARE(modu(a5, a6, a7),
270 "014b48db modu a5, a6, a7");
271 COMPARE(ddivu(a5, a6, a7),
272 "014b489f ddivu a5, a6, a7");
273 COMPARE(dmodu(a5, a6, a7),
274 "014b48df dmodu a5, a6, a7");
275 COMPARE(divu(v0, v1, a0),
276 "0064109b divu v0, v1, a0");
277 COMPARE(modu(v0, v1, a0),
278 "006410db modu v0, v1, a0");
279 COMPARE(ddivu(v0, v1, a0),
280 "0064109f ddivu v0, v1, a0");
281 COMPARE(dmodu(v0, v1, a0),
282 "006410df dmodu v0, v1, a0");
283
284 COMPARE(bovc(a0, a0, static_cast<int16_t>(0)),
285 "20840000 bovc a0, a0, 0");
286 COMPARE(bovc(a1, a0, static_cast<int16_t>(0)),
287 "20a40000 bovc a1, a0, 0");
288 COMPARE(bovc(a1, a0, 32767),
289 "20a47fff bovc a1, a0, 32767");
290 COMPARE(bovc(a1, a0, -32768),
291 "20a48000 bovc a1, a0, -32768");
292
293 COMPARE(bnvc(a0, a0, static_cast<int16_t>(0)),
294 "60840000 bnvc a0, a0, 0");
295 COMPARE(bnvc(a1, a0, static_cast<int16_t>(0)),
296 "60a40000 bnvc a1, a0, 0");
297 COMPARE(bnvc(a1, a0, 32767),
298 "60a47fff bnvc a1, a0, 32767");
299 COMPARE(bnvc(a1, a0, -32768),
300 "60a48000 bnvc a1, a0, -32768");
301
302 COMPARE(beqzc(a0, 0),
303 "d8800000 beqzc a0, 0x0");
304 COMPARE(beqzc(a0, 0xfffff), // 0x0fffff == 1048575.
305 "d88fffff beqzc a0, 0xfffff");
306 COMPARE(beqzc(a0, 0x100000), // 0x100000 == -1048576.
307 "d8900000 beqzc a0, 0x100000");
308
309 COMPARE(bnezc(a0, 0),
310 "f8800000 bnezc a0, 0x0");
311 COMPARE(bnezc(a0, 0xfffff), // 0x0fffff == 1048575.
312 "f88fffff bnezc a0, 0xfffff");
313 COMPARE(bnezc(a0, 0x100000), // 0x100000 == -1048576.
314 "f8900000 bnezc a0, 0x100000");
184 } 315 }
185 316
186 COMPARE(addiu(a0, a1, 0x0), 317 COMPARE(addiu(a0, a1, 0x0),
187 "24a40000 addiu a0, a1, 0"); 318 "24a40000 addiu a0, a1, 0");
188 COMPARE(addiu(s0, s1, 32767), 319 COMPARE(addiu(s0, s1, 32767),
189 "26307fff addiu s0, s1, 32767"); 320 "26307fff addiu s0, s1, 32767");
190 COMPARE(addiu(a6, a7, -32768), 321 COMPARE(addiu(a6, a7, -32768),
191 "256a8000 addiu a6, a7, -32768"); 322 "256a8000 addiu a6, a7, -32768");
192 COMPARE(addiu(v0, v1, -1), 323 COMPARE(addiu(v0, v1, -1),
193 "2462ffff addiu v0, v1, -1"); 324 "2462ffff addiu v0, v1, -1");
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 COMPARE(slti(v0, v1, -1), 600 COMPARE(slti(v0, v1, -1),
470 "2862ffff slti v0, v1, -1"); 601 "2862ffff slti v0, v1, -1");
471 COMPARE(sltiu(a0, a1, 0), 602 COMPARE(sltiu(a0, a1, 0),
472 "2ca40000 sltiu a0, a1, 0"); 603 "2ca40000 sltiu a0, a1, 0");
473 COMPARE(sltiu(s0, s1, 32767), 604 COMPARE(sltiu(s0, s1, 32767),
474 "2e307fff sltiu s0, s1, 32767"); 605 "2e307fff sltiu s0, s1, 32767");
475 COMPARE(sltiu(a6, a7, -32768), 606 COMPARE(sltiu(a6, a7, -32768),
476 "2d6a8000 sltiu a6, a7, -32768"); 607 "2d6a8000 sltiu a6, a7, -32768");
477 COMPARE(sltiu(v0, v1, -1), 608 COMPARE(sltiu(v0, v1, -1),
478 "2c62ffff sltiu v0, v1, -1"); 609 "2c62ffff sltiu v0, v1, -1");
610 COMPARE(movz(a0, a1, a2),
611 "00a6200a movz a0, a1, a2");
612 COMPARE(movz(s0, s1, s2),
613 "0232800a movz s0, s1, s2");
614 COMPARE(movz(a6, a7, t0),
615 "016c500a movz a6, a7, t0");
616 COMPARE(movz(v0, v1, a2),
617 "0066100a movz v0, v1, a2");
618 COMPARE(movn(a0, a1, a2),
619 "00a6200b movn a0, a1, a2");
620 COMPARE(movn(s0, s1, s2),
621 "0232800b movn s0, s1, s2");
622 COMPARE(movn(a6, a7, t0),
623 "016c500b movn a6, a7, t0");
624 COMPARE(movn(v0, v1, a2),
625 "0066100b movn v0, v1, a2");
479 626
480 if (kArchVariant != kLoongson) { 627 COMPARE(movt(a0, a1, 1),
481 COMPARE(movz(a0, a1, a2), 628 "00a52001 movt a0, a1, 1");
482 "00a6200a movz a0, a1, a2"); 629 COMPARE(movt(s0, s1, 2),
483 COMPARE(movz(s0, s1, s2), 630 "02298001 movt s0, s1, 2");
484 "0232800a movz s0, s1, s2"); 631 COMPARE(movt(a6, a7, 3),
485 COMPARE(movz(a6, a7, t0), 632 "016d5001 movt a6, a7, 3");
486 "016c500a movz a6, a7, t0"); 633 COMPARE(movt(v0, v1, 7),
487 COMPARE(movz(v0, v1, a2), 634 "007d1001 movt v0, v1, 7");
488 "0066100a movz v0, v1, a2"); 635 COMPARE(movf(a0, a1, 0),
489 COMPARE(movn(a0, a1, a2), 636 "00a02001 movf a0, a1, 0");
490 "00a6200b movn a0, a1, a2"); 637 COMPARE(movf(s0, s1, 4),
491 COMPARE(movn(s0, s1, s2), 638 "02308001 movf s0, s1, 4");
492 "0232800b movn s0, s1, s2"); 639 COMPARE(movf(a6, a7, 5),
493 COMPARE(movn(a6, a7, t0), 640 "01745001 movf a6, a7, 5");
494 "016c500b movn a6, a7, t0"); 641 COMPARE(movf(v0, v1, 6),
495 COMPARE(movn(v0, v1, a2), 642 "00781001 movf v0, v1, 6");
496 "0066100b movn v0, v1, a2");
497 643
498 COMPARE(movt(a0, a1, 1), 644 if (kArchVariant == kMips64r6) {
499 "00a52001 movt a0, a1, 1"); 645 COMPARE(clz(a0, a1),
500 COMPARE(movt(s0, s1, 2), 646 "00a02050 clz a0, a1");
501 "02298001 movt s0, s1, 2"); 647 COMPARE(clz(s6, s7),
502 COMPARE(movt(a6, a7, 3), 648 "02e0b050 clz s6, s7");
503 "016d5001 movt a6, a7, 3"); 649 COMPARE(clz(v0, v1),
504 COMPARE(movt(v0, v1, 7), 650 "00601050 clz v0, v1");
505 "007d1001 movt v0, v1, 7"); 651 } else {
506 COMPARE(movf(a0, a1, 0),
507 "00a02001 movf a0, a1, 0");
508 COMPARE(movf(s0, s1, 4),
509 "02308001 movf s0, s1, 4");
510 COMPARE(movf(a6, a7, 5),
511 "01745001 movf a6, a7, 5");
512 COMPARE(movf(v0, v1, 6),
513 "00781001 movf v0, v1, 6");
514
515 COMPARE(clz(a0, a1), 652 COMPARE(clz(a0, a1),
516 "70a42020 clz a0, a1"); 653 "70a42020 clz a0, a1");
517 COMPARE(clz(s6, s7), 654 COMPARE(clz(s6, s7),
518 "72f6b020 clz s6, s7"); 655 "72f6b020 clz s6, s7");
519 COMPARE(clz(v0, v1), 656 COMPARE(clz(v0, v1),
520 "70621020 clz v0, v1"); 657 "70621020 clz v0, v1");
521 } 658 }
522 659
523 if (kArchVariant == kMips64r2) { 660 COMPARE(ins_(a0, a1, 31, 1),
524 COMPARE(ins_(a0, a1, 31, 1), 661 "7ca4ffc4 ins a0, a1, 31, 1");
525 "7ca4ffc4 ins a0, a1, 31, 1"); 662 COMPARE(ins_(s6, s7, 30, 2),
526 COMPARE(ins_(s6, s7, 30, 2), 663 "7ef6ff84 ins s6, s7, 30, 2");
527 "7ef6ff84 ins s6, s7, 30, 2"); 664 COMPARE(ins_(v0, v1, 0, 32),
528 COMPARE(ins_(v0, v1, 0, 32), 665 "7c62f804 ins v0, v1, 0, 32");
529 "7c62f804 ins v0, v1, 0, 32"); 666 COMPARE(ext_(a0, a1, 31, 1),
530 COMPARE(ext_(a0, a1, 31, 1), 667 "7ca407c0 ext a0, a1, 31, 1");
531 "7ca407c0 ext a0, a1, 31, 1"); 668 COMPARE(ext_(s6, s7, 30, 2),
532 COMPARE(ext_(s6, s7, 30, 2), 669 "7ef60f80 ext s6, s7, 30, 2");
533 "7ef60f80 ext s6, s7, 30, 2"); 670 COMPARE(ext_(v0, v1, 0, 32),
534 COMPARE(ext_(v0, v1, 0, 32), 671 "7c62f800 ext v0, v1, 0, 32");
535 "7c62f800 ext v0, v1, 0, 32");
536 }
537 672
538 VERIFY_RUN(); 673 VERIFY_RUN();
539 } 674 }
OLDNEW
« no previous file with comments | « test/cctest/test-assembler-mips64.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698