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

Unified Diff: runtime/vm/instructions_mips.cc

Issue 17131002: Enables language tests for SIMMIPS. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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/instructions_mips.h ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | 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 24063)
+++ runtime/vm/instructions_mips.cc (working copy)
@@ -6,6 +6,7 @@
#if defined(TARGET_ARCH_MIPS)
#include "vm/constants_mips.h"
+#include "vm/cpu.h"
#include "vm/instructions.h"
#include "vm/object.h"
@@ -158,6 +159,24 @@
}
+void CallPattern::InsertAt(uword pc, uword target_address) {
+ Instr* lui = Instr::At(pc + (0 * Instr::kInstrSize));
+ Instr* ori = Instr::At(pc + (1 * Instr::kInstrSize));
+ Instr* jr = Instr::At(pc + (2 * Instr::kInstrSize));
+ Instr* nop = Instr::At(pc + (3 * Instr::kInstrSize));
+ uint16_t target_lo = target_address & 0xffff;
+ uint16_t target_hi = target_address >> 16;
+
+ lui->SetImmInstrBits(LUI, ZR, TMP1, target_hi);
+ ori->SetImmInstrBits(ORI, TMP1, TMP1, target_lo);
+ jr->SetSpecialInstrBits(JALR, TMP1, ZR, RA);
+ nop->SetInstructionBits(Instr::kNopInstruction);
+
+ ASSERT(kFixedLengthInBytes == 4 * Instr::kInstrSize);
+ CPU::FlushICache(pc, kFixedLengthInBytes);
+}
+
+
JumpPattern::JumpPattern(uword pc) : pc_(pc) { }
« no previous file with comments | « runtime/vm/instructions_mips.h ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698