Index: src/mips/macro-assembler-mips.cc |
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc |
index 1b9ac2fbd3d6a0faa3906e3cc97dca70c84dd781..ade4dde691e0610e94ce92ce2c211fb77c33a933 100644 |
--- a/src/mips/macro-assembler-mips.cc |
+++ b/src/mips/macro-assembler-mips.cc |
@@ -5642,11 +5642,12 @@ void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid) { |
JumpToExternalReference(ExternalReference(fid, isolate())); |
} |
- |
void MacroAssembler::JumpToExternalReference(const ExternalReference& builtin, |
- BranchDelaySlot bd) { |
+ BranchDelaySlot bd, |
+ bool builtin_exit_frame) { |
PrepareCEntryFunction(builtin); |
- CEntryStub stub(isolate(), 1); |
+ CEntryStub stub(isolate(), 1, kDontSaveFPRegs, kArgvOnStack, |
+ builtin_exit_frame); |
Jump(stub.GetCode(), |
RelocInfo::CODE_TARGET, |
al, |
@@ -5655,7 +5656,6 @@ void MacroAssembler::JumpToExternalReference(const ExternalReference& builtin, |
bd); |
} |
- |
void MacroAssembler::SetCounter(StatsCounter* counter, int value, |
Register scratch1, Register scratch2) { |
if (FLAG_native_code_counters && counter->Enabled()) { |
@@ -5910,7 +5910,11 @@ void MacroAssembler::LeaveFrame(StackFrame::Type type) { |
lw(fp, MemOperand(fp, 0 * kPointerSize)); |
} |
-void MacroAssembler::EnterExitFrame(bool save_doubles, int stack_space) { |
+void MacroAssembler::EnterExitFrame(bool save_doubles, int stack_space, |
+ StackFrame::Type frame_type) { |
+ DCHECK(frame_type == StackFrame::EXIT || |
+ frame_type == StackFrame::BUILTIN_EXIT); |
+ |
// Set up the frame structure on the stack. |
STATIC_ASSERT(2 * kPointerSize == ExitFrameConstants::kCallerSPDisplacement); |
STATIC_ASSERT(1 * kPointerSize == ExitFrameConstants::kCallerPCOffset); |
@@ -5930,7 +5934,7 @@ void MacroAssembler::EnterExitFrame(bool save_doubles, int stack_space) { |
addiu(sp, sp, -2 * kPointerSize - ExitFrameConstants::kFixedFrameSizeFromFp); |
sw(ra, MemOperand(sp, 4 * kPointerSize)); |
sw(fp, MemOperand(sp, 3 * kPointerSize)); |
- li(at, Operand(Smi::FromInt(StackFrame::EXIT))); |
+ li(at, Operand(Smi::FromInt(frame_type))); |
sw(at, MemOperand(sp, 2 * kPointerSize)); |
// Set up new frame pointer. |
addiu(fp, sp, ExitFrameConstants::kFixedFrameSizeFromFp); |