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

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

Issue 1144373003: MIPS: Implemented PC-relative instructions for R6. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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
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 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 COMPARE(dbitswap(a0, a1), "7c052024 dbitswap a0, a1"); 678 COMPARE(dbitswap(a0, a1), "7c052024 dbitswap a0, a1");
679 COMPARE(dbitswap(t8, s0), "7c10c024 dbitswap t8, s0"); 679 COMPARE(dbitswap(t8, s0), "7c10c024 dbitswap t8, s0");
680 } 680 }
681 681
682 COMPARE(abs_s(f6, f8), "46004185 abs.s f6, f8"); 682 COMPARE(abs_s(f6, f8), "46004185 abs.s f6, f8");
683 COMPARE(abs_d(f10, f12), "46206285 abs.d f10, f12"); 683 COMPARE(abs_d(f10, f12), "46206285 abs.d f10, f12");
684 684
685 COMPARE(div_s(f2, f4, f6), "46062083 div.s f2, f4, f6"); 685 COMPARE(div_s(f2, f4, f6), "46062083 div.s f2, f4, f6");
686 COMPARE(div_d(f2, f4, f6), "46262083 div.d f2, f4, f6"); 686 COMPARE(div_d(f2, f4, f6), "46262083 div.d f2, f4, f6");
687 687
688 if (kArchVariant == kMips64r6) {
689 COMPARE(align(v0, a0, a1, 0), "7c851220 align v0, a0, a1, 0");
690 COMPARE(align(v0, a0, a1, 1), "7c851260 align v0, a0, a1, 1");
691 COMPARE(align(v0, a0, a1, 2), "7c8512a0 align v0, a0, a1, 2");
692 COMPARE(align(v0, a0, a1, 3), "7c8512e0 align v0, a0, a1, 3");
693 }
694
695 if (kArchVariant == kMips64r6) {
696 COMPARE(dalign(v0, a0, a1, 0), "7c851224 dalign v0, a0, a1, 0");
697 COMPARE(dalign(v0, a0, a1, 1), "7c851264 dalign v0, a0, a1, 1");
698 COMPARE(dalign(v0, a0, a1, 2), "7c8512a4 dalign v0, a0, a1, 2");
699 COMPARE(dalign(v0, a0, a1, 3), "7c8512e4 dalign v0, a0, a1, 3");
700 COMPARE(dalign(v0, a0, a1, 4), "7c851324 dalign v0, a0, a1, 4");
701 COMPARE(dalign(v0, a0, a1, 5), "7c851364 dalign v0, a0, a1, 5");
702 COMPARE(dalign(v0, a0, a1, 6), "7c8513a4 dalign v0, a0, a1, 6");
703 COMPARE(dalign(v0, a0, a1, 7), "7c8513e4 dalign v0, a0, a1, 7");
704 }
705
706 if (kArchVariant == kMips64r6) {
707 COMPARE(aluipc(v0, 0), "ec5f0000 aluipc v0, 0");
708 COMPARE(aluipc(v0, 1), "ec5f0001 aluipc v0, 1");
709 COMPARE(aluipc(v0, 32767), "ec5f7fff aluipc v0, 32767");
710 COMPARE(aluipc(v0, -32768), "ec5f8000 aluipc v0, -32768");
711 COMPARE(aluipc(v0, -1), "ec5fffff aluipc v0, -1");
712 }
713
714 if (kArchVariant == kMips64r6) {
715 COMPARE(lwpc(a5, 0), "ed280000 lwpc a5, 0");
716 COMPARE(lwpc(a5, 4), "ed280004 lwpc a5, 4");
717 COMPARE(lwpc(a5, -4), "ed2ffffc lwpc a5, -4");
718 }
719
720 if (kArchVariant == kMips64r6) {
721 COMPARE(jic(t0, 16), "d80c0010 jic t0, 16");
722 COMPARE(jic(t0, 4), "d80c0004 jic t0, 4");
723 COMPARE(jic(t0, -32), "d80cffe0 jic t0, -32");
724 }
725
726 if (kArchVariant == kMips64r6) {
727 COMPARE(beqzc(a0, 16), "d8800010 beqzc a0, 0x10");
728 COMPARE(beqzc(a0, 4), "d8800004 beqzc a0, 0x4");
729 COMPARE(beqzc(a0, -32), "d89fffe0 beqzc a0, 0x1fffe0");
730 }
731
732 if (kArchVariant == kMips64r6) {
733 COMPARE(ldpc(v0, 256), "ec580100 ldpc v0, 256");
734 COMPARE(ldpc(a0, -1), "ec9bffff ldpc a0, -1");
735 COMPARE(ldpc(a1, 0), "ecb80000 ldpc a1, 0");
736 }
737
738 if (kArchVariant == kMips64r6) {
739 COMPARE(addiupc(a0, 262143), "ec83ffff addiupc a0, 262143");
740 COMPARE(addiupc(a0, -1), "ec87ffff addiupc a0, -1");
741 COMPARE(addiupc(v0, 0), "ec400000 addiupc v0, 0");
742 COMPARE(addiupc(s1, 1), "ee200001 addiupc s1, 1");
743 COMPARE(addiupc(a0, -262144), "ec840000 addiupc a0, -262144");
744 }
745
746 if (kArchVariant == kMips64r6) {
747 COMPARE(jialc(a0, -32768), "f8048000 jialc a0, 0x8000");
748 COMPARE(jialc(a0, -1), "f804ffff jialc a0, 0xffff");
749 COMPARE(jialc(v0, 0), "f8020000 jialc v0, 0x0");
750 COMPARE(jialc(s1, 1), "f8110001 jialc s1, 0x1");
751 COMPARE(jialc(a0, 32767), "f8047fff jialc a0, 0x7fff");
752 }
753
688 VERIFY_RUN(); 754 VERIFY_RUN();
689 } 755 }
690 756
691 757
692 TEST(Type1) { 758 TEST(Type1) {
693 SET_UP(); 759 SET_UP();
694 if (kArchVariant == kMips64r6) { 760 if (kArchVariant == kMips64r6) {
695 COMPARE(seleqz(a0, a1, a2), "00a62035 seleqz a0, a1, a2"); 761 COMPARE(seleqz(a0, a1, a2), "00a62035 seleqz a0, a1, a2");
696 COMPARE(selnez(a0, a1, a2), "00a62037 selnez a0, a1, a2"); 762 COMPARE(selnez(a0, a1, a2), "00a62037 selnez a0, a1, a2");
697 763
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 COMPARE(cvt_s_w(f22, f24), "4680c5a0 cvt.s.w f22, f24"); 951 COMPARE(cvt_s_w(f22, f24), "4680c5a0 cvt.s.w f22, f24");
886 if (kArchVariant == kMips64r6 || kArchVariant == kMips64r2) { 952 if (kArchVariant == kMips64r6 || kArchVariant == kMips64r2) {
887 COMPARE(cvt_s_l(f22, f24), "46a0c5a0 cvt.s.l f22, f24"); 953 COMPARE(cvt_s_l(f22, f24), "46a0c5a0 cvt.s.l f22, f24");
888 } 954 }
889 955
890 COMPARE(cvt_s_d(f22, f24), "4620c5a0 cvt.s.d f22, f24"); 956 COMPARE(cvt_s_d(f22, f24), "4620c5a0 cvt.s.d f22, f24");
891 COMPARE(cvt_s_w(f22, f24), "4680c5a0 cvt.s.w f22, f24"); 957 COMPARE(cvt_s_w(f22, f24), "4680c5a0 cvt.s.w f22, f24");
892 958
893 VERIFY_RUN(); 959 VERIFY_RUN();
894 } 960 }
OLDNEW
« test/cctest/test-disasm-mips.cc ('K') | « test/cctest/test-disasm-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698