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

Unified Diff: runtime/vm/intermediate_language_mips.cc

Issue 1192103004: VM: New calling convention for generated code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fixed comments Created 5 years, 3 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/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_mips.cc
diff --git a/runtime/vm/intermediate_language_mips.cc b/runtime/vm/intermediate_language_mips.cc
index fe30067f7227054c89c78a1fbb045219c3d47daf..8c03d9383e69b40404534249e2b5c700de404aac 100644
--- a/runtime/vm/intermediate_language_mips.cc
+++ b/runtime/vm/intermediate_language_mips.cc
@@ -274,6 +274,7 @@ void ClosureCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
ASSERT(locs()->in(0).reg() == T0);
__ LoadImmediate(S5, 0);
__ lw(T2, FieldAddress(T0, Function::entry_point_offset()));
+ __ lw(CODE_REG, FieldAddress(T0, Function::code_offset()));
__ jalr(T2);
compiler->RecordSafepoint(locs());
// Marks either the continuation point in unoptimized code or the
@@ -2666,11 +2667,8 @@ void CatchBlockEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
catch_handler_types_,
needs_stacktrace());
// Restore pool pointer.
- __ GetNextPC(CMPRES1, TMP);
- const intptr_t object_pool_pc_dist =
- Instructions::HeaderSize() - Instructions::object_pool_offset() +
- compiler->assembler()->CodeSize() - 1 * Instr::kInstrSize;
- __ LoadFromOffset(PP, CMPRES1, -object_pool_pc_dist);
+ __ RestoreCodePointer();
+ __ LoadPoolPointer();
if (HasParallelMove()) {
compiler->parallel_move_resolver()->EmitNativeCode(parallel_move());
@@ -5427,20 +5425,22 @@ LocationSummary* IndirectGotoInstr::MakeLocationSummary(Zone* zone,
void IndirectGotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- Register target_address_reg = locs()->temp_slot(0)->reg();
+ Register target_reg = locs()->temp_slot(0)->reg();
- // Load from [current frame pointer] + kPcMarkerSlotFromFp.
- __ lw(target_address_reg, Address(FP, kPcMarkerSlotFromFp * kWordSize));
+ __ GetNextPC(target_reg, TMP);
+ const intptr_t entry_offset =
+ __ CodeSize() - 1 * Instr::kInstrSize;
+ __ AddImmediate(target_reg, target_reg, -entry_offset);
// Add the offset.
Register offset_reg = locs()->in(0).reg();
if (offset()->definition()->representation() == kTagged) {
__ SmiUntag(offset_reg);
}
- __ addu(target_address_reg, target_address_reg, offset_reg);
+ __ addu(target_reg, target_reg, offset_reg);
// Jump to the absolute address.
- __ jr(target_address_reg);
+ __ jr(target_reg);
}
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698