OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "arm64/lithium-codegen-arm64.h" | 7 #include "arm64/lithium-codegen-arm64.h" |
8 #include "arm64/lithium-gap-resolver-arm64.h" | 8 #include "arm64/lithium-gap-resolver-arm64.h" |
9 #include "code-stubs.h" | 9 #include "code-stubs.h" |
10 #include "stub-cache.h" | 10 #include "stub-cache.h" |
(...skipping 5148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5159 } else { | 5159 } else { |
5160 store_base = ToRegister(instr->temp()); | 5160 store_base = ToRegister(instr->temp()); |
5161 Register key = ToRegister(instr->key()); | 5161 Register key = ToRegister(instr->key()); |
5162 bool key_is_tagged = instr->hydrogen()->key()->representation().IsSmi(); | 5162 bool key_is_tagged = instr->hydrogen()->key()->representation().IsSmi(); |
5163 CalcKeyedArrayBaseRegister(store_base, elements, key, key_is_tagged, | 5163 CalcKeyedArrayBaseRegister(store_base, elements, key, key_is_tagged, |
5164 instr->hydrogen()->elements_kind()); | 5164 instr->hydrogen()->elements_kind()); |
5165 offset = FixedDoubleArray::OffsetOfElementAt(instr->additional_index()); | 5165 offset = FixedDoubleArray::OffsetOfElementAt(instr->additional_index()); |
5166 } | 5166 } |
5167 | 5167 |
5168 if (instr->NeedsCanonicalization()) { | 5168 if (instr->NeedsCanonicalization()) { |
5169 DoubleRegister dbl_scratch = double_scratch(); | 5169 __ CanonicalizeNaN(double_scratch(), value); |
5170 __ Fmov(dbl_scratch, | 5170 __ Str(double_scratch(), FieldMemOperand(store_base, offset)); |
5171 FixedDoubleArray::canonical_not_the_hole_nan_as_double()); | |
5172 __ Fmaxnm(dbl_scratch, dbl_scratch, value); | |
5173 __ Str(dbl_scratch, FieldMemOperand(store_base, offset)); | |
5174 } else { | 5171 } else { |
5175 __ Str(value, FieldMemOperand(store_base, offset)); | 5172 __ Str(value, FieldMemOperand(store_base, offset)); |
5176 } | 5173 } |
5177 } | 5174 } |
5178 | 5175 |
5179 | 5176 |
5180 void LCodeGen::DoStoreKeyedFixed(LStoreKeyedFixed* instr) { | 5177 void LCodeGen::DoStoreKeyedFixed(LStoreKeyedFixed* instr) { |
5181 Register value = ToRegister(instr->value()); | 5178 Register value = ToRegister(instr->value()); |
5182 Register elements = ToRegister(instr->elements()); | 5179 Register elements = ToRegister(instr->elements()); |
5183 Register scratch = no_reg; | 5180 Register scratch = no_reg; |
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5943 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 5940 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
5944 // Index is equal to negated out of object property index plus 1. | 5941 // Index is equal to negated out of object property index plus 1. |
5945 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5942 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
5946 __ Ldr(result, FieldMemOperand(result, | 5943 __ Ldr(result, FieldMemOperand(result, |
5947 FixedArray::kHeaderSize - kPointerSize)); | 5944 FixedArray::kHeaderSize - kPointerSize)); |
5948 __ Bind(deferred->exit()); | 5945 __ Bind(deferred->exit()); |
5949 __ Bind(&done); | 5946 __ Bind(&done); |
5950 } | 5947 } |
5951 | 5948 |
5952 } } // namespace v8::internal | 5949 } } // namespace v8::internal |
OLD | NEW |