| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2239 // Check for the hole value. | 2239 // Check for the hole value. |
| 2240 if (instr->hydrogen()->RequiresHoleCheck()) { | 2240 if (instr->hydrogen()->RequiresHoleCheck()) { |
| 2241 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); | 2241 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); |
| 2242 DeoptimizeIf(equal, instr->environment()); | 2242 DeoptimizeIf(equal, instr->environment()); |
| 2243 } | 2243 } |
| 2244 } | 2244 } |
| 2245 | 2245 |
| 2246 | 2246 |
| 2247 void LCodeGen::DoLoadKeyedFastDoubleElement( | 2247 void LCodeGen::DoLoadKeyedFastDoubleElement( |
| 2248 LLoadKeyedFastDoubleElement* instr) { | 2248 LLoadKeyedFastDoubleElement* instr) { |
| 2249 Register elements = ToRegister(instr->elements()); | |
| 2250 XMMRegister result(ToDoubleRegister(instr->result())); | 2249 XMMRegister result(ToDoubleRegister(instr->result())); |
| 2251 | 2250 |
| 2252 if (instr->hydrogen()->RequiresHoleCheck()) { | 2251 if (instr->hydrogen()->RequiresHoleCheck()) { |
| 2253 int offset = FixedDoubleArray::kHeaderSize - kHeapObjectTag + | 2252 int offset = FixedDoubleArray::kHeaderSize - kHeapObjectTag + |
| 2254 sizeof(kHoleNanLower32); | 2253 sizeof(kHoleNanLower32); |
| 2255 Operand hole_check_operand = BuildFastArrayOperand( | 2254 Operand hole_check_operand = BuildFastArrayOperand( |
| 2256 instr->elements(), | 2255 instr->elements(), |
| 2257 instr->key(), | 2256 instr->key(), |
| 2258 JSObject::FAST_DOUBLE_ELEMENTS, | 2257 JSObject::FAST_DOUBLE_ELEMENTS, |
| 2259 offset); | 2258 offset); |
| (...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3094 times_pointer_size, | 3093 times_pointer_size, |
| 3095 FixedArray::kHeaderSize)); | 3094 FixedArray::kHeaderSize)); |
| 3096 __ RecordWrite(elements, key, value); | 3095 __ RecordWrite(elements, key, value); |
| 3097 } | 3096 } |
| 3098 } | 3097 } |
| 3099 | 3098 |
| 3100 | 3099 |
| 3101 void LCodeGen::DoStoreKeyedFastDoubleElement( | 3100 void LCodeGen::DoStoreKeyedFastDoubleElement( |
| 3102 LStoreKeyedFastDoubleElement* instr) { | 3101 LStoreKeyedFastDoubleElement* instr) { |
| 3103 XMMRegister value = ToDoubleRegister(instr->value()); | 3102 XMMRegister value = ToDoubleRegister(instr->value()); |
| 3104 Register elements = ToRegister(instr->elements()); | |
| 3105 Label have_value; | 3103 Label have_value; |
| 3106 | 3104 |
| 3107 __ ucomisd(value, value); | 3105 __ ucomisd(value, value); |
| 3108 __ j(parity_odd, &have_value); // NaN. | 3106 __ j(parity_odd, &have_value); // NaN. |
| 3109 | 3107 |
| 3110 ExternalReference canonical_nan_reference = | |
| 3111 ExternalReference::address_of_canonical_non_hole_nan(); | |
| 3112 __ Set(kScratchRegister, BitCast<uint64_t>( | 3108 __ Set(kScratchRegister, BitCast<uint64_t>( |
| 3113 FixedDoubleArray::canonical_not_the_hole_nan_as_double())); | 3109 FixedDoubleArray::canonical_not_the_hole_nan_as_double())); |
| 3114 __ movq(value, kScratchRegister); | 3110 __ movq(value, kScratchRegister); |
| 3115 | 3111 |
| 3116 __ bind(&have_value); | 3112 __ bind(&have_value); |
| 3117 Operand double_store_operand = BuildFastArrayOperand( | 3113 Operand double_store_operand = BuildFastArrayOperand( |
| 3118 instr->elements(), instr->key(), JSObject::FAST_DOUBLE_ELEMENTS, | 3114 instr->elements(), instr->key(), JSObject::FAST_DOUBLE_ELEMENTS, |
| 3119 FixedDoubleArray::kHeaderSize - kHeapObjectTag); | 3115 FixedDoubleArray::kHeaderSize - kHeapObjectTag); |
| 3120 __ movsd(double_store_operand, value); | 3116 __ movsd(double_store_operand, value); |
| 3121 } | 3117 } |
| (...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4108 RegisterEnvironmentForDeoptimization(environment); | 4104 RegisterEnvironmentForDeoptimization(environment); |
| 4109 ASSERT(osr_pc_offset_ == -1); | 4105 ASSERT(osr_pc_offset_ == -1); |
| 4110 osr_pc_offset_ = masm()->pc_offset(); | 4106 osr_pc_offset_ = masm()->pc_offset(); |
| 4111 } | 4107 } |
| 4112 | 4108 |
| 4113 #undef __ | 4109 #undef __ |
| 4114 | 4110 |
| 4115 } } // namespace v8::internal | 4111 } } // namespace v8::internal |
| 4116 | 4112 |
| 4117 #endif // V8_TARGET_ARCH_X64 | 4113 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |