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

Unified Diff: src/ia32/macro-assembler-ia32.cc

Issue 2090723005: [builtins] New frame type for exits to C++ builtins (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add missing condition in SafeStackFrameIter::frame() Created 4 years, 6 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 | « src/ia32/macro-assembler-ia32.h ('k') | src/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698