| Index: src/arm/lithium-codegen-arm.cc
|
| diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
|
| index 939485d55a2459b5ce9d7a8c25d92c2a55250694..26be2413084e0f1482be7cde94740f5a851908e4 100644
|
| --- a/src/arm/lithium-codegen-arm.cc
|
| +++ b/src/arm/lithium-codegen-arm.cc
|
| @@ -1904,6 +1904,20 @@ void LCodeGen::DoConstantS(LConstantS* instr) {
|
| void LCodeGen::DoConstantD(LConstantD* instr) {
|
| DCHECK(instr->result()->IsDoubleRegister());
|
| DwVfpRegister result = ToDoubleRegister(instr->result());
|
| +#if V8_HOST_ARCH_IA32
|
| + // Need some crappy work-around for x87 sNaN -> qNaN breakage in simulator
|
| + // builds.
|
| + uint64_t bits = instr->bits();
|
| + if ((bits & V8_UINT64_C(0x7FF8000000000000)) ==
|
| + V8_UINT64_C(0x7FF0000000000000)) {
|
| + uint32_t lo = static_cast<uint32_t>(bits);
|
| + uint32_t hi = static_cast<uint32_t>(bits >> 32);
|
| + __ mov(ip, Operand(lo));
|
| + __ mov(scratch0(), Operand(hi));
|
| + __ vmov(result, ip, scratch0());
|
| + return;
|
| + }
|
| +#endif
|
| double v = instr->value();
|
| __ Vmov(result, v, scratch0());
|
| }
|
|
|