Index: src/ia32/macro-assembler-ia32.cc |
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc |
index 33044bac733474e53c1aafaf219d2eff9f5c39fd..c3364b19018fb3a28dfb228712de9ef9d5d1f6f1 100644 |
--- a/src/ia32/macro-assembler-ia32.cc |
+++ b/src/ia32/macro-assembler-ia32.cc |
@@ -1130,8 +1130,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); |
@@ -1140,7 +1142,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); |
@@ -1182,9 +1184,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; |
@@ -1197,7 +1199,7 @@ void MacroAssembler::EnterExitFrame(int argc, bool save_doubles) { |
void MacroAssembler::EnterApiExitFrame(int argc) { |
- EnterExitFramePrologue(); |
+ EnterExitFramePrologue(StackFrame::EXIT); |
EnterExitFrameEpilogue(argc, false); |
} |
@@ -2201,11 +2203,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); |
} |