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

Unified Diff: runtime/vm/assembler_mips.cc

Issue 107293008: Fixes bug in far branches on MIPS. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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.cc
===================================================================
--- runtime/vm/assembler_mips.cc (revision 31003)
+++ runtime/vm/assembler_mips.cc (working copy)
@@ -185,7 +185,7 @@
const int32_t dest =
label->Position() - (buffer_.Size() + Instr::kInstrSize);
if (use_far_branches() && !CanEncodeBranchOffset(dest)) {
- EmitFarBranch(b, rs, rt, label->Position());
+ EmitFarBranch(OppositeBranchOpcode(b), rs, rt, label->Position());
} else {
const uint16_t dest_off = EncodeBranchOffset(dest, 0);
EmitIType(b, rs, rt, dest_off);
@@ -210,7 +210,7 @@
const int32_t dest =
label->Position() - (buffer_.Size() + Instr::kInstrSize);
if (use_far_branches() && !CanEncodeBranchOffset(dest)) {
- EmitFarRegImmBranch(b, rs, label->Position());
+ EmitFarRegImmBranch(OppositeBranchNoLink(b), rs, label->Position());
} else {
const uint16_t dest_off = EncodeBranchOffset(dest, 0);
EmitRegImmType(REGIMM, rs, b, dest_off);

Powered by Google App Engine
This is Rietveld 408576698