Index: src/x87/macro-assembler-x87.cc |
diff --git a/src/x87/macro-assembler-x87.cc b/src/x87/macro-assembler-x87.cc |
index a75fc5fa98bd1403bcdd8ff4d53a7485f505c0ca..62501d7a70842686f5fef7b2b0cd0bc3b2beda70 100644 |
--- a/src/x87/macro-assembler-x87.cc |
+++ b/src/x87/macro-assembler-x87.cc |
@@ -1078,8 +1078,10 @@ void MacroAssembler::LeaveFrame(StackFrame::Type type) { |
leave(); |
} |
+void MacroAssembler::EnterExitFramePrologue(StackFrame::Type frame_type) { |
+ DCHECK(frame_type == StackFrame::EXIT || |
+ frame_type == StackFrame::BUILTIN_EXIT); |
-void MacroAssembler::EnterExitFramePrologue() { |
// Set up the frame structure on the stack. |
DCHECK_EQ(+2 * kPointerSize, ExitFrameConstants::kCallerSPDisplacement); |
DCHECK_EQ(+1 * kPointerSize, ExitFrameConstants::kCallerPCOffset); |
@@ -1088,7 +1090,7 @@ void MacroAssembler::EnterExitFramePrologue() { |
mov(ebp, esp); |
// Reserve room for entry stack pointer and push the code object. |
- push(Immediate(Smi::FromInt(StackFrame::EXIT))); |
+ push(Immediate(Smi::FromInt(frame_type))); |
DCHECK_EQ(-2 * kPointerSize, ExitFrameConstants::kSPOffset); |
push(Immediate(0)); // Saved entry sp, patched before call. |
DCHECK_EQ(-3 * kPointerSize, ExitFrameConstants::kCodeOffset); |
@@ -1127,9 +1129,9 @@ void MacroAssembler::EnterExitFrameEpilogue(int argc, bool save_doubles) { |
mov(Operand(ebp, ExitFrameConstants::kSPOffset), esp); |
} |
- |
-void MacroAssembler::EnterExitFrame(int argc, bool save_doubles) { |
- EnterExitFramePrologue(); |
+void MacroAssembler::EnterExitFrame(int argc, bool save_doubles, |
+ StackFrame::Type frame_type) { |
+ EnterExitFramePrologue(frame_type); |
// Set up argc and argv in callee-saved registers. |
int offset = StandardFrameConstants::kCallerSPOffset - kPointerSize; |
@@ -1142,7 +1144,7 @@ void MacroAssembler::EnterExitFrame(int argc, bool save_doubles) { |
void MacroAssembler::EnterApiExitFrame(int argc) { |
- EnterExitFramePrologue(); |
+ EnterExitFramePrologue(StackFrame::EXIT); |
EnterExitFrameEpilogue(argc, false); |
} |
@@ -2141,11 +2143,12 @@ void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid) { |
JumpToExternalReference(ExternalReference(fid, isolate())); |
} |
- |
-void MacroAssembler::JumpToExternalReference(const ExternalReference& ext) { |
+void MacroAssembler::JumpToExternalReference(const ExternalReference& ext, |
+ bool builtin_exit_frame) { |
// Set the entry point and jump to the C entry runtime stub. |
mov(ebx, Immediate(ext)); |
- CEntryStub ces(isolate(), 1); |
+ CEntryStub ces(isolate(), 1, kDontSaveFPRegs, kArgvOnStack, |
+ builtin_exit_frame); |
jmp(ces.GetCode(), RelocInfo::CODE_TARGET); |
} |