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

Unified Diff: test/cctest/test-assembler-mips.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-mips.cc
diff --git a/test/cctest/test-assembler-mips.cc b/test/cctest/test-assembler-mips.cc
index 54bfa58385190510ca5b611e214a19c1bf173084..b8a04267e79dc0ec328063cfd1824875f1d6caf6 100644
--- a/test/cctest/test-assembler-mips.cc
+++ b/test/cctest/test-assembler-mips.cc
@@ -1490,7 +1490,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,
@@ -1524,19 +1524,12 @@ TEST(min_max) {
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