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

Unified Diff: runtime/vm/assembler_arm.h

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, 5 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/assembler_arm.h
===================================================================
--- runtime/vm/assembler_arm.h (revision 25720)
+++ runtime/vm/assembler_arm.h (working copy)
@@ -297,10 +297,11 @@
class Assembler : public ValueObject {
public:
- Assembler()
+ explicit Assembler(bool use_far_branches = false)
: buffer_(),
object_pool_(GrowableObjectArray::Handle()),
prologue_offset_(-1),
+ use_far_branches_(use_far_branches),
comments_() { }
~Assembler() { }
@@ -317,6 +318,10 @@
}
const GrowableObjectArray& object_pool() const { return object_pool_; }
+ bool use_far_branches() const {
+ return FLAG_use_far_branches || use_far_branches_;
+ }
+
void FinalizeInstructions(const MemoryRegion& region) {
buffer_.FinalizeInstructions(region);
}
@@ -733,6 +738,8 @@
GrowableObjectArray& object_pool_; // Objects and patchable jump targets.
int32_t prologue_offset_;
+ const bool use_far_branches_;
+
int32_t AddObject(const Object& obj);
int32_t AddExternalLabel(const ExternalLabel* label);
@@ -849,7 +856,7 @@
void EmitFarBranch(Condition cond, int32_t offset, bool link);
void EmitBranch(Condition cond, Label* label, bool link);
- static int32_t EncodeBranchOffset(int32_t offset, int32_t inst);
+ int32_t EncodeBranchOffset(int32_t offset, int32_t inst);
static int DecodeBranchOffset(int32_t inst);
int32_t EncodeTstOffset(int32_t offset, int32_t inst);
int DecodeTstOffset(int32_t inst);
« no previous file with comments | « runtime/vm/assembler.cc ('k') | runtime/vm/assembler_arm.cc » ('j') | runtime/vm/compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698