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

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

Issue 22825023: Uses an object pool on x64 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | Annotate | Revision Log
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/constants_arm.h" 8 #include "vm/constants_arm.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/instructions.h" 10 #include "vm/instructions.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 uword movt_ip = 0xe340c000 | ((target_hi >> 12) << 16) | (target_hi & 0xfff); 156 uword movt_ip = 0xe340c000 | ((target_hi >> 12) << 16) | (target_hi & 0xfff);
157 uword blx_ip = 0xe12fff3c; 157 uword blx_ip = 0xe12fff3c;
158 *reinterpret_cast<uword*>(pc + (0 * Instr::kInstrSize)) = movw_ip; 158 *reinterpret_cast<uword*>(pc + (0 * Instr::kInstrSize)) = movw_ip;
159 *reinterpret_cast<uword*>(pc + (1 * Instr::kInstrSize)) = movt_ip; 159 *reinterpret_cast<uword*>(pc + (1 * Instr::kInstrSize)) = movt_ip;
160 *reinterpret_cast<uword*>(pc + (2 * Instr::kInstrSize)) = blx_ip; 160 *reinterpret_cast<uword*>(pc + (2 * Instr::kInstrSize)) = blx_ip;
161 ASSERT(kFixedLengthInBytes == 3 * Instr::kInstrSize); 161 ASSERT(kFixedLengthInBytes == 3 * Instr::kInstrSize);
162 CPU::FlushICache(pc, kFixedLengthInBytes); 162 CPU::FlushICache(pc, kFixedLengthInBytes);
163 } 163 }
164 164
165 165
166 JumpPattern::JumpPattern(uword pc) : pc_(pc) { } 166 JumpPattern::JumpPattern(uword pc, const Code& code) : pc_(pc) { }
167 167
168 168
169 bool JumpPattern::IsValid() const { 169 bool JumpPattern::IsValid() const {
170 Instr* movw_ip = Instr::At(pc_ + (0 * Instr::kInstrSize)); // target_lo 170 Instr* movw_ip = Instr::At(pc_ + (0 * Instr::kInstrSize)); // target_lo
171 Instr* movt_ip = Instr::At(pc_ + (1 * Instr::kInstrSize)); // target_hi 171 Instr* movt_ip = Instr::At(pc_ + (1 * Instr::kInstrSize)); // target_hi
172 Instr* bx_ip = Instr::At(pc_ + (2 * Instr::kInstrSize)); 172 Instr* bx_ip = Instr::At(pc_ + (2 * Instr::kInstrSize));
173 return (movw_ip->InstructionBits() & 0xfff0f000) == 0xe300c000 && 173 return (movw_ip->InstructionBits() & 0xfff0f000) == 0xe300c000 &&
174 (movt_ip->InstructionBits() & 0xfff0f000) == 0xe340c000 && 174 (movt_ip->InstructionBits() & 0xfff0f000) == 0xe340c000 &&
175 (bx_ip->InstructionBits() & 0xffffffff) == 0xe12fff1c; 175 (bx_ip->InstructionBits() & 0xffffffff) == 0xe12fff1c;
176 } 176 }
(...skipping 15 matching lines...) Expand all
192 uword movt_ip = 0xe340c000 | ((target_hi >> 12) << 16) | (target_hi & 0xfff); 192 uword movt_ip = 0xe340c000 | ((target_hi >> 12) << 16) | (target_hi & 0xfff);
193 *reinterpret_cast<uword*>(pc_ + (0 * Instr::kInstrSize)) = movw_ip; 193 *reinterpret_cast<uword*>(pc_ + (0 * Instr::kInstrSize)) = movw_ip;
194 *reinterpret_cast<uword*>(pc_ + (1 * Instr::kInstrSize)) = movt_ip; 194 *reinterpret_cast<uword*>(pc_ + (1 * Instr::kInstrSize)) = movt_ip;
195 CPU::FlushICache(pc_, 2 * Instr::kInstrSize); 195 CPU::FlushICache(pc_, 2 * Instr::kInstrSize);
196 } 196 }
197 197
198 } // namespace dart 198 } // namespace dart
199 199
200 #endif // defined TARGET_ARCH_ARM 200 #endif // defined TARGET_ARCH_ARM
201 201
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698