| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 1935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1946 default: | 1946 default: |
| 1947 UNREACHABLE(); | 1947 UNREACHABLE(); |
| 1948 break; | 1948 break; |
| 1949 } | 1949 } |
| 1950 if (can_pack_into_smi()) { | 1950 if (can_pack_into_smi()) { |
| 1951 __ SmiTag(result); | 1951 __ SmiTag(result); |
| 1952 } else { | 1952 } else { |
| 1953 // If the value cannot fit in a smi then allocate a mint box for it. | 1953 // If the value cannot fit in a smi then allocate a mint box for it. |
| 1954 Register value = locs()->temp(0).reg(); | 1954 Register value = locs()->temp(0).reg(); |
| 1955 Register temp = locs()->temp(1).reg(); | 1955 Register temp = locs()->temp(1).reg(); |
| 1956 // Value register needs to be manually preserved on allocation slow-path. |
| 1957 locs()->live_registers()->Add(locs()->temp(0), kUnboxedInt32); |
| 1958 |
| 1956 ASSERT(result != value); | 1959 ASSERT(result != value); |
| 1957 __ MoveRegister(value, result); | 1960 __ MoveRegister(value, result); |
| 1958 __ SmiTag(result); | 1961 __ SmiTag(result); |
| 1959 | 1962 |
| 1960 Label done; | 1963 Label done; |
| 1961 __ TestImmediate(value, 0xC0000000); | 1964 __ TestImmediate(value, 0xC0000000); |
| 1962 __ b(&done, EQ); | 1965 __ b(&done, EQ); |
| 1963 BoxAllocationSlowPath::Allocate( | 1966 BoxAllocationSlowPath::Allocate( |
| 1964 compiler, this, compiler->mint_class(), result, temp); | 1967 compiler, this, compiler->mint_class(), result, temp); |
| 1965 __ eor(temp, temp, Operand(temp)); | 1968 __ eor(temp, temp, Operand(temp)); |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2126 __ b(&store_float64x2, EQ); | 2129 __ b(&store_float64x2, EQ); |
| 2127 | 2130 |
| 2128 // Fall through. | 2131 // Fall through. |
| 2129 __ b(&store_pointer); | 2132 __ b(&store_pointer); |
| 2130 | 2133 |
| 2131 if (!compiler->is_optimizing()) { | 2134 if (!compiler->is_optimizing()) { |
| 2132 locs()->live_registers()->Add(locs()->in(0)); | 2135 locs()->live_registers()->Add(locs()->in(0)); |
| 2133 locs()->live_registers()->Add(locs()->in(1)); | 2136 locs()->live_registers()->Add(locs()->in(1)); |
| 2134 } | 2137 } |
| 2135 | 2138 |
| 2139 // Manually preserve temp which could be clobbered on the slow path. |
| 2140 locs()->live_registers()->Add(locs()->temp(0)); |
| 2141 |
| 2136 { | 2142 { |
| 2137 __ Bind(&store_double); | 2143 __ Bind(&store_double); |
| 2138 EnsureMutableBox(compiler, | 2144 EnsureMutableBox(compiler, |
| 2139 this, | 2145 this, |
| 2140 temp, | 2146 temp, |
| 2141 compiler->double_class(), | 2147 compiler->double_class(), |
| 2142 instance_reg, | 2148 instance_reg, |
| 2143 offset_in_bytes_, | 2149 offset_in_bytes_, |
| 2144 temp2); | 2150 temp2); |
| 2145 __ CopyDoubleField(temp, value_reg, TMP, temp2, fpu_temp); | 2151 __ CopyDoubleField(temp, value_reg, TMP, temp2, fpu_temp); |
| (...skipping 4756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6902 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); | 6908 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); |
| 6903 #if defined(DEBUG) | 6909 #if defined(DEBUG) |
| 6904 __ LoadImmediate(R4, kInvalidObjectPointer); | 6910 __ LoadImmediate(R4, kInvalidObjectPointer); |
| 6905 __ LoadImmediate(R5, kInvalidObjectPointer); | 6911 __ LoadImmediate(R5, kInvalidObjectPointer); |
| 6906 #endif | 6912 #endif |
| 6907 } | 6913 } |
| 6908 | 6914 |
| 6909 } // namespace dart | 6915 } // namespace dart |
| 6910 | 6916 |
| 6911 #endif // defined TARGET_ARCH_ARM | 6917 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |