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

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

Issue 21363003: Enables per-function far-branches for ARM and MIPS. (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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/assembler.h" 5 #include "vm/assembler.h"
6 6
7 #include "platform/utils.h" 7 #include "platform/utils.h"
8 #include "vm/cpu.h" 8 #include "vm/cpu.h"
9 #include "vm/heap.h" 9 #include "vm/heap.h"
10 #include "vm/memory_region.h" 10 #include "vm/memory_region.h"
11 #include "vm/os.h" 11 #include "vm/os.h"
12 #include "vm/zone.h" 12 #include "vm/zone.h"
13 13
14 namespace dart { 14 namespace dart {
15 15
16 DEFINE_FLAG(bool, code_comments, false, 16 DEFINE_FLAG(bool, code_comments, false,
17 "Include comments into code and disassembly"); 17 "Include comments into code and disassembly");
18 // TODO(zra): Remove once far branches are enabled automatically on a
19 // per-function basis.
20 #if defined(TARGET_ARCH_ARM) || defined(TARGET_ARCH_MIPS)
21 DEFINE_FLAG(bool, use_far_branches, false, "Enable far branches");
22 #endif
23 18
24 19
25 static uword NewContents(intptr_t capacity) { 20 static uword NewContents(intptr_t capacity) {
26 Zone* zone = Isolate::Current()->current_zone(); 21 Zone* zone = Isolate::Current()->current_zone();
27 uword result = zone->AllocUnsafe(capacity); 22 uword result = zone->AllocUnsafe(capacity);
28 #if defined(DEBUG) 23 #if defined(DEBUG)
29 // Initialize the buffer with kBreakPointInstruction to force a break 24 // Initialize the buffer with kBreakPointInstruction to force a break
30 // point if we ever execute an uninitialized part of the code buffer. 25 // point if we ever execute an uninitialized part of the code buffer.
31 Assembler::InitializeMemoryWithBreakpoints(result, capacity); 26 Assembler::InitializeMemoryWithBreakpoints(result, capacity);
32 #endif 27 #endif
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 210
216 for (intptr_t i = 0; i < comments_.length(); i++) { 211 for (intptr_t i = 0; i < comments_.length(); i++) {
217 comments.SetPCOffsetAt(i, comments_[i]->pc_offset()); 212 comments.SetPCOffsetAt(i, comments_[i]->pc_offset());
218 comments.SetCommentAt(i, comments_[i]->comment()); 213 comments.SetCommentAt(i, comments_[i]->comment());
219 } 214 }
220 215
221 return comments; 216 return comments;
222 } 217 }
223 218
224 } // namespace dart 219 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/assembler.h ('k') | runtime/vm/assembler_arm.h » ('j') | runtime/vm/assembler_arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698