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

Unified Diff: src/arm/simulator-arm.cc

Issue 863633002: Use signaling NaN for holes in fixed double arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Restore SSE2 Created 5 years, 11 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: src/arm/simulator-arm.cc
diff --git a/src/arm/simulator-arm.cc b/src/arm/simulator-arm.cc
index 50c42c350ddf095305d0957ba6edd7d95de84ccb..544a621df4fc7d539349aa00b0456e6b973cb3e8 100644
--- a/src/arm/simulator-arm.cc
+++ b/src/arm/simulator-arm.cc
@@ -1917,8 +1917,13 @@ void Simulator::SoftwareInterrupt(Instruction* instr) {
double Simulator::canonicalizeNaN(double value) {
- return (FPSCR_default_NaN_mode_ && std::isnan(value)) ?
- FixedDoubleArray::canonical_not_the_hole_nan_as_double() : value;
+ // Default NaN value, see "NaN handling" in "IEEE 754 standard implementation
+ // choices" of the ARM Reference Manual.
+ const uint64_t kDefaultNaN = V8_UINT64_C(0x7FF8000000000000);
+ if (FPSCR_default_NaN_mode_ && std::isnan(value)) {
+ value = bit_cast<double>(kDefaultNaN);
+ }
+ return value;
}

Powered by Google App Engine
This is Rietveld 408576698