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

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

Issue 14246039: Implements features to run "Hello, world!" on simulated MIPS. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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/assembler_mips.h ('k') | runtime/vm/class_finalizer.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" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/runtime_entry.h" 9 #include "vm/runtime_entry.h"
10 #include "vm/simulator.h" 10 #include "vm/simulator.h"
11 #include "vm/stub_code.h" 11 #include "vm/stub_code.h"
12 12
13 namespace dart { 13 namespace dart {
14 14
15 DECLARE_FLAG(bool, trace_sim);
15 DEFINE_FLAG(bool, print_stop_message, false, "Print stop message."); 16 DEFINE_FLAG(bool, print_stop_message, false, "Print stop message.");
16 17
17 18
18 void Assembler::InitializeMemoryWithBreakpoints(uword data, int length) { 19 void Assembler::InitializeMemoryWithBreakpoints(uword data, int length) {
19 ASSERT(Utils::IsAligned(data, 4)); 20 ASSERT(Utils::IsAligned(data, 4));
20 ASSERT(Utils::IsAligned(length, 4)); 21 ASSERT(Utils::IsAligned(length, 4));
21 const uword end = data + length; 22 const uword end = data + length;
22 while (data < end) { 23 while (data < end) {
23 *reinterpret_cast<int32_t*>(data) = Instr::kBreakPointInstruction; 24 *reinterpret_cast<int32_t*>(data) = Instr::kBreakPointInstruction;
24 data += 4; 25 data += 4;
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 if (FLAG_print_stop_message) { 537 if (FLAG_print_stop_message) {
537 UNIMPLEMENTED(); 538 UNIMPLEMENTED();
538 } 539 }
539 Label stop; 540 Label stop;
540 b(&stop); 541 b(&stop);
541 Emit(reinterpret_cast<int32_t>(message)); 542 Emit(reinterpret_cast<int32_t>(message));
542 Bind(&stop); 543 Bind(&stop);
543 break_(Instr::kStopMessageCode); 544 break_(Instr::kStopMessageCode);
544 } 545 }
545 546
547
548 void Assembler::TraceSimMsg(const char* message) {
549 // Don't bother adding in the messages unless tracing is enabled.
550 if (FLAG_trace_sim) {
551 Label msg;
552 b(&msg);
553 Emit(reinterpret_cast<int32_t>(message));
554 Bind(&msg);
555 break_(Instr::kMsgMessageCode);
556 }
557 }
558
546 } // namespace dart 559 } // namespace dart
547 560
548 #endif // defined TARGET_ARCH_MIPS 561 #endif // defined TARGET_ARCH_MIPS
549 562
OLDNEW
« no previous file with comments | « runtime/vm/assembler_mips.h ('k') | runtime/vm/class_finalizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698