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

Unified Diff: runtime/vm/stub_code_mips.cc

Issue 1314883002: VM: Use constant pool also for leaf runtime calls on x64, arm, arm64 and mips. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: use StubEntry::label directly Created 5 years, 4 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/stub_code_arm64.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_mips.cc
diff --git a/runtime/vm/stub_code_mips.cc b/runtime/vm/stub_code_mips.cc
index 137573c1d4607f329c72ac2de33f00ad2ca48d0a..44498fc03bcd786d2f5d9fa326d2bf057e9e1e8f 100644
--- a/runtime/vm/stub_code_mips.cc
+++ b/runtime/vm/stub_code_mips.cc
@@ -207,7 +207,7 @@ void StubCode::GenerateCallNativeCFunctionStub(Assembler* assembler) {
__ LoadImmediate(T9, entry);
__ jalr(T9);
#else
- __ BranchLink(&NativeEntry::NativeCallWrapperLabel());
+ __ BranchLink(&NativeEntry::NativeCallWrapperLabel(), kNotPatchable);
#endif
__ Comment("CallNativeCFunctionStub return");
@@ -460,6 +460,8 @@ static void GenerateDeoptimizationSequence(Assembler* assembler,
__ sw(PP, Address(SP, kPushedRegistersSize - 4 * kWordSize));
__ addiu(FP, SP, Immediate(kPushedRegistersSize - 3 * kWordSize));
+ __ LoadPoolPointer();
+
// The code in this frame may not cause GC. kDeoptimizeCopyFrameRuntimeEntry
// and kDeoptimizeFillFrameRuntimeEntry are leaf runtime calls.
const intptr_t saved_result_slot_from_fp =
@@ -490,20 +492,12 @@ static void GenerateDeoptimizationSequence(Assembler* assembler,
__ lw(T1, Address(FP, saved_result_slot_from_fp * kWordSize));
}
- __ addiu(SP, FP, Immediate(-kWordSize));
- __ lw(RA, Address(SP, 2 * kWordSize));
- __ lw(FP, Address(SP, 1 * kWordSize));
- __ lw(PP, Address(SP, 0 * kWordSize));
+ __ LeaveDartFrame();
__ subu(SP, FP, V0);
// DeoptimizeFillFrame expects a Dart frame, i.e. EnterDartFrame(0), but there
// is no need to set the correct PC marker or load PP, since they get patched.
- __ addiu(SP, SP, Immediate(-4 * kWordSize));
- __ sw(ZR, Address(SP, 3 * kWordSize));
- __ sw(RA, Address(SP, 2 * kWordSize));
- __ sw(FP, Address(SP, 1 * kWordSize));
- __ sw(PP, Address(SP, 0 * kWordSize));
- __ addiu(FP, SP, Immediate(kWordSize));
+ __ EnterStubFrame();
__ mov(A0, FP); // Get last FP address.
if (preserve_result) {
@@ -516,11 +510,7 @@ static void GenerateDeoptimizationSequence(Assembler* assembler,
__ lw(T1, Address(FP, kFirstLocalSlotFromFp * kWordSize));
}
// Code above cannot cause GC.
- __ addiu(SP, FP, Immediate(-kWordSize));
- __ lw(RA, Address(SP, 2 * kWordSize));
- __ lw(FP, Address(SP, 1 * kWordSize));
- __ lw(PP, Address(SP, 0 * kWordSize));
- __ addiu(SP, SP, Immediate(4 * kWordSize));
+ __ LeaveStubFrame();
// Frame is fully rewritten at this point and it is safe to perform a GC.
// Materialize any objects that were deferred by FillFrame because they
« no previous file with comments | « runtime/vm/stub_code_arm64.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698