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 5082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5093 } else { | 5093 } else { |
5094 store_base = ToRegister(instr->temp()); | 5094 store_base = ToRegister(instr->temp()); |
5095 Register key = ToRegister(instr->key()); | 5095 Register key = ToRegister(instr->key()); |
5096 bool key_is_tagged = instr->hydrogen()->key()->representation().IsSmi(); | 5096 bool key_is_tagged = instr->hydrogen()->key()->representation().IsSmi(); |
5097 CalcKeyedArrayBaseRegister(store_base, elements, key, key_is_tagged, | 5097 CalcKeyedArrayBaseRegister(store_base, elements, key, key_is_tagged, |
5098 instr->hydrogen()->elements_kind()); | 5098 instr->hydrogen()->elements_kind()); |
5099 offset = FixedDoubleArray::OffsetOfElementAt(instr->additional_index()); | 5099 offset = FixedDoubleArray::OffsetOfElementAt(instr->additional_index()); |
5100 } | 5100 } |
5101 | 5101 |
5102 if (instr->NeedsCanonicalization()) { | 5102 if (instr->NeedsCanonicalization()) { |
5103 DoubleRegister dbl_scratch = double_scratch(); | 5103 __ CanonicalizeNaN(double_scratch(), value); |
5104 __ Fmov(dbl_scratch, | 5104 __ Str(double_scratch(), FieldMemOperand(store_base, offset)); |
5105 FixedDoubleArray::canonical_not_the_hole_nan_as_double()); | |
5106 __ Fmaxnm(dbl_scratch, dbl_scratch, value); | |
5107 __ Str(dbl_scratch, FieldMemOperand(store_base, offset)); | |
5108 } else { | 5105 } else { |
5109 __ Str(value, FieldMemOperand(store_base, offset)); | 5106 __ Str(value, FieldMemOperand(store_base, offset)); |
5110 } | 5107 } |
5111 } | 5108 } |
5112 | 5109 |
5113 | 5110 |
5114 void LCodeGen::DoStoreKeyedFixed(LStoreKeyedFixed* instr) { | 5111 void LCodeGen::DoStoreKeyedFixed(LStoreKeyedFixed* instr) { |
5115 Register value = ToRegister(instr->value()); | 5112 Register value = ToRegister(instr->value()); |
5116 Register elements = ToRegister(instr->elements()); | 5113 Register elements = ToRegister(instr->elements()); |
5117 Register scratch = no_reg; | 5114 Register scratch = no_reg; |
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5876 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 5873 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
5877 // Index is equal to negated out of object property index plus 1. | 5874 // Index is equal to negated out of object property index plus 1. |
5878 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5875 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
5879 __ Ldr(result, FieldMemOperand(result, | 5876 __ Ldr(result, FieldMemOperand(result, |
5880 FixedArray::kHeaderSize - kPointerSize)); | 5877 FixedArray::kHeaderSize - kPointerSize)); |
5881 __ Bind(deferred->exit()); | 5878 __ Bind(deferred->exit()); |
5882 __ Bind(&done); | 5879 __ Bind(&done); |
5883 } | 5880 } |
5884 | 5881 |
5885 } } // namespace v8::internal | 5882 } } // namespace v8::internal |
OLD | NEW |