| 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/assembler.h" | 8 #include "vm/assembler.h" | 
| 9 #include "vm/constants_arm.h" | 9 #include "vm/constants_arm.h" | 
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" | 
| (...skipping 14 matching lines...) Expand all  Loading... | 
| 25 | 25 | 
| 26   Register reg; | 26   Register reg; | 
| 27   ic_data_load_end_ = | 27   ic_data_load_end_ = | 
| 28       InstructionPattern::DecodeLoadWordFromPool(end_ - 2 * Instr::kInstrSize, | 28       InstructionPattern::DecodeLoadWordFromPool(end_ - 2 * Instr::kInstrSize, | 
| 29                                                  ®, | 29                                                  ®, | 
| 30                                                  &target_code_pool_index_); | 30                                                  &target_code_pool_index_); | 
| 31   ASSERT(reg == CODE_REG); | 31   ASSERT(reg == CODE_REG); | 
| 32 } | 32 } | 
| 33 | 33 | 
| 34 | 34 | 
| 35 int CallPattern::DeoptCallPatternLengthInBytes() { | 35 int CallPattern::DeoptCallPatternLengthInInstructions() { | 
| 36   const ARMVersion version = TargetCPUFeatures::arm_version(); | 36   const ARMVersion version = TargetCPUFeatures::arm_version(); | 
| 37   if ((version == ARMv5TE) || (version == ARMv6)) { | 37   if ((version == ARMv5TE) || (version == ARMv6)) { | 
| 38     return 5 * Instr::kInstrSize; | 38     return 5; | 
| 39   } else { | 39   } else { | 
| 40     ASSERT(version == ARMv7); | 40     ASSERT(version == ARMv7); | 
| 41     return 3 * Instr::kInstrSize; | 41     return 3; | 
| 42   } | 42   } | 
| 43 } | 43 } | 
| 44 | 44 | 
|  | 45 int CallPattern::DeoptCallPatternLengthInBytes() { | 
|  | 46   return DeoptCallPatternLengthInInstructions() * Instr::kInstrSize; | 
|  | 47 } | 
|  | 48 | 
| 45 | 49 | 
| 46 NativeCallPattern::NativeCallPattern(uword pc, const Code& code) | 50 NativeCallPattern::NativeCallPattern(uword pc, const Code& code) | 
| 47     : object_pool_(ObjectPool::Handle(code.GetObjectPool())), | 51     : object_pool_(ObjectPool::Handle(code.GetObjectPool())), | 
| 48       end_(pc), | 52       end_(pc), | 
| 49       native_function_pool_index_(-1), | 53       native_function_pool_index_(-1), | 
| 50       target_code_pool_index_(-1) { | 54       target_code_pool_index_(-1) { | 
| 51   ASSERT(code.ContainsInstructionAt(pc)); | 55   ASSERT(code.ContainsInstructionAt(pc)); | 
| 52   // Last instruction: blx lr. | 56   // Last instruction: blx lr. | 
| 53   ASSERT(*(reinterpret_cast<uword*>(end_) - 1) == 0xe12fff3e); | 57   ASSERT(*(reinterpret_cast<uword*>(end_) - 1) == 0xe12fff3e); | 
| 54 | 58 | 
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 285   } else { | 289   } else { | 
| 286     ASSERT(version == ARMv7); | 290     ASSERT(version == ARMv7); | 
| 287     return bx_lr->InstructionBits() == instruction; | 291     return bx_lr->InstructionBits() == instruction; | 
| 288   } | 292   } | 
| 289   return false; | 293   return false; | 
| 290 } | 294 } | 
| 291 | 295 | 
| 292 }  // namespace dart | 296 }  // namespace dart | 
| 293 | 297 | 
| 294 #endif  // defined TARGET_ARCH_ARM | 298 #endif  // defined TARGET_ARCH_ARM | 
| OLD | NEW | 
|---|