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

Side by Side Diff: test/cctest/test-disasm-mips.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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 if (!DisassembleAndCompare(progcounter, compare_string)) failure = true; \ 83 if (!DisassembleAndCompare(progcounter, compare_string)) failure = true; \
84 } 84 }
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 // tests only seleqz, selnez, seleqz.fmt and selnez.fmt
94 TEST(Type1) {
95 SET_UP();
96 if (IsMipsArchVariant(kMips32r6)) {
97 COMPARE(seleqz(a0, a1, a2), "00853035 seleqz a0, a1, a2");
98 COMPARE(selnez(a0, a1, a2), "00853037 selnez a0, a1, a2");
99
100 COMPARE(seleqz(S, f0, f1, f2), "45000894 seleqz.S f0, f1, f2");
101 COMPARE(selnez(S, f0, f1, f2), "45000897 selnez.S f0, f1, f2");
102 COMPARE(seleqz(D, f3, f4, f5), "00853035 seleqz.D f3, f4, f5");
103 COMPARE(selnez(D, f3, f4, f5), "00853037 selnez.D f3, f4, f5");
104 }
105 VERIFY_RUN();
106 }
93 107
94 108
95 TEST(Type0) { 109 TEST(Type0) {
96 SET_UP(); 110 SET_UP();
97 111
98 COMPARE(addu(a0, a1, a2), 112 COMPARE(addu(a0, a1, a2),
99 "00a62021 addu a0, a1, a2"); 113 "00a62021 addu a0, a1, a2");
100 COMPARE(addu(t2, t3, t4), 114 COMPARE(addu(t2, t3, t4),
101 "016c5021 addu t2, t3, t4"); 115 "016c5021 addu t2, t3, t4");
102 COMPARE(addu(v0, v1, s0), 116 COMPARE(addu(v0, v1, s0),
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 COMPARE(ext_(a0, a1, 31, 1), 530 COMPARE(ext_(a0, a1, 31, 1),
517 "7ca407c0 ext a0, a1, 31, 1"); 531 "7ca407c0 ext a0, a1, 31, 1");
518 COMPARE(ext_(s6, s7, 30, 2), 532 COMPARE(ext_(s6, s7, 30, 2),
519 "7ef60f80 ext s6, s7, 30, 2"); 533 "7ef60f80 ext s6, s7, 30, 2");
520 COMPARE(ext_(v0, v1, 0, 32), 534 COMPARE(ext_(v0, v1, 0, 32),
521 "7c62f800 ext v0, v1, 0, 32"); 535 "7c62f800 ext v0, v1, 0, 32");
522 } 536 }
523 537
524 VERIFY_RUN(); 538 VERIFY_RUN();
525 } 539 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698