| Index: src/x64/lithium-codegen-x64.cc
|
| diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
|
| index 56ba6f34585179df27e6b419809857e74b2b1981..d545a6de5901c2e7e8cfd563adee14e12178efec 100644
|
| --- a/src/x64/lithium-codegen-x64.cc
|
| +++ b/src/x64/lithium-codegen-x64.cc
|
| @@ -3421,16 +3421,20 @@ void LCodeGen::DoStoreKeyedFastElement(LStoreKeyedFastElement* instr) {
|
| void LCodeGen::DoStoreKeyedFastDoubleElement(
|
| LStoreKeyedFastDoubleElement* instr) {
|
| XMMRegister value = ToDoubleRegister(instr->value());
|
| - Label have_value;
|
|
|
| - __ ucomisd(value, value);
|
| - __ j(parity_odd, &have_value); // NaN.
|
| + if (instr->NeedsCanonicalization()) {
|
| + Label have_value;
|
|
|
| - __ Set(kScratchRegister, BitCast<uint64_t>(
|
| - FixedDoubleArray::canonical_not_the_hole_nan_as_double()));
|
| - __ movq(value, kScratchRegister);
|
| + __ ucomisd(value, value);
|
| + __ j(parity_odd, &have_value); // NaN.
|
| +
|
| + __ Set(kScratchRegister, BitCast<uint64_t>(
|
| + FixedDoubleArray::canonical_not_the_hole_nan_as_double()));
|
| + __ movq(value, kScratchRegister);
|
| +
|
| + __ bind(&have_value);
|
| + }
|
|
|
| - __ bind(&have_value);
|
| Operand double_store_operand = BuildFastArrayOperand(
|
| instr->elements(), instr->key(), FAST_DOUBLE_ELEMENTS,
|
| FixedDoubleArray::kHeaderSize - kHeapObjectTag);
|
|
|