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

Unified Diff: runtime/vm/assembler_mips.h

Issue 13474009: Implements optional parameter handling in MIPS vm. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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 20887)
+++ runtime/vm/assembler_mips.h (working copy)
@@ -492,10 +492,6 @@
EmitRType(SPECIAL, rs, rt, rd, 0, SRLV);
}
- void sub(Register rd, Register rs, Register rt) {
- EmitRType(SPECIAL, rs, rt, rd, 0, SUB);
- }
-
void subu(Register rd, Register rs, Register rt) {
EmitRType(SPECIAL, rs, rt, rd, 0, SUBU);
}
@@ -521,7 +517,7 @@
lui(TMP, Immediate(high));
ori(TMP, TMP, Immediate(low));
jr(TMP);
- delay_slot()->nop();
+ delay_slot_available_ = false; // CodePatcher expects a nop.
}
void BranchLink(const ExternalLabel* label) {
@@ -534,7 +530,7 @@
Array::data_offset() + 4*AddExternalLabel(label) - kHeapObjectTag;
LoadWordFromPoolOffset(TMP, offset);
jalr(TMP);
- delay_slot()->nop();
+ delay_slot_available_ = false; // CodePatcher expects a nop.
}
// If the signed value in rs is less than value, rd is 1, and 0 otherwise.
@@ -672,7 +668,7 @@
imm);
}
- void EmitJType(Opcode opcode, Label* label) {
+ void EmitJType(Opcode opcode, uint32_t destination) {
UNIMPLEMENTED();
}
@@ -700,7 +696,8 @@
EmitIType(b, rs, rt, dest_off);
} else {
const int position = buffer_.Size();
- EmitIType(b, rs, rt, label->position_);
+ const uint16_t dest_off = EncodeBranchOffset(label->position_, 0);
+ EmitIType(b, rs, rt, dest_off);
label->LinkTo(position);
}
}
@@ -714,7 +711,8 @@
EmitRegImmType(REGIMM, rs, b, dest_off);
} else {
const int position = buffer_.Size();
- EmitRegImmType(REGIMM, rs, b, label->position_);
+ const uint16_t dest_off = EncodeBranchOffset(label->position_, 0);
+ EmitRegImmType(REGIMM, rs, b, dest_off);
label->LinkTo(position);
}
}

Powered by Google App Engine
This is Rietveld 408576698