Reviewers: Paul Lind, kisg, palfia, kilvadyb,

Description:
MIPS: Avoid embedding x86 NaN constant in code when snapshot is created.

Due to a different NaN representation on MIPS, the canonical nan
constant embedded in generated code that comes from snapshot will differ from
the one used on MIPS hardware.

TEST=mozilla/ecma/Array/15.4.4.2.js
BUG=

Please review this at https://codereview.chromium.org/150663009/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+2, -2 lines):
  M src/mips/lithium-codegen-mips.cc


Index: src/mips/lithium-codegen-mips.cc
diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc index a2df23fc5a88bcd6278f2a46a3b70fc3944bb6bd..b216a7d02a8ea3834c70d9d8d7042d6fb90c030e 100644
--- a/src/mips/lithium-codegen-mips.cc
+++ b/src/mips/lithium-codegen-mips.cc
@@ -4222,8 +4222,8 @@ void LCodeGen::DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr) {

     // Only load canonical NaN if the comparison above set the overflow.
     __ bind(&is_nan);
-    __ Move(double_scratch,
-            FixedDoubleArray::canonical_not_the_hole_nan_as_double());
+    __ LoadRoot(at, Heap::kNanValueRootIndex);
+    __ ldc1(double_scratch, FieldMemOperand(at, HeapNumber::kValueOffset));
__ sdc1(double_scratch, MemOperand(scratch, instr->additional_index() <<
         element_size_shift));
     __ Branch(&done);


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to