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 3225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3236 | 3236 |
3237 void Assembler::LeaveStubFrame() { | 3237 void Assembler::LeaveStubFrame() { |
3238 LeaveDartFrame(); | 3238 LeaveDartFrame(); |
3239 } | 3239 } |
3240 | 3240 |
3241 | 3241 |
3242 void Assembler::NoMonomorphicCheckedEntry() { | 3242 void Assembler::NoMonomorphicCheckedEntry() { |
3243 buffer_.Reset(); | 3243 buffer_.Reset(); |
3244 bkpt(0); | 3244 bkpt(0); |
3245 bkpt(0); | 3245 bkpt(0); |
3246 bkpt(0); | |
3247 ASSERT(CodeSize() == Instructions::kCheckedEntryOffset); | 3246 ASSERT(CodeSize() == Instructions::kCheckedEntryOffset); |
3248 } | 3247 } |
3249 | 3248 |
3250 | 3249 |
3251 // R0 receiver, R9 guarded cid as Smi | 3250 // R0 receiver, R9 guarded cid as Smi |
3252 void Assembler::MonomorphicCheckedEntry() { | 3251 void Assembler::MonomorphicCheckedEntry() { |
3253 #if defined(TESTING) || defined(DEBUG) | 3252 #if defined(TESTING) || defined(DEBUG) |
3254 bool saved_use_far_branches = use_far_branches(); | 3253 bool saved_use_far_branches = use_far_branches(); |
3255 set_use_far_branches(false); | 3254 set_use_far_branches(false); |
3256 #endif | 3255 #endif |
3257 | 3256 |
3258 Label miss; | 3257 Label miss; |
3259 Bind(&miss); | 3258 Bind(&miss); |
3260 ldr(CODE_REG, Address(THR, Thread::monomorphic_miss_stub_offset())); | 3259 ldr(IP, Address(THR, Thread::monomorphic_miss_entry_offset())); |
3261 ldr(IP, FieldAddress(CODE_REG, Code::entry_point_offset())); | |
3262 bx(IP); | 3260 bx(IP); |
3263 | 3261 |
3264 Comment("MonomorphicCheckedEntry"); | 3262 Comment("MonomorphicCheckedEntry"); |
3265 ASSERT(CodeSize() == Instructions::kCheckedEntryOffset); | 3263 ASSERT(CodeSize() == Instructions::kCheckedEntryOffset); |
3266 LoadClassIdMayBeSmi(R4, R0); | 3264 LoadClassIdMayBeSmi(R4, R0); |
3267 SmiUntag(R9); | 3265 SmiUntag(R9); |
3268 cmp(R4, Operand(R9)); | 3266 cmp(R4, Operand(R9)); |
3269 b(&miss, NE); | 3267 b(&miss, NE); |
3270 | 3268 |
3271 // Fall through to unchecked entry. | 3269 // Fall through to unchecked entry. |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3548 | 3546 |
3549 | 3547 |
3550 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 3548 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
3551 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); | 3549 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); |
3552 return fpu_reg_names[reg]; | 3550 return fpu_reg_names[reg]; |
3553 } | 3551 } |
3554 | 3552 |
3555 } // namespace dart | 3553 } // namespace dart |
3556 | 3554 |
3557 #endif // defined TARGET_ARCH_ARM | 3555 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |