| 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" // NOLINT | 5 #include "vm/globals.h" // NOLINT |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
| 10 #include "vm/longjump.h" | 10 #include "vm/longjump.h" |
| (...skipping 3298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3309 Register array, | 3309 Register array, |
| 3310 Register index) { | 3310 Register index) { |
| 3311 // Note that index is expected smi-tagged, (i.e, LSL 1) for all arrays. | 3311 // Note that index is expected smi-tagged, (i.e, LSL 1) for all arrays. |
| 3312 const intptr_t shift = Utils::ShiftForPowerOfTwo(index_scale) - kSmiTagShift; | 3312 const intptr_t shift = Utils::ShiftForPowerOfTwo(index_scale) - kSmiTagShift; |
| 3313 int32_t offset = | 3313 int32_t offset = |
| 3314 is_external ? 0 : (Instance::DataOffsetFor(cid) - kHeapObjectTag); | 3314 is_external ? 0 : (Instance::DataOffsetFor(cid) - kHeapObjectTag); |
| 3315 const OperandSize size = Address::OperandSizeFor(cid); | 3315 const OperandSize size = Address::OperandSizeFor(cid); |
| 3316 ASSERT(array != IP); | 3316 ASSERT(array != IP); |
| 3317 ASSERT(index != IP); | 3317 ASSERT(index != IP); |
| 3318 const Register base = is_load ? IP : index; | 3318 const Register base = is_load ? IP : index; |
| 3319 if ((offset != 0) || (size == kSWord) || (size == kDWord) || | 3319 if ((offset != 0) || (is_load && (size == kByte)) || (size == kHalfword) || |
| 3320 (size == kUnsignedHalfword) || (size == kSWord) || (size == kDWord) || |
| 3320 (size == kRegList)) { | 3321 (size == kRegList)) { |
| 3321 if (shift < 0) { | 3322 if (shift < 0) { |
| 3322 ASSERT(shift == -1); | 3323 ASSERT(shift == -1); |
| 3323 add(base, array, Operand(index, ASR, 1)); | 3324 add(base, array, Operand(index, ASR, 1)); |
| 3324 } else { | 3325 } else { |
| 3325 add(base, array, Operand(index, LSL, shift)); | 3326 add(base, array, Operand(index, LSL, shift)); |
| 3326 } | 3327 } |
| 3327 } else { | 3328 } else { |
| 3328 if (shift < 0) { | 3329 if (shift < 0) { |
| 3329 ASSERT(shift == -1); | 3330 ASSERT(shift == -1); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3428 }; | 3429 }; |
| 3429 | 3430 |
| 3430 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 3431 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
| 3431 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); | 3432 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); |
| 3432 return fpu_reg_names[reg]; | 3433 return fpu_reg_names[reg]; |
| 3433 } | 3434 } |
| 3434 | 3435 |
| 3435 } // namespace dart | 3436 } // namespace dart |
| 3436 | 3437 |
| 3437 #endif // defined TARGET_ARCH_ARM | 3438 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |