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

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

Issue 1046873004: MIPS: Refactor simulator and add selection instructions for r6. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 86
87 // Verify that all invocations of the COMPARE macro passed successfully. 87 // Verify that all invocations of the COMPARE macro passed successfully.
88 // Exit with a failure if at least one of the tests failed. 88 // Exit with a failure if at least one of the tests failed.
89 #define VERIFY_RUN() \ 89 #define VERIFY_RUN() \
90 if (failure) { \ 90 if (failure) { \
91 V8_Fatal(__FILE__, __LINE__, "MIPS Disassembler tests failed.\n"); \ 91 V8_Fatal(__FILE__, __LINE__, "MIPS Disassembler tests failed.\n"); \
92 } 92 }
93 93
94 94
95 TEST(Type1) {
96 if (kArchVariant == kMips64r6) {
97 SET_UP();
98 COMPARE(seleqz(a0, a1, a2), "00853035 seleqz a0, a1, a2");
99 COMPARE(selnez(a0, a1, a2), "00853037 selnez a0, a1, a2");
100
101
102 COMPARE(seleqz(D, f3, f4, f5), "462428d4 seleqz.D f4, f5, f3");
103 COMPARE(selnez(D, f3, f4, f5), "462428d7 selnez.D f4, f5, f3");
104
105 /*COMPARE(min(D, f3, f4, f5),
106 "462428dc min.D f4, f5, f3");
107 COMPARE(max(D, f3, f4, f5),
108 "462428de max.D f4, f5, f3");*/
109 VERIFY_RUN();
110 }
111 }
112
113
95 TEST(Type0) { 114 TEST(Type0) {
96 SET_UP(); 115 SET_UP();
97 116
98 COMPARE(addu(a0, a1, a2), 117 COMPARE(addu(a0, a1, a2),
99 "00a62021 addu a0, a1, a2"); 118 "00a62021 addu a0, a1, a2");
100 COMPARE(daddu(a0, a1, a2), 119 COMPARE(daddu(a0, a1, a2),
101 "00a6202d daddu a0, a1, a2"); 120 "00a6202d daddu a0, a1, a2");
102 COMPARE(addu(a6, a7, t0), 121 COMPARE(addu(a6, a7, t0),
103 "016c5021 addu a6, a7, t0"); 122 "016c5021 addu a6, a7, t0");
104 COMPARE(daddu(a6, a7, t0), 123 COMPARE(daddu(a6, a7, t0),
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 "7c62f804 ins v0, v1, 0, 32"); 683 "7c62f804 ins v0, v1, 0, 32");
665 COMPARE(ext_(a0, a1, 31, 1), 684 COMPARE(ext_(a0, a1, 31, 1),
666 "7ca407c0 ext a0, a1, 31, 1"); 685 "7ca407c0 ext a0, a1, 31, 1");
667 COMPARE(ext_(s6, s7, 30, 2), 686 COMPARE(ext_(s6, s7, 30, 2),
668 "7ef60f80 ext s6, s7, 30, 2"); 687 "7ef60f80 ext s6, s7, 30, 2");
669 COMPARE(ext_(v0, v1, 0, 32), 688 COMPARE(ext_(v0, v1, 0, 32),
670 "7c62f800 ext v0, v1, 0, 32"); 689 "7c62f800 ext v0, v1, 0, 32");
671 690
672 VERIFY_RUN(); 691 VERIFY_RUN();
673 } 692 }
OLDNEW
« test/cctest/test-assembler-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