From 6d3b3255b52d74ebd42500db718f329cf91be790 Mon Sep 17 00:00:00 2001 From: "plind44@gmail.com" Date: Fri, 13 Sep 2013 15:28:15 +0000 Subject: [PATCH] MIPS: remove getcurrent from stubs. Port r16710 (c5203f8) BUG= R=plind44@gmail.com Review URL: https://codereview.chromium.org/23710046 Patch from Balazs Kilvady . git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16721 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/mips/builtins-mips.cc | 7 ++++--- src/mips/code-stubs-mips.cc | 5 +++-- src/mips/codegen-mips.cc | 5 +++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/mips/builtins-mips.cc b/src/mips/builtins-mips.cc index 3aabd97..400292e 100644 --- a/src/mips/builtins-mips.cc +++ b/src/mips/builtins-mips.cc @@ -833,14 +833,15 @@ static void GenerateMakeCodeYoungAgainCommon(MacroAssembler* masm) { // The following registers must be saved and restored when calling through to // the runtime: // a0 - contains return address (beginning of patch sequence) - // a1 - function object + // a1 - isolate RegList saved_regs = (a0.bit() | a1.bit() | ra.bit() | fp.bit()) & ~sp.bit(); FrameScope scope(masm, StackFrame::MANUAL); __ MultiPush(saved_regs); - __ PrepareCallCFunction(1, 0, a1); + __ PrepareCallCFunction(1, 0, a2); + __ li(a1, Operand(ExternalReference::isolate_address(masm->isolate()))); __ CallCFunction( - ExternalReference::get_make_code_young_function(masm->isolate()), 1); + ExternalReference::get_make_code_young_function(masm->isolate()), 2); __ MultiPop(saved_regs); __ Jump(a0); } diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc index ebc4c79..e4f68f9 100644 --- a/src/mips/code-stubs-mips.cc +++ b/src/mips/code-stubs-mips.cc @@ -2795,8 +2795,9 @@ void CEntryStub::GenerateCore(MacroAssembler* masm, if (do_gc) { // Move result passed in v0 into a0 to call PerformGC. __ mov(a0, v0); - __ PrepareCallCFunction(1, 0, a1); - __ CallCFunction(ExternalReference::perform_gc_function(isolate), 1, 0); + __ PrepareCallCFunction(2, 0, a1); + __ li(a1, Operand(ExternalReference::isolate_address(masm->isolate()))); + __ CallCFunction(ExternalReference::perform_gc_function(isolate), 2, 0); } ExternalReference scope_depth = diff --git a/src/mips/codegen-mips.cc b/src/mips/codegen-mips.cc index 5c847fc..a12faee 100644 --- a/src/mips/codegen-mips.cc +++ b/src/mips/codegen-mips.cc @@ -635,7 +635,8 @@ void Code::GetCodeAgeAndParity(byte* sequence, Age* age, } -void Code::PatchPlatformCodeAge(byte* sequence, +void Code::PatchPlatformCodeAge(Isolate* isolate, + byte* sequence, Code::Age age, MarkingParity parity) { uint32_t young_length; @@ -644,7 +645,7 @@ void Code::PatchPlatformCodeAge(byte* sequence, CopyBytes(sequence, young_sequence, young_length); CPU::FlushICache(sequence, young_length); } else { - Code* stub = GetCodeAgeStub(age, parity); + Code* stub = GetCodeAgeStub(isolate, age, parity); CodePatcher patcher(sequence, young_length / Assembler::kInstrSize); // Mark this code sequence for FindPlatformCodeAgeSequence() patcher.masm()->nop(Assembler::CODE_AGE_MARKER_NOP); -- 2.7.4