OLD | NEW |
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 20 matching lines...) Expand all Loading... |
31 #include "src/v8.h" | 31 #include "src/v8.h" |
32 | 32 |
33 #include "src/debug/debug.h" | 33 #include "src/debug/debug.h" |
34 #include "src/disasm.h" | 34 #include "src/disasm.h" |
35 #include "src/disassembler.h" | 35 #include "src/disassembler.h" |
36 #include "src/macro-assembler.h" | 36 #include "src/macro-assembler.h" |
37 #include "test/cctest/cctest.h" | 37 #include "test/cctest/cctest.h" |
38 | 38 |
39 using namespace v8::internal; | 39 using namespace v8::internal; |
40 | 40 |
| 41 bool prev_instr_compact_branch = false; |
41 | 42 |
42 bool DisassembleAndCompare(byte* pc, const char* compare_string) { | 43 bool DisassembleAndCompare(byte* pc, const char* compare_string) { |
43 disasm::NameConverter converter; | 44 disasm::NameConverter converter; |
44 disasm::Disassembler disasm(converter); | 45 disasm::Disassembler disasm(converter); |
45 EmbeddedVector<char, 128> disasm_buffer; | 46 EmbeddedVector<char, 128> disasm_buffer; |
46 | 47 |
| 48 if (prev_instr_compact_branch) { |
| 49 disasm.InstructionDecode(disasm_buffer, pc); |
| 50 pc += 4; |
| 51 } |
| 52 |
47 disasm.InstructionDecode(disasm_buffer, pc); | 53 disasm.InstructionDecode(disasm_buffer, pc); |
48 | 54 |
49 if (strcmp(compare_string, disasm_buffer.start()) != 0) { | 55 if (strcmp(compare_string, disasm_buffer.start()) != 0) { |
50 fprintf(stderr, | 56 fprintf(stderr, |
51 "expected: \n" | 57 "expected: \n" |
52 "%s\n" | 58 "%s\n" |
53 "disassembled: \n" | 59 "disassembled: \n" |
54 "%s\n\n", | 60 "%s\n\n", |
55 compare_string, disasm_buffer.start()); | 61 compare_string, disasm_buffer.start()); |
56 return false; | 62 return false; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 if (failure) { \ | 96 if (failure) { \ |
91 V8_Fatal(__FILE__, __LINE__, "MIPS Disassembler tests failed.\n"); \ | 97 V8_Fatal(__FILE__, __LINE__, "MIPS Disassembler tests failed.\n"); \ |
92 } | 98 } |
93 | 99 |
94 | 100 |
95 #define COMPARE_PC_REL_COMPACT(asm_, compare_string, offset) \ | 101 #define COMPARE_PC_REL_COMPACT(asm_, compare_string, offset) \ |
96 { \ | 102 { \ |
97 int pc_offset = assm.pc_offset(); \ | 103 int pc_offset = assm.pc_offset(); \ |
98 byte *progcounter = &buffer[pc_offset]; \ | 104 byte *progcounter = &buffer[pc_offset]; \ |
99 char str_with_address[100]; \ | 105 char str_with_address[100]; \ |
100 snprintf(str_with_address, sizeof(str_with_address), "%s -> %p", \ | 106 prev_instr_compact_branch = assm.IsPrevInstrCompactBranch(); \ |
101 compare_string, progcounter + 4 + (offset * 4)); \ | 107 if (prev_instr_compact_branch) { \ |
| 108 snprintf(str_with_address, sizeof(str_with_address), "%s -> %p", \ |
| 109 compare_string, progcounter + 8 + (offset * 4)); \ |
| 110 } else { \ |
| 111 snprintf(str_with_address, sizeof(str_with_address), "%s -> %p", \ |
| 112 compare_string, progcounter + 4 + (offset * 4)); \ |
| 113 } \ |
102 assm.asm_; \ | 114 assm.asm_; \ |
103 if (!DisassembleAndCompare(progcounter, str_with_address)) failure = true; \ | 115 if (!DisassembleAndCompare(progcounter, str_with_address)) failure = true; \ |
104 } | 116 } |
105 | 117 |
106 | 118 |
107 #define COMPARE_PC_REL(asm_, compare_string, offset) \ | 119 #define COMPARE_PC_REL(asm_, compare_string, offset) \ |
108 { \ | 120 { \ |
109 int pc_offset = assm.pc_offset(); \ | 121 int pc_offset = assm.pc_offset(); \ |
110 byte *progcounter = &buffer[pc_offset]; \ | 122 byte *progcounter = &buffer[pc_offset]; \ |
111 char str_with_address[100]; \ | 123 char str_with_address[100]; \ |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 "60a48000 bnvc a1, a0, -32768", -32768); | 278 "60a48000 bnvc a1, a0, -32768", -32768); |
267 | 279 |
268 COMPARE_PC_REL_COMPACT(beqzc(a0, -1048576), | 280 COMPARE_PC_REL_COMPACT(beqzc(a0, -1048576), |
269 "d8900000 beqzc a0, -1048576", -1048576); | 281 "d8900000 beqzc a0, -1048576", -1048576); |
270 COMPARE_PC_REL_COMPACT(beqzc(a0, -1), "d89fffff beqzc a0, -1", -1); | 282 COMPARE_PC_REL_COMPACT(beqzc(a0, -1), "d89fffff beqzc a0, -1", -1); |
271 COMPARE_PC_REL_COMPACT(beqzc(a0, 0), "d8800000 beqzc a0, 0", 0); | 283 COMPARE_PC_REL_COMPACT(beqzc(a0, 0), "d8800000 beqzc a0, 0", 0); |
272 COMPARE_PC_REL_COMPACT(beqzc(a0, 1), "d8800001 beqzc a0, 1", 1); | 284 COMPARE_PC_REL_COMPACT(beqzc(a0, 1), "d8800001 beqzc a0, 1", 1); |
273 COMPARE_PC_REL_COMPACT(beqzc(a0, 1048575), | 285 COMPARE_PC_REL_COMPACT(beqzc(a0, 1048575), |
274 "d88fffff beqzc a0, 1048575", 1048575); | 286 "d88fffff beqzc a0, 1048575", 1048575); |
275 | 287 |
276 COMPARE_PC_REL_COMPACT(bnezc(a0, 0), "f8800000 bnezc a0, 0x0", 0); | 288 COMPARE_PC_REL_COMPACT(bnezc(a0, 0), "f8800000 bnezc a0, 0", 0); |
277 COMPARE_PC_REL_COMPACT(bnezc(a0, 0xfffff), // 0x0fffff == 1048575. | 289 COMPARE_PC_REL_COMPACT(bnezc(a0, 1048575), // int21 maximal value. |
278 "f88fffff bnezc a0, 0xfffff", 1048575); | 290 "f88fffff bnezc a0, 1048575", 1048575); |
279 COMPARE_PC_REL_COMPACT(bnezc(a0, 0x100000), // 0x100000 == -1048576. | 291 COMPARE_PC_REL_COMPACT(bnezc(a0, -1048576), // int21 minimal value. |
280 "f8900000 bnezc a0, 0x100000", -1048576); | 292 "f8900000 bnezc a0, -1048576", -1048576); |
281 | 293 |
282 COMPARE_PC_REL_COMPACT(bc(-33554432), "ca000000 bc -33554432", | 294 COMPARE_PC_REL_COMPACT(bc(-33554432), "ca000000 bc -33554432", |
283 -33554432); | 295 -33554432); |
284 COMPARE_PC_REL_COMPACT(bc(-1), "cbffffff bc -1", -1); | 296 COMPARE_PC_REL_COMPACT(bc(-1), "cbffffff bc -1", -1); |
285 COMPARE_PC_REL_COMPACT(bc(0), "c8000000 bc 0", 0); | 297 COMPARE_PC_REL_COMPACT(bc(0), "c8000000 bc 0", 0); |
286 COMPARE_PC_REL_COMPACT(bc(1), "c8000001 bc 1", 1); | 298 COMPARE_PC_REL_COMPACT(bc(1), "c8000001 bc 1", 1); |
287 COMPARE_PC_REL_COMPACT(bc(33554431), "c9ffffff bc 33554431", | 299 COMPARE_PC_REL_COMPACT(bc(33554431), "c9ffffff bc 33554431", |
288 33554431); | 300 33554431); |
289 | 301 |
290 COMPARE_PC_REL_COMPACT(balc(-33554432), "ea000000 balc -33554432", | 302 COMPARE_PC_REL_COMPACT(balc(-33554432), "ea000000 balc -33554432", |
291 -33554432); | 303 -33554432); |
292 COMPARE_PC_REL_COMPACT(balc(-1), "ebffffff balc -1", -1); | 304 COMPARE_PC_REL_COMPACT(balc(-1), "ebffffff balc -1", -1); |
293 COMPARE_PC_REL_COMPACT(balc(0), "e8000000 balc 0", 0); | 305 COMPARE_PC_REL_COMPACT(balc(0), "e8000000 balc 0", 0); |
294 COMPARE_PC_REL_COMPACT(balc(1), "e8000001 balc 1", 1); | 306 COMPARE_PC_REL_COMPACT(balc(1), "e8000001 balc 1", 1); |
295 COMPARE_PC_REL_COMPACT(balc(33554431), "e9ffffff balc 33554431", | 307 COMPARE_PC_REL_COMPACT(balc(33554431), "e9ffffff balc 33554431", |
296 33554431); | 308 33554431); |
297 | 309 |
298 COMPARE_PC_REL_COMPACT(bgeuc(a0, a1, -32768), | 310 COMPARE_PC_REL_COMPACT(bgeuc(a0, a1, -32768), |
299 "18858000 bgeuc a0, a1, -32768", -32768); | 311 "18858000 bgeuc a0, a1, -32768", -32768); |
300 COMPARE_PC_REL_COMPACT(bgeuc(a0, a1, -1), | 312 COMPARE_PC_REL_COMPACT(bgeuc(a0, a1, -1), |
301 "1885ffff bgeuc a0, a1, -1", -1); | 313 "1885ffff bgeuc a0, a1, -1", -1); |
302 COMPARE_PC_REL_COMPACT(bgeuc(a0, a1, 1), | 314 COMPARE_PC_REL_COMPACT(bgeuc(a0, a1, 1), "18850001 bgeuc a0, a1, 1", |
303 "18850001 bgeuc a0, a1, 1", 1); | 315 1); |
304 COMPARE_PC_REL_COMPACT(bgeuc(a0, a1, 32767), | 316 COMPARE_PC_REL_COMPACT(bgeuc(a0, a1, 32767), |
305 "18857fff bgeuc a0, a1, 32767", 32767); | 317 "18857fff bgeuc a0, a1, 32767", 32767); |
306 | 318 |
307 COMPARE_PC_REL_COMPACT(bgezalc(a0, -32768), | 319 COMPARE_PC_REL_COMPACT(bgezalc(a0, -32768), |
308 "18848000 bgezalc a0, -32768", -32768); | 320 "18848000 bgezalc a0, -32768", -32768); |
309 COMPARE_PC_REL_COMPACT(bgezalc(a0, -1), "1884ffff bgezalc a0, -1", | 321 COMPARE_PC_REL_COMPACT(bgezalc(a0, -1), "1884ffff bgezalc a0, -1", |
310 -1); | 322 -1); |
311 COMPARE_PC_REL_COMPACT(bgezalc(a0, 1), "18840001 bgezalc a0, 1", 1); | 323 COMPARE_PC_REL_COMPACT(bgezalc(a0, 1), "18840001 bgezalc a0, 1", 1); |
312 COMPARE_PC_REL_COMPACT(bgezalc(a0, 32767), | 324 COMPARE_PC_REL_COMPACT(bgezalc(a0, 32767), |
313 "18847fff bgezalc a0, 32767", 32767); | 325 "18847fff bgezalc a0, 32767", 32767); |
314 | 326 |
315 COMPARE_PC_REL_COMPACT(blezalc(a0, -32768), | 327 COMPARE_PC_REL_COMPACT(blezalc(a0, -32768), |
316 "18048000 blezalc a0, -32768", -32768); | 328 "18048000 blezalc a0, -32768", -32768); |
317 COMPARE_PC_REL_COMPACT(blezalc(a0, -1), "1804ffff blezalc a0, -1", | 329 COMPARE_PC_REL_COMPACT(blezalc(a0, -1), "1804ffff blezalc a0, -1", |
318 -1); | 330 -1); |
319 COMPARE_PC_REL_COMPACT(blezalc(a0, 1), "18040001 blezalc a0, 1", 1); | 331 COMPARE_PC_REL_COMPACT(blezalc(a0, 1), "18040001 blezalc a0, 1", 1); |
320 COMPARE_PC_REL_COMPACT(blezalc(a0, 32767), | 332 COMPARE_PC_REL_COMPACT(blezalc(a0, 32767), |
321 "18047fff blezalc a0, 32767", 32767); | 333 "18047fff blezalc a0, 32767", 32767); |
322 | 334 |
323 COMPARE_PC_REL_COMPACT(bltuc(a0, a1, -32768), | 335 COMPARE_PC_REL_COMPACT(bltuc(a0, a1, -32768), |
324 "1c858000 bltuc a0, a1, -32768", -32768); | 336 "1c858000 bltuc a0, a1, -32768", -32768); |
325 COMPARE_PC_REL_COMPACT(bltuc(a0, a1, -1), | 337 COMPARE_PC_REL_COMPACT(bltuc(a0, a1, -1), |
326 "1c85ffff bltuc a0, a1, -1", -1); | 338 "1c85ffff bltuc a0, a1, -1", -1); |
327 COMPARE_PC_REL_COMPACT(bltuc(a0, a1, 1), "1c850001 bltuc a0, a1, 1", | 339 COMPARE_PC_REL_COMPACT(bltuc(a0, a1, 1), "1c850001 bltuc a0, a1, 1", |
328 1); | 340 1); |
329 COMPARE_PC_REL_COMPACT(bltuc(a0, a1, 32767), | 341 COMPARE_PC_REL_COMPACT(bltuc(a0, a1, 32767), |
330 "1c857fff bltuc a0, a1, 32767", 32767); | 342 "1c857fff bltuc a0, a1, 32767", 32767); |
331 | 343 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 "58047fff blezc a0, 32767", 32767); | 381 "58047fff blezc a0, 32767", 32767); |
370 | 382 |
371 COMPARE_PC_REL_COMPACT(bltzc(a0, -32768), | 383 COMPARE_PC_REL_COMPACT(bltzc(a0, -32768), |
372 "5c848000 bltzc a0, -32768", -32768); | 384 "5c848000 bltzc a0, -32768", -32768); |
373 COMPARE_PC_REL_COMPACT(bltzc(a0, -1), "5c84ffff bltzc a0, -1", -1); | 385 COMPARE_PC_REL_COMPACT(bltzc(a0, -1), "5c84ffff bltzc a0, -1", -1); |
374 COMPARE_PC_REL_COMPACT(bltzc(a0, 1), "5c840001 bltzc a0, 1", 1); | 386 COMPARE_PC_REL_COMPACT(bltzc(a0, 1), "5c840001 bltzc a0, 1", 1); |
375 COMPARE_PC_REL_COMPACT(bltzc(a0, 32767), | 387 COMPARE_PC_REL_COMPACT(bltzc(a0, 32767), |
376 "5c847fff bltzc a0, 32767", 32767); | 388 "5c847fff bltzc a0, 32767", 32767); |
377 | 389 |
378 COMPARE_PC_REL_COMPACT(bltc(a0, a1, -32768), | 390 COMPARE_PC_REL_COMPACT(bltc(a0, a1, -32768), |
379 "5c858000 bltc a0, a1, -32768", -32768); | 391 "5c858000 bltc a0, a1, -32768", -32768); |
380 COMPARE_PC_REL_COMPACT(bltc(a0, a1, -1), | 392 COMPARE_PC_REL_COMPACT(bltc(a0, a1, -1), |
381 "5c85ffff bltc a0, a1, -1", -1); | 393 "5c85ffff bltc a0, a1, -1", -1); |
382 COMPARE_PC_REL_COMPACT(bltc(a0, a1, 1), "5c850001 bltc a0, a1, 1", | 394 COMPARE_PC_REL_COMPACT(bltc(a0, a1, 1), "5c850001 bltc a0, a1, 1", |
383 1); | 395 1); |
384 COMPARE_PC_REL_COMPACT(bltc(a0, a1, 32767), | 396 COMPARE_PC_REL_COMPACT(bltc(a0, a1, 32767), |
385 "5c857fff bltc a0, a1, 32767", 32767); | 397 "5c857fff bltc a0, a1, 32767", 32767); |
386 | 398 |
387 COMPARE_PC_REL_COMPACT(bgtzc(a0, -32768), | 399 COMPARE_PC_REL_COMPACT(bgtzc(a0, -32768), |
388 "5c048000 bgtzc a0, -32768", -32768); | 400 "5c048000 bgtzc a0, -32768", -32768); |
389 COMPARE_PC_REL_COMPACT(bgtzc(a0, -1), "5c04ffff bgtzc a0, -1", -1); | 401 COMPARE_PC_REL_COMPACT(bgtzc(a0, -1), "5c04ffff bgtzc a0, -1", -1); |
390 COMPARE_PC_REL_COMPACT(bgtzc(a0, 1), "5c040001 bgtzc a0, 1", 1); | 402 COMPARE_PC_REL_COMPACT(bgtzc(a0, 1), "5c040001 bgtzc a0, 1", 1); |
391 COMPARE_PC_REL_COMPACT(bgtzc(a0, 32767), | 403 COMPARE_PC_REL_COMPACT(bgtzc(a0, 32767), |
392 "5c047fff bgtzc a0, 32767", 32767); | 404 "5c047fff bgtzc a0, 32767", 32767); |
393 | 405 |
394 COMPARE_PC_REL_COMPACT(bc1eqz(-32768, f1), | 406 COMPARE_PC_REL_COMPACT(bc1eqz(-32768, f1), |
395 "45218000 bc1eqz f1, -32768", -32768); | 407 "45218000 bc1eqz f1, -32768", -32768); |
(...skipping 10 matching lines...) Expand all Loading... |
406 COMPARE_PC_REL_COMPACT(bc1nez(1, f1), "45a10001 bc1nez f1, 1", 1); | 418 COMPARE_PC_REL_COMPACT(bc1nez(1, f1), "45a10001 bc1nez f1, 1", 1); |
407 COMPARE_PC_REL_COMPACT(bc1nez(32767, f1), | 419 COMPARE_PC_REL_COMPACT(bc1nez(32767, f1), |
408 "45a17fff bc1nez f1, 32767", 32767); | 420 "45a17fff bc1nez f1, 32767", 32767); |
409 | 421 |
410 COMPARE_PC_REL_COMPACT(bovc(a1, a0, -1), "20a4ffff bovc a1, a0, -1", | 422 COMPARE_PC_REL_COMPACT(bovc(a1, a0, -1), "20a4ffff bovc a1, a0, -1", |
411 -1); | 423 -1); |
412 COMPARE_PC_REL_COMPACT(bovc(a0, a0, 1), "20840001 bovc a0, a0, 1", | 424 COMPARE_PC_REL_COMPACT(bovc(a0, a0, 1), "20840001 bovc a0, a0, 1", |
413 1); | 425 1); |
414 | 426 |
415 COMPARE_PC_REL_COMPACT(beqc(a0, a1, -32768), | 427 COMPARE_PC_REL_COMPACT(beqc(a0, a1, -32768), |
416 "20858000 beqc a0, a1, -32768", -32768); | 428 "20858000 beqc a0, a1, -32768", -32768); |
417 COMPARE_PC_REL_COMPACT(beqc(a0, a1, -1), "2085ffff beqc a0, a1, -1", | 429 COMPARE_PC_REL_COMPACT(beqc(a0, a1, -1), |
418 -1); | 430 "2085ffff beqc a0, a1, -1", -1); |
419 COMPARE_PC_REL_COMPACT(beqc(a0, a1, 1), "20850001 beqc a0, a1, 1", | 431 COMPARE_PC_REL_COMPACT(beqc(a0, a1, 1), "20850001 beqc a0, a1, 1", |
420 1); | 432 1); |
421 COMPARE_PC_REL_COMPACT(beqc(a0, a1, 32767), | 433 COMPARE_PC_REL_COMPACT(beqc(a0, a1, 32767), |
422 "20857fff beqc a0, a1, 32767", 32767); | 434 "20857fff beqc a0, a1, 32767", 32767); |
423 | 435 |
424 COMPARE_PC_REL_COMPACT(bnec(a0, a1, -32768), | 436 COMPARE_PC_REL_COMPACT(bnec(a0, a1, -32768), |
425 "60858000 bnec a0, a1, -32768", -32768); | 437 "60858000 bnec a0, a1, -32768", -32768); |
426 COMPARE_PC_REL_COMPACT(bnec(a0, a1, -1), "6085ffff bnec a0, a1, -1", | 438 COMPARE_PC_REL_COMPACT(bnec(a0, a1, -1), "6085ffff bnec a0, a1, -1", |
427 -1); | 439 -1); |
428 COMPARE_PC_REL_COMPACT(bnec(a0, a1, 1), "60850001 bnec a0, a1, 1", | 440 COMPARE_PC_REL_COMPACT(bnec(a0, a1, 1), "60850001 bnec a0, a1, 1", |
429 1); | 441 1); |
430 COMPARE_PC_REL_COMPACT(bnec(a0, a1, 32767), | 442 COMPARE_PC_REL_COMPACT(bnec(a0, a1, 32767), |
431 "60857fff bnec a0, a1, 32767", 32767); | 443 "60857fff bnec a0, a1, 32767", 32767); |
432 } | 444 } |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
829 | 841 |
830 if (IsMipsArchVariant(kMips32r6)) { | 842 if (IsMipsArchVariant(kMips32r6)) { |
831 COMPARE(addiupc(a0, 262143), "ec83ffff addiupc a0, 262143"); | 843 COMPARE(addiupc(a0, 262143), "ec83ffff addiupc a0, 262143"); |
832 COMPARE(addiupc(a0, -1), "ec87ffff addiupc a0, -1"); | 844 COMPARE(addiupc(a0, -1), "ec87ffff addiupc a0, -1"); |
833 COMPARE(addiupc(v0, 0), "ec400000 addiupc v0, 0"); | 845 COMPARE(addiupc(v0, 0), "ec400000 addiupc v0, 0"); |
834 COMPARE(addiupc(s1, 1), "ee200001 addiupc s1, 1"); | 846 COMPARE(addiupc(s1, 1), "ee200001 addiupc s1, 1"); |
835 COMPARE(addiupc(a0, -262144), "ec840000 addiupc a0, -262144"); | 847 COMPARE(addiupc(a0, -262144), "ec840000 addiupc a0, -262144"); |
836 } | 848 } |
837 | 849 |
838 if (IsMipsArchVariant(kMips32r6)) { | 850 if (IsMipsArchVariant(kMips32r6)) { |
839 COMPARE(jialc(a0, -32768), "f8048000 jialc a0, 0x8000"); | 851 COMPARE(jialc(a0, -32768), "f8048000 jialc a0, -32768"); |
840 COMPARE(jialc(a0, -1), "f804ffff jialc a0, 0xffff"); | 852 COMPARE(jialc(a0, -1), "f804ffff jialc a0, -1"); |
841 COMPARE(jialc(v0, 0), "f8020000 jialc v0, 0x0"); | 853 COMPARE(jialc(v0, 0), "f8020000 jialc v0, 0"); |
842 COMPARE(jialc(s1, 1), "f8110001 jialc s1, 0x1"); | 854 COMPARE(jialc(s1, 1), "f8110001 jialc s1, 1"); |
843 COMPARE(jialc(a0, 32767), "f8047fff jialc a0, 0x7fff"); | 855 COMPARE(jialc(a0, 32767), "f8047fff jialc a0, 32767"); |
844 } | 856 } |
845 | 857 |
846 VERIFY_RUN(); | 858 VERIFY_RUN(); |
847 } | 859 } |
848 | 860 |
849 | 861 |
850 TEST(Type1) { | 862 TEST(Type1) { |
851 SET_UP(); | 863 SET_UP(); |
852 if (IsMipsArchVariant(kMips32r6)) { | 864 if (IsMipsArchVariant(kMips32r6)) { |
853 COMPARE(seleqz(a0, a1, a2), "00a62035 seleqz a0, a1, a2"); | 865 COMPARE(seleqz(a0, a1, a2), "00a62035 seleqz a0, a1, a2"); |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1046 COMPARE(cvt_s_w(f22, f24), "4680c5a0 cvt.s.w f22, f24"); | 1058 COMPARE(cvt_s_w(f22, f24), "4680c5a0 cvt.s.w f22, f24"); |
1047 if (IsMipsArchVariant(kMips32r6) || IsMipsArchVariant(kMips32r2)) { | 1059 if (IsMipsArchVariant(kMips32r6) || IsMipsArchVariant(kMips32r2)) { |
1048 COMPARE(cvt_s_l(f22, f24), "46a0c5a0 cvt.s.l f22, f24"); | 1060 COMPARE(cvt_s_l(f22, f24), "46a0c5a0 cvt.s.l f22, f24"); |
1049 } | 1061 } |
1050 | 1062 |
1051 COMPARE(cvt_s_d(f22, f24), "4620c5a0 cvt.s.d f22, f24"); | 1063 COMPARE(cvt_s_d(f22, f24), "4620c5a0 cvt.s.d f22, f24"); |
1052 COMPARE(cvt_s_w(f22, f24), "4680c5a0 cvt.s.w f22, f24"); | 1064 COMPARE(cvt_s_w(f22, f24), "4680c5a0 cvt.s.w f22, f24"); |
1053 | 1065 |
1054 VERIFY_RUN(); | 1066 VERIFY_RUN(); |
1055 } | 1067 } |
OLD | NEW |