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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 COMPARE(ext_(s6, s7, 30, 2), | 518 COMPARE(ext_(s6, s7, 30, 2), |
519 "7ef60f80 ext s6, s7, 30, 2"); | 519 "7ef60f80 ext s6, s7, 30, 2"); |
520 COMPARE(ext_(v0, v1, 0, 32), | 520 COMPARE(ext_(v0, v1, 0, 32), |
521 "7c62f800 ext v0, v1, 0, 32"); | 521 "7c62f800 ext v0, v1, 0, 32"); |
522 } | 522 } |
523 | 523 |
524 VERIFY_RUN(); | 524 VERIFY_RUN(); |
525 } | 525 } |
526 | 526 |
527 | 527 |
528 // Tests only seleqz, selnez, seleqz.fmt and selnez.fmt | |
529 TEST(Type1) { | 528 TEST(Type1) { |
| 529 SET_UP(); |
530 if (IsMipsArchVariant(kMips32r6)) { | 530 if (IsMipsArchVariant(kMips32r6)) { |
531 SET_UP(); | |
532 COMPARE(seleqz(a0, a1, a2), "00a62035 seleqz a0, a1, a2"); | 531 COMPARE(seleqz(a0, a1, a2), "00a62035 seleqz a0, a1, a2"); |
533 COMPARE(selnez(a0, a1, a2), "00a62037 selnez a0, a1, a2"); | 532 COMPARE(selnez(a0, a1, a2), "00a62037 selnez a0, a1, a2"); |
534 | 533 |
535 | 534 |
536 COMPARE(seleqz(D, f3, f4, f5), "462520d4 seleqz.d f3, f4, f5"); | 535 COMPARE(seleqz_d(f3, f4, f5), "462520d4 seleqz.d f3, f4, f5"); |
537 COMPARE(selnez(D, f3, f4, f5), "462520d7 selnez.d f3, f4, f5"); | 536 COMPARE(selnez_d(f3, f4, f5), "462520d7 selnez.d f3, f4, f5"); |
| 537 COMPARE(seleqz_s(f3, f4, f5), "460520d4 seleqz.s f3, f4, f5"); |
| 538 COMPARE(selnez_s(f3, f4, f5), "460520d7 selnez.s f3, f4, f5"); |
538 | 539 |
539 COMPARE(min_d(f3, f4, f5), "462520dc min.d f3, f4, f5"); | 540 COMPARE(min_d(f3, f4, f5), "462520dc min.d f3, f4, f5"); |
540 COMPARE(max_d(f3, f4, f5), "462520de max.d f3, f4, f5"); | 541 COMPARE(max_d(f3, f4, f5), "462520de max.d f3, f4, f5"); |
| 542 |
| 543 COMPARE(sel_s(f3, f4, f5), "460520d0 sel.s f3, f4, f5"); |
| 544 COMPARE(sel_d(f3, f4, f5), "462520d0 sel.d f3, f4, f5"); |
| 545 |
541 COMPARE(rint_d(f8, f6), "4620321a rint.d f8, f6"); | 546 COMPARE(rint_d(f8, f6), "4620321a rint.d f8, f6"); |
| 547 COMPARE(rint_s(f8, f6), "4600321a rint.s f8, f6"); |
542 | 548 |
543 VERIFY_RUN(); | 549 COMPARE(min_s(f3, f4, f5), "460520dc min.s f3, f4, f5"); |
| 550 COMPARE(max_s(f3, f4, f5), "460520de max.s f3, f4, f5"); |
| 551 |
| 552 COMPARE(mina_d(f3, f4, f5), "462520dd mina.d f3, f4, f5"); |
| 553 COMPARE(mina_s(f3, f4, f5), "460520dd mina.s f3, f4, f5"); |
| 554 |
| 555 COMPARE(maxa_d(f3, f4, f5), "462520df maxa.d f3, f4, f5"); |
| 556 COMPARE(maxa_s(f3, f4, f5), "460520df maxa.s f3, f4, f5"); |
544 } | 557 } |
| 558 |
| 559 COMPARE(trunc_w_d(f8, f6), "4620320d trunc.w.d f8, f6"); |
| 560 COMPARE(trunc_w_s(f8, f6), "4600320d trunc.w.s f8, f6"); |
| 561 |
| 562 COMPARE(round_w_s(f8, f6), "4600320c round.w.s f8, f6"); |
| 563 COMPARE(round_w_d(f8, f6), "4620320c round.w.d f8, f6"); |
| 564 |
| 565 COMPARE(round_l_s(f8, f6), "46003208 round.l.s f8, f6"); |
| 566 COMPARE(round_l_d(f8, f6), "46203208 round.l.d f8, f6"); |
| 567 |
| 568 COMPARE(floor_w_s(f8, f6), "4600320f floor.w.s f8, f6"); |
| 569 COMPARE(floor_w_d(f8, f6), "4620320f floor.w.d f8, f6"); |
| 570 |
| 571 COMPARE(floor_l_s(f8, f6), "4600320b floor.l.s f8, f6"); |
| 572 COMPARE(floor_l_d(f8, f6), "4620320b floor.l.d f8, f6"); |
| 573 |
| 574 COMPARE(ceil_w_s(f8, f6), "4600320e ceil.w.s f8, f6"); |
| 575 COMPARE(ceil_w_d(f8, f6), "4620320e ceil.w.d f8, f6"); |
| 576 |
| 577 COMPARE(ceil_l_s(f8, f6), "4600320a ceil.l.s f8, f6"); |
| 578 COMPARE(ceil_l_d(f8, f6), "4620320a ceil.l.d f8, f6"); |
| 579 |
| 580 COMPARE(sub_s(f10, f8, f6), "46064281 sub.s f10, f8, f6"); |
| 581 COMPARE(sub_d(f10, f8, f6), "46264281 sub.d f10, f8, f6"); |
| 582 |
| 583 COMPARE(sqrt_s(f8, f6), "46003204 sqrt.s f8, f6"); |
| 584 COMPARE(sqrt_d(f8, f6), "46203204 sqrt.d f8, f6"); |
| 585 |
| 586 COMPARE(neg_s(f8, f6), "46003207 neg.s f8, f6"); |
| 587 COMPARE(neg_d(f8, f6), "46203207 neg.d f8, f6"); |
| 588 |
| 589 COMPARE(mul_s(f8, f6, f4), "46043202 mul.s f8, f6, f4"); |
| 590 COMPARE(mul_d(f8, f6, f4), "46243202 mul.d f8, f6, f4"); |
| 591 |
| 592 COMPARE(rsqrt_s(f8, f6), "46003216 rsqrt.s f8, f6"); |
| 593 COMPARE(rsqrt_d(f8, f6), "46203216 rsqrt.d f8, f6"); |
| 594 |
| 595 COMPARE(recip_s(f8, f6), "46003215 recip.s f8, f6"); |
| 596 COMPARE(recip_d(f8, f6), "46203215 recip.d f8, f6"); |
| 597 |
| 598 COMPARE(mov_s(f6, f4), "46002186 mov.s f6, f4"); |
| 599 COMPARE(mov_d(f6, f4), "46202186 mov.d f6, f4"); |
| 600 |
| 601 if (IsMipsArchVariant(kMips32r2)) { |
| 602 COMPARE(trunc_l_d(f8, f6), "46203209 trunc.l.d f8, f6"); |
| 603 COMPARE(trunc_l_s(f8, f6), "46003209 trunc.l.s f8, f6"); |
| 604 |
| 605 COMPARE(movz_s(f6, f4, t0), "46082192 movz.s f6, f4, t0"); |
| 606 COMPARE(movz_d(f6, f4, t0), "46282192 movz.d f6, f4, t0"); |
| 607 |
| 608 COMPARE(movt_s(f6, f4, 4), "46112191 movt.s f6, f4, cc(1)"); |
| 609 COMPARE(movt_d(f6, f4, 4), "46312191 movt.d f6, f4, cc(1)"); |
| 610 |
| 611 COMPARE(movf_s(f6, f4, 4), "46102191 movf.s f6, f4, cc(1)"); |
| 612 COMPARE(movf_d(f6, f4, 4), "46302191 movf.d f6, f4, cc(1)"); |
| 613 |
| 614 COMPARE(movn_s(f6, f4, t0), "46082193 movn.s f6, f4, t0"); |
| 615 COMPARE(movn_d(f6, f4, t0), "46282193 movn.d f6, f4, t0"); |
| 616 } |
| 617 VERIFY_RUN(); |
545 } | 618 } |
OLD | NEW |