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; |
} |