OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 3403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3414 kSaveFPRegs, | 3414 kSaveFPRegs, |
3415 EMIT_REMEMBERED_SET, | 3415 EMIT_REMEMBERED_SET, |
3416 check_needed); | 3416 check_needed); |
3417 } | 3417 } |
3418 } | 3418 } |
3419 | 3419 |
3420 | 3420 |
3421 void LCodeGen::DoStoreKeyedFastDoubleElement( | 3421 void LCodeGen::DoStoreKeyedFastDoubleElement( |
3422 LStoreKeyedFastDoubleElement* instr) { | 3422 LStoreKeyedFastDoubleElement* instr) { |
3423 XMMRegister value = ToDoubleRegister(instr->value()); | 3423 XMMRegister value = ToDoubleRegister(instr->value()); |
3424 Label have_value; | |
3425 | 3424 |
3426 __ ucomisd(value, value); | 3425 if (instr->NeedsCanonicalization()) { |
3427 __ j(parity_odd, &have_value); // NaN. | 3426 Label have_value; |
3428 | 3427 |
3429 __ Set(kScratchRegister, BitCast<uint64_t>( | 3428 __ ucomisd(value, value); |
3430 FixedDoubleArray::canonical_not_the_hole_nan_as_double())); | 3429 __ j(parity_odd, &have_value); // NaN. |
3431 __ movq(value, kScratchRegister); | |
3432 | 3430 |
3433 __ bind(&have_value); | 3431 __ Set(kScratchRegister, BitCast<uint64_t>( |
| 3432 FixedDoubleArray::canonical_not_the_hole_nan_as_double())); |
| 3433 __ movq(value, kScratchRegister); |
| 3434 |
| 3435 __ bind(&have_value); |
| 3436 } |
| 3437 |
3434 Operand double_store_operand = BuildFastArrayOperand( | 3438 Operand double_store_operand = BuildFastArrayOperand( |
3435 instr->elements(), instr->key(), FAST_DOUBLE_ELEMENTS, | 3439 instr->elements(), instr->key(), FAST_DOUBLE_ELEMENTS, |
3436 FixedDoubleArray::kHeaderSize - kHeapObjectTag); | 3440 FixedDoubleArray::kHeaderSize - kHeapObjectTag); |
3437 __ movsd(double_store_operand, value); | 3441 __ movsd(double_store_operand, value); |
3438 } | 3442 } |
3439 | 3443 |
3440 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { | 3444 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { |
3441 ASSERT(ToRegister(instr->object()).is(rdx)); | 3445 ASSERT(ToRegister(instr->object()).is(rdx)); |
3442 ASSERT(ToRegister(instr->key()).is(rcx)); | 3446 ASSERT(ToRegister(instr->key()).is(rcx)); |
3443 ASSERT(ToRegister(instr->value()).is(rax)); | 3447 ASSERT(ToRegister(instr->value()).is(rax)); |
(...skipping 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4771 FixedArray::kHeaderSize - kPointerSize)); | 4775 FixedArray::kHeaderSize - kPointerSize)); |
4772 __ bind(&done); | 4776 __ bind(&done); |
4773 } | 4777 } |
4774 | 4778 |
4775 | 4779 |
4776 #undef __ | 4780 #undef __ |
4777 | 4781 |
4778 } } // namespace v8::internal | 4782 } } // namespace v8::internal |
4779 | 4783 |
4780 #endif // V8_TARGET_ARCH_X64 | 4784 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |