| 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" | 5 #include "vm/globals.h" |
| 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/locations.h" |
| 9 #include "vm/simulator.h" | 10 #include "vm/simulator.h" |
| 10 #include "vm/runtime_entry.h" | 11 #include "vm/runtime_entry.h" |
| 11 #include "vm/stack_frame.h" | 12 #include "vm/stack_frame.h" |
| 12 #include "vm/stub_code.h" | 13 #include "vm/stub_code.h" |
| 13 | 14 |
| 14 // An extra check since we are assuming the existence of /proc/cpuinfo below. | 15 // An extra check since we are assuming the existence of /proc/cpuinfo below. |
| 15 #if !defined(USING_SIMULATOR) && !defined(__linux__) | 16 #if !defined(USING_SIMULATOR) && !defined(__linux__) |
| 16 #error ARM cross-compile only supported on Linux | 17 #error ARM cross-compile only supported on Linux |
| 17 #endif | 18 #endif |
| 18 | 19 |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 B21 = 1 << 21, | 143 B21 = 1 << 21, |
| 143 B22 = 1 << 22, | 144 B22 = 1 << 22, |
| 144 B23 = 1 << 23, | 145 B23 = 1 << 23, |
| 145 B24 = 1 << 24, | 146 B24 = 1 << 24, |
| 146 B25 = 1 << 25, | 147 B25 = 1 << 25, |
| 147 B26 = 1 << 26, | 148 B26 = 1 << 26, |
| 148 B27 = 1 << 27, | 149 B27 = 1 << 27, |
| 149 }; | 150 }; |
| 150 | 151 |
| 151 | 152 |
| 153 Address Address::StackSlotAddress(const Location& stack_slot) { |
| 154 ASSERT(stack_slot.IsStackSlot() || stack_slot.IsDoubleStackSlot() || |
| 155 stack_slot.IsQuadStackSlot()); |
| 156 return Address(FP, stack_slot.ToStackSlotOffset()); |
| 157 } |
| 158 |
| 159 |
| 152 uint32_t Address::encoding3() const { | 160 uint32_t Address::encoding3() const { |
| 153 if (kind_ == Immediate) { | 161 if (kind_ == Immediate) { |
| 154 uint32_t offset = encoding_ & kOffset12Mask; | 162 uint32_t offset = encoding_ & kOffset12Mask; |
| 155 ASSERT(offset < 256); | 163 ASSERT(offset < 256); |
| 156 return (encoding_ & ~kOffset12Mask) | B22 | | 164 return (encoding_ & ~kOffset12Mask) | B22 | |
| 157 ((offset & 0xf0) << 4) | (offset & 0xf); | 165 ((offset & 0xf0) << 4) | (offset & 0xf); |
| 158 } | 166 } |
| 159 ASSERT(kind_ == IndexRegister); | 167 ASSERT(kind_ == IndexRegister); |
| 160 return encoding_; | 168 return encoding_; |
| 161 } | 169 } |
| (...skipping 2211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2373 | 2381 |
| 2374 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 2382 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
| 2375 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); | 2383 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); |
| 2376 return fpu_reg_names[reg]; | 2384 return fpu_reg_names[reg]; |
| 2377 } | 2385 } |
| 2378 | 2386 |
| 2379 } // namespace dart | 2387 } // namespace dart |
| 2380 | 2388 |
| 2381 #endif // defined TARGET_ARCH_ARM | 2389 #endif // defined TARGET_ARCH_ARM |
| 2382 | 2390 |
| OLD | NEW |