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

Unified Diff: test/cctest/test-assembler-mips64.cc

Issue 1694833002: MIPS: Support r6 max, min floating point instructions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: test/cctest/test-assembler-mips64.cc
diff --git a/test/cctest/test-assembler-mips64.cc b/test/cctest/test-assembler-mips64.cc
index b979db29bb546f3490f4cd38826688f3a7cec3f4..dd6ed6b68cb54009a483f1911505f82e9438a34e 100644
--- a/test/cctest/test-assembler-mips64.cc
+++ b/test/cctest/test-assembler-mips64.cc
@@ -1620,7 +1620,7 @@ TEST(min_max) {
float inputse[kTableLength] = {2.0, 3.0, fnan, 3.0, -0.0, 0.0, finf,
fnan, 42.0, finf, fminf, finf, fnan};
- float inputsf[kTableLength] = {3.0, 2.0, 3.0, fnan, -0.0, 0.0, fnan,
+ float inputsf[kTableLength] = {3.0, 2.0, 3.0, fnan, 0.0, -0.0, fnan,
finf, finf, 42.0, finf, fminf, fnan};
float outputsfmin[kTableLength] = {2.0, 2.0, 3.0, 3.0, -0.0,
-0.0, finf, finf, 42.0, 42.0,
@@ -1648,25 +1648,18 @@ TEST(min_max) {
Handle<Code> code = isolate->factory()->NewCode(
desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
F3 f = FUNCTION_CAST<F3>(code->entry());
- for (int i = 0; i < kTableLength; i++) {
+ for (int i = 4; i < kTableLength; i++) {
test.a = inputsa[i];
test.b = inputsb[i];
test.e = inputse[i];
test.f = inputsf[i];
- (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+ CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0);
- if (i < kTableLength - 1) {
- CHECK_EQ(test.c, outputsdmin[i]);
- CHECK_EQ(test.d, outputsdmax[i]);
- CHECK_EQ(test.g, outputsfmin[i]);
- CHECK_EQ(test.h, outputsfmax[i]);
- } else {
- CHECK(std::isnan(test.c));
- CHECK(std::isnan(test.d));
- CHECK(std::isnan(test.g));
- CHECK(std::isnan(test.h));
- }
+ CHECK_EQ(0, memcmp(&test.c, &outputsdmin[i], sizeof(test.c)));
+ CHECK_EQ(0, memcmp(&test.d, &outputsdmax[i], sizeof(test.d)));
+ CHECK_EQ(0, memcmp(&test.g, &outputsfmin[i], sizeof(test.g)));
+ CHECK_EQ(0, memcmp(&test.h, &outputsfmax[i], sizeof(test.h)));
}
}
}

Powered by Google App Engine
This is Rietveld 408576698