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

Unified Diff: src/serialize.cc

Issue 10093008: MIPS: Convert NaN values back for ia32 when running on simulator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/serialize.cc
diff --git a/src/serialize.cc b/src/serialize.cc
index c6f9971816eb31f3e591988c410dae6215b86a59..e36a5c149047b2d6aa8b18ad8e598a361af92e82 100644
--- a/src/serialize.cc
+++ b/src/serialize.cc
@@ -749,6 +749,14 @@ void Deserializer::ReadObject(int space_number,
((space == HEAP->lo_space()) && (space_number == kLargeCode));
ASSERT(HeapObject::FromAddress(address)->IsCode() == is_codespace);
#endif
+
+#ifdef USE_SIMULATOR
+ // The serializer may have converted all x86 NaN values to MIPS NaN values.
+ // Convert them back. IsNaN returns true for both kinds of NaN.
+ // Alignment and speed are non-issues, as this only happens on the simulator.
+ HeapObject* obj = HeapObject::cast(*write_back);
+ if (obj->IsNaN()) HeapNumber::cast(obj)->set_value(OS::nan_value());
+#endif
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698