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 3442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3453 kSaveFPRegs, | 3453 kSaveFPRegs, |
3454 EMIT_REMEMBERED_SET, | 3454 EMIT_REMEMBERED_SET, |
3455 check_needed); | 3455 check_needed); |
3456 } | 3456 } |
3457 } | 3457 } |
3458 | 3458 |
3459 | 3459 |
3460 void LCodeGen::DoStoreKeyedFastDoubleElement( | 3460 void LCodeGen::DoStoreKeyedFastDoubleElement( |
3461 LStoreKeyedFastDoubleElement* instr) { | 3461 LStoreKeyedFastDoubleElement* instr) { |
3462 XMMRegister value = ToDoubleRegister(instr->value()); | 3462 XMMRegister value = ToDoubleRegister(instr->value()); |
3463 Label have_value; | |
3464 | 3463 |
3465 __ ucomisd(value, value); | 3464 if (instr->NeedsCanonicalization()) { |
3466 __ j(parity_odd, &have_value); // NaN. | 3465 Label have_value; |
3467 | 3466 |
3468 ExternalReference canonical_nan_reference = | 3467 __ ucomisd(value, value); |
3469 ExternalReference::address_of_canonical_non_hole_nan(); | 3468 __ j(parity_odd, &have_value); // NaN. |
3470 __ movdbl(value, Operand::StaticVariable(canonical_nan_reference)); | 3469 |
3471 __ bind(&have_value); | 3470 ExternalReference canonical_nan_reference = |
| 3471 ExternalReference::address_of_canonical_non_hole_nan(); |
| 3472 __ movdbl(value, Operand::StaticVariable(canonical_nan_reference)); |
| 3473 __ bind(&have_value); |
| 3474 } |
3472 | 3475 |
3473 Operand double_store_operand = BuildFastArrayOperand( | 3476 Operand double_store_operand = BuildFastArrayOperand( |
3474 instr->elements(), instr->key(), FAST_DOUBLE_ELEMENTS, | 3477 instr->elements(), instr->key(), FAST_DOUBLE_ELEMENTS, |
3475 FixedDoubleArray::kHeaderSize - kHeapObjectTag); | 3478 FixedDoubleArray::kHeaderSize - kHeapObjectTag); |
3476 __ movdbl(double_store_operand, value); | 3479 __ movdbl(double_store_operand, value); |
3477 } | 3480 } |
3478 | 3481 |
3479 | 3482 |
3480 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { | 3483 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { |
3481 ASSERT(ToRegister(instr->context()).is(esi)); | 3484 ASSERT(ToRegister(instr->context()).is(esi)); |
(...skipping 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4995 FixedArray::kHeaderSize - kPointerSize)); | 4998 FixedArray::kHeaderSize - kPointerSize)); |
4996 __ bind(&done); | 4999 __ bind(&done); |
4997 } | 5000 } |
4998 | 5001 |
4999 | 5002 |
5000 #undef __ | 5003 #undef __ |
5001 | 5004 |
5002 } } // namespace v8::internal | 5005 } } // namespace v8::internal |
5003 | 5006 |
5004 #endif // V8_TARGET_ARCH_IA32 | 5007 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |