 Chromium Code Reviews
 Chromium Code Reviews| Index: src/platform-posix.cc | 
| diff --git a/src/platform-posix.cc b/src/platform-posix.cc | 
| index 3bc83733ca21249808c74388dd98de6be4125497..3a3e3970153ef9e89f5d2f857bb6540b9b40fd64 100644 | 
| --- a/src/platform-posix.cc | 
| +++ b/src/platform-posix.cc | 
| @@ -149,7 +149,19 @@ UNARY_MATH_FUNCTION(sqrt, CreateSqrtFunction()) | 
| double OS::nan_value() { | 
| // NAN from math.h is defined in C99 and not in POSIX. | 
| + | 
| +#if defined(V8_TARGET_ARCH_SH4) | 
| + // return a qNaN as exepcted by the v8 core. In sh4 tool chain, the NAN macro | 
| 
Jakob Kummerow
2012/11/07 11:18:24
nit: "Return", "expected"
 
remi.duraffort
2012/11/07 11:59:26
Fixed.
 | 
| + // is defined to be an sNaN while the C specifications require a qNaN. | 
| + union { | 
| + uint64_t ui64; | 
| + double d; | 
| + } value; | 
| + value.ui64 = (static_cast<uint64_t>(0x7ff00000) << 32) | 0x00000001; | 
| + return value.d; | 
| +#else | 
| return NAN; | 
| +#endif | 
| } |