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

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

Issue 928833003: Add Function based profile tree (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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
« no previous file with comments | « runtime/vm/instructions_mips.h ('k') | runtime/vm/instructions_x64.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_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/constants_mips.h" 8 #include "vm/constants_mips.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/instructions.h" 10 #include "vm/instructions.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 Instr* ori = Instr::At(pc_ + (1 * Instr::kInstrSize)); 220 Instr* ori = Instr::At(pc_ + (1 * Instr::kInstrSize));
221 const int32_t lui_bits = lui->InstructionBits(); 221 const int32_t lui_bits = lui->InstructionBits();
222 const int32_t ori_bits = ori->InstructionBits(); 222 const int32_t ori_bits = ori->InstructionBits();
223 const uint16_t target_lo = target_address & 0xffff; 223 const uint16_t target_lo = target_address & 0xffff;
224 const uint16_t target_hi = target_address >> 16; 224 const uint16_t target_hi = target_address >> 16;
225 225
226 lui->SetInstructionBits((lui_bits & 0xffff0000) | target_hi); 226 lui->SetInstructionBits((lui_bits & 0xffff0000) | target_hi);
227 ori->SetInstructionBits((ori_bits & 0xffff0000) | target_lo); 227 ori->SetInstructionBits((ori_bits & 0xffff0000) | target_lo);
228 } 228 }
229 229
230
231 ReturnPattern::ReturnPattern(uword pc)
232 : pc_(pc) {
233 }
234
235
236 bool ReturnPattern::IsValid() const {
237 Instr* jr = Instr::At(pc_);
238 return (jr->OpcodeField() == SPECIAL) &&
239 (jr->FunctionField() == JR) &&
240 (jr->RsField() == RA);
241 }
242
230 } // namespace dart 243 } // namespace dart
231 244
232 #endif // defined TARGET_ARCH_MIPS 245 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/instructions_mips.h ('k') | runtime/vm/instructions_x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698