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

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

Issue 21159002: Implements far-branches on ARM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | 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" 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/stack_frame.h" 11 #include "vm/stack_frame.h"
12 #include "vm/stub_code.h" 12 #include "vm/stub_code.h"
13 13
14 namespace dart { 14 namespace dart {
15 15
16 #if defined(USING_SIMULATOR) 16 #if defined(USING_SIMULATOR)
17 DECLARE_FLAG(bool, trace_sim); 17 DECLARE_FLAG(bool, trace_sim);
18 #endif 18 #endif
19 DEFINE_FLAG(bool, print_stop_message, false, "Print stop message."); 19 DEFINE_FLAG(bool, print_stop_message, false, "Print stop message.");
20 DEFINE_FLAG(bool, use_far_branches, false, "Enable far branches on MIPS");
21 DECLARE_FLAG(bool, inline_alloc); 20 DECLARE_FLAG(bool, inline_alloc);
22 21
23 void Assembler::InitializeMemoryWithBreakpoints(uword data, int length) { 22 void Assembler::InitializeMemoryWithBreakpoints(uword data, int length) {
24 ASSERT(Utils::IsAligned(data, 4)); 23 ASSERT(Utils::IsAligned(data, 4));
25 ASSERT(Utils::IsAligned(length, 4)); 24 ASSERT(Utils::IsAligned(length, 4));
26 const uword end = data + length; 25 const uword end = data + length;
27 while (data < end) { 26 while (data < end) {
28 *reinterpret_cast<int32_t*>(data) = Instr::kBreakPointInstruction; 27 *reinterpret_cast<int32_t*>(data) = Instr::kBreakPointInstruction;
29 data += 4; 28 data += 4;
30 } 29 }
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 Bind(&msg); 972 Bind(&msg);
974 break_(Instr::kMsgMessageCode); 973 break_(Instr::kMsgMessageCode);
975 } 974 }
976 #endif 975 #endif
977 } 976 }
978 977
979 } // namespace dart 978 } // namespace dart
980 979
981 #endif // defined TARGET_ARCH_MIPS 980 #endif // defined TARGET_ARCH_MIPS
982 981
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698