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

Unified Diff: runtime/vm/assembler_mips.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_mips.h
===================================================================
--- runtime/vm/assembler_mips.h (revision 25720)
+++ runtime/vm/assembler_mips.h (working copy)
@@ -145,10 +145,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),
delay_slot_available_(false),
in_delay_slot_(false),
comments_() { }
@@ -169,6 +170,10 @@
buffer_.FinalizeInstructions(region);
}
+ bool use_far_branches() const {
+ return FLAG_use_far_branches || use_far_branches_;
+ }
+
// Set up a stub frame so that the stack traversal code can easily identify
// a stub frame.
void EnterStubFrame(bool uses_pp = false);
@@ -1094,6 +1099,7 @@
GrowableObjectArray& object_pool_; // Objects and patchable jump targets.
int prologue_offset_;
+ const bool use_far_branches_;
bool delay_slot_available_;
bool in_delay_slot_;
@@ -1194,6 +1200,7 @@
func << kCop1FnShift);
}
+ int32_t EncodeBranchOffset(int32_t offset, int32_t instr);
void EmitFarJump(int32_t offset, bool link);
void EmitFarBranch(Opcode b, Register rs, Register rt, int32_t offset);

Powered by Google App Engine
This is Rietveld 408576698