| 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 1944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1955 default: | 1955 default: |
| 1956 UNREACHABLE(); | 1956 UNREACHABLE(); |
| 1957 break; | 1957 break; |
| 1958 } | 1958 } |
| 1959 if (can_pack_into_smi()) { | 1959 if (can_pack_into_smi()) { |
| 1960 __ SmiTag(result); | 1960 __ SmiTag(result); |
| 1961 } else { | 1961 } else { |
| 1962 // If the value cannot fit in a smi then allocate a mint box for it. | 1962 // If the value cannot fit in a smi then allocate a mint box for it. |
| 1963 Register value = locs()->temp(0).reg(); | 1963 Register value = locs()->temp(0).reg(); |
| 1964 Register temp = locs()->temp(1).reg(); | 1964 Register temp = locs()->temp(1).reg(); |
| 1965 // Value register needs to be manually preserved on allocation slow-path. |
| 1966 locs()->live_registers()->Add(locs()->temp(0), kUnboxedInt32); |
| 1967 |
| 1965 ASSERT(result != value); | 1968 ASSERT(result != value); |
| 1966 __ MoveRegister(value, result); | 1969 __ MoveRegister(value, result); |
| 1967 __ SmiTag(result); | 1970 __ SmiTag(result); |
| 1968 | 1971 |
| 1969 Label done; | 1972 Label done; |
| 1970 __ TestImmediate(value, 0xC0000000); | 1973 __ TestImmediate(value, 0xC0000000); |
| 1971 __ b(&done, EQ); | 1974 __ b(&done, EQ); |
| 1972 BoxAllocationSlowPath::Allocate( | 1975 BoxAllocationSlowPath::Allocate( |
| 1973 compiler, this, compiler->mint_class(), result, temp); | 1976 compiler, this, compiler->mint_class(), result, temp); |
| 1974 __ eor(temp, temp, Operand(temp)); | 1977 __ eor(temp, temp, Operand(temp)); |
| (...skipping 4936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6911 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); | 6914 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); |
| 6912 #if defined(DEBUG) | 6915 #if defined(DEBUG) |
| 6913 __ LoadImmediate(R4, kInvalidObjectPointer); | 6916 __ LoadImmediate(R4, kInvalidObjectPointer); |
| 6914 __ LoadImmediate(R5, kInvalidObjectPointer); | 6917 __ LoadImmediate(R5, kInvalidObjectPointer); |
| 6915 #endif | 6918 #endif |
| 6916 } | 6919 } |
| 6917 | 6920 |
| 6918 } // namespace dart | 6921 } // namespace dart |
| 6919 | 6922 |
| 6920 #endif // defined TARGET_ARCH_ARM | 6923 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |