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

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

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

Powered by Google App Engine
This is Rietveld 408576698