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

Unified Diff: runtime/vm/instructions_mips.cc

Issue 13094015: Simplifies MIPS LoadWordFromPoolOffset (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
« no previous file with comments | « runtime/vm/assembler_mips.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/instructions_mips.cc
===================================================================
--- runtime/vm/instructions_mips.cc (revision 20527)
+++ runtime/vm/instructions_mips.cc (working copy)
@@ -58,23 +58,9 @@
i = Back(++end);
instr = Instr::At(reinterpret_cast<uword>(&i));
- if (instr->OpcodeField() == LUI) {
- ASSERT(instr->RtField() == *reg);
- offset |= (instr->UImmField() << 16);
- } else {
- ASSERT(instr->OpcodeField() == ORI);
- ASSERT(instr->RtField() == *reg);
- offset |= instr->UImmField();
-
- if (instr->RsField() != ZR) {
- ASSERT(instr->RsField() == *reg);
- i = Back(++end);
- instr = Instr::At(reinterpret_cast<uword>(&i));
- ASSERT(instr->OpcodeField() == LUI);
- ASSERT(instr->RtField() == *reg);
- offset |= (instr->UImmField() << 16);
- }
- }
+ ASSERT(instr->RtField() == *reg);
+ // Offset is signed, so add the upper 16 bits.
+ offset += (instr->UImmField() << 16);
}
offset += kHeapObjectTag;
ASSERT(Utils::IsAligned(offset, 4));
« no previous file with comments | « runtime/vm/assembler_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698