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

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

Issue 1301963003: VM: Clean up and fix bugs in instructions patterns (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: s/Pattern::InstructionLength/Pattern::pattern_length_in_bytes/g Created 5 years, 4 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/code_patcher_x64.cc ('k') | runtime/vm/instructions_arm64.cc » ('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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 if ((instr & 0xffff0000) == 0xe28a0000) { // add reg, pp, operand 143 if ((instr & 0xffff0000) == 0xe28a0000) { // add reg, pp, operand
144 const intptr_t rot = (instr & 0xf00) >> 7; 144 const intptr_t rot = (instr & 0xf00) >> 7;
145 const intptr_t imm8 = instr & 0xff; 145 const intptr_t imm8 = instr & 0xff;
146 offset += (imm8 >> rot) | (imm8 << (32 - rot)); 146 offset += (imm8 >> rot) | (imm8 << (32 - rot));
147 *reg = static_cast<Register>((instr & 0xf000) >> 12); 147 *reg = static_cast<Register>((instr & 0xf000) >> 12);
148 } else { 148 } else {
149 ASSERT((instr & 0xffff0000) == 0xe08a0000); // add reg, pp, reg 149 ASSERT((instr & 0xffff0000) == 0xe08a0000); // add reg, pp, reg
150 end = DecodeLoadWordImmediate(end, reg, &offset); 150 end = DecodeLoadWordImmediate(end, reg, &offset);
151 } 151 }
152 } 152 }
153 offset += kHeapObjectTag; 153 *index = ObjectPool::IndexFromOffset(offset);
154 ASSERT(Utils::IsAligned(offset, 4));
rmacnak 2015/08/20 20:44:54 Consider pushing the alignment assert into ObjectP
Florian Schneider 2015/08/21 07:45:09 Done (in my other CL).
155 *index = (offset - Array::data_offset()) / 4;
156 return start; 154 return start;
157 } 155 }
158 156
159 157
160 RawICData* CallPattern::IcData() { 158 RawICData* CallPattern::IcData() {
161 if (ic_data_.IsNull()) { 159 if (ic_data_.IsNull()) {
162 Register reg; 160 Register reg;
163 args_desc_load_end_ = 161 args_desc_load_end_ =
164 InstructionPattern::DecodeLoadObject(ic_data_load_end_, 162 InstructionPattern::DecodeLoadObject(ic_data_load_end_,
165 object_pool_, 163 object_pool_,
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 } else { 354 } else {
357 ASSERT(version == ARMv7); 355 ASSERT(version == ARMv7);
358 return bx_lr->InstructionBits() == instruction; 356 return bx_lr->InstructionBits() == instruction;
359 } 357 }
360 return false; 358 return false;
361 } 359 }
362 360
363 } // namespace dart 361 } // namespace dart
364 362
365 #endif // defined TARGET_ARCH_ARM 363 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/code_patcher_x64.cc ('k') | runtime/vm/instructions_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698