Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: runtime/vm/instructions_arm.cc

Issue 1355953002: Fix lazy deoptimization from deferred code. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: speed up ia32 disassembler Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/instructions_arm.h ('k') | runtime/vm/instructions_arm64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 &reg, 29 &reg,
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
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
OLDNEW
« no previous file with comments | « runtime/vm/instructions_arm.h ('k') | runtime/vm/instructions_arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698