Reviewers: danno, Paul Lind, kisg,

Description:
MIPS: Fix for cctest test-api/ExternalArrays.

On MIPS a different constant value is used by the FPU when converting undefined
values.

BUG=
TEST=


Please review this at http://codereview.chromium.org/9447015/

Affected files:
  M test/cctest/test-api.cc


Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index a7e45d18ef5a69c3e823c3705b6f4e9acaefb8f0..78f4703464f0b6a3a42dcdb687d3d77582506775 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -12734,6 +12734,13 @@ static int ExternalArrayElementSize(v8::ExternalArrayType array_type) {
 }


+#if defined(V8_TARGET_ARCH_MIPS) && !defined(USE_SIMULATOR)
+static const int kUndefinedResult = static_cast<int>(0x80000000 - 1);
+#else
+static const int kUndefinedResult = static_cast<int>(0x80000000);
+#endif
+
+
 template <class ExternalArrayClass, class ElementType>
 static void ExternalArrayTestHelper(v8::ExternalArrayType array_type,
                                     int64_t low,
@@ -12910,7 +12917,7 @@ static void ExternalArrayTestHelper(v8::ExternalArrayType array_type,
   if (array_type == v8::kExternalDoubleArray ||
       array_type == v8::kExternalFloatArray) {
     CHECK_EQ(
-        static_cast<int>(0x80000000),
+        static_cast<int>(kUndefinedResult),
static_cast<int>(jsobj->GetElement(7)->ToObjectChecked()->Number()));
   } else {
     CHECK_EQ(0, static_cast<int>(


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to