Index: test/cctest/test-assembler-mips.cc |
diff --git a/test/cctest/test-assembler-mips.cc b/test/cctest/test-assembler-mips.cc |
index 514173e8209b5c0eb676822b3a1dbbb8febe74fe..7cdd90718a8ae1bdf3312bf76d99117f4a4d8ee2 100644 |
--- a/test/cctest/test-assembler-mips.cc |
+++ b/test/cctest/test-assembler-mips.cc |
@@ -1802,11 +1802,13 @@ TEST(rint_s) { |
TEST(mina_maxa) { |
if (IsMipsArchVariant(kMips32r6)) { |
- const int tableLength = 12; |
+ const int tableLength = 15; |
paul.l...
2015/08/07 04:48:14
nit: name capitalization does not conform to style
Djordje.Pesic
2015/08/07 06:31:42
Done. Also changed tableLength to kTableLength in
|
CcTest::InitializeVM(); |
Isolate* isolate = CcTest::i_isolate(); |
HandleScope scope(isolate); |
MacroAssembler assm(isolate, NULL, 0); |
+ const double dblNaN = std::numeric_limits<double>::quiet_NaN(); |
+ const float fltNaN = std::numeric_limits<float>::quiet_NaN(); |
paul.l...
2015/08/07 04:48:14
nit: these two names also don't conform. Suggest d
Djordje.Pesic
2015/08/07 06:31:42
Done.
|
typedef struct test_float { |
double a; |
@@ -1821,52 +1823,36 @@ TEST(mina_maxa) { |
TestFloat test; |
double inputsa[tableLength] = { |
- 5.3, 4.8, 6.1, |
- 9.8, 9.8, 9.8, |
- -10.0, -8.9, -9.8, |
- -10.0, -8.9, -9.8 |
+ 5.3, 4.8, 6.1, 9.8, 9.8, 9.8, -10.0, -8.9, |
+ -9.8, -10.0, -8.9, -9.8, dblNaN, 3.0, dblNaN |
}; |
double inputsb[tableLength] = { |
- 4.8, 5.3, 6.1, |
- -10.0, -8.9, -9.8, |
- 9.8, 9.8, 9.8, |
- -9.8, -11.2, -9.8 |
+ 4.8, 5.3, 6.1, -10.0, -8.9, -9.8, 9.8, 9.8, |
+ 9.8, -9.8, -11.2, -9.8, 3.0, dblNaN, dblNaN |
}; |
double resd[tableLength] = { |
- 4.8, 4.8, 6.1, |
- 9.8, -8.9, 9.8, |
- 9.8, -8.9, 9.8, |
- -9.8, -8.9, -9.8 |
+ 4.8, 4.8, 6.1, 9.8, -8.9, -9.8, 9.8, -8.9, |
+ -9.8, -9.8, -8.9, -9.8, 3.0, 3.0, dblNaN |
}; |
double resd1[tableLength] = { |
- 5.3, 5.3, 6.1, |
- -10.0, 9.8, 9.8, |
- -10.0, 9.8, 9.8, |
- -10.0, -11.2, -9.8 |
+ 5.3, 5.3, 6.1, -10.0, 9.8, 9.8, -10.0, 9.8, |
+ 9.8, -10.0, -11.2, -9.8, 3.0, 3.0, dblNaN |
}; |
float inputsc[tableLength] = { |
- 5.3, 4.8, 6.1, |
- 9.8, 9.8, 9.8, |
- -10.0, -8.9, -9.8, |
- -10.0, -8.9, -9.8 |
+ 5.3, 4.8, 6.1, 9.8, 9.8, 9.8, -10.0, -8.9, |
+ -9.8, -10.0, -8.9, -9.8, fltNaN, 3.0, fltNaN |
}; |
float inputsd[tableLength] = { |
- 4.8, 5.3, 6.1, |
- -10.0, -8.9, -9.8, |
- 9.8, 9.8, 9.8, |
- -9.8, -11.2, -9.8 |
+ 4.8, 5.3, 6.1, -10.0, -8.9, -9.8, 9.8, 9.8, |
+ 9.8, -9.8, -11.2, -9.8, 3.0, fltNaN, fltNaN |
}; |
float resf[tableLength] = { |
- 4.8, 4.8, 6.1, |
- 9.8, -8.9, 9.8, |
- 9.8, -8.9, 9.8, |
- -9.8, -8.9, -9.8 |
+ 4.8, 4.8, 6.1, 9.8, -8.9, -9.8, 9.8, -8.9, |
+ -9.8, -9.8, -8.9, -9.8, 3.0, 3.0, fltNaN |
}; |
float resf1[tableLength] = { |
- 5.3, 5.3, 6.1, |
- -10.0, 9.8, 9.8, |
- -10.0, 9.8, 9.8, |
- -10.0, -11.2, -9.8 |
+ 5.3, 5.3, 6.1, -10.0, 9.8, 9.8, -10.0, 9.8, |
+ 9.8, -10.0, -11.2, -9.8, 3.0, 3.0, fltNaN |
}; |
__ ldc1(f2, MemOperand(a0, offsetof(TestFloat, a)) ); |
@@ -1895,10 +1881,17 @@ TEST(mina_maxa) { |
test.c = inputsc[i]; |
test.d = inputsd[i]; |
(CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0)); |
- CHECK_EQ(test.resd, resd[i]); |
- CHECK_EQ(test.resf, resf[i]); |
- CHECK_EQ(test.resd1, resd1[i]); |
- CHECK_EQ(test.resf1, resf1[i]); |
+ if (i < tableLength - 1) { |
+ CHECK_EQ(test.resd, resd[i]); |
+ CHECK_EQ(test.resf, resf[i]); |
+ CHECK_EQ(test.resd1, resd1[i]); |
+ CHECK_EQ(test.resf1, resf1[i]); |
+ } else { |
+ DCHECK(std::isnan(test.resd)); |
+ DCHECK(std::isnan(test.resf)); |
+ DCHECK(std::isnan(test.resd1)); |
+ DCHECK(std::isnan(test.resf1)); |
+ } |
} |
} |
} |