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

Side by Side Diff: src/x64/code-stubs-x64.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: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/api-arguments.h" 8 #include "src/api-arguments.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1671 matching lines...) Expand 10 before | Expand all | Expand 10 after
1682 const int kArgExtraStackSpace = 0; 1682 const int kArgExtraStackSpace = 0;
1683 const int kMaxRegisterResultSize = 2; 1683 const int kMaxRegisterResultSize = 2;
1684 #endif // _WIN64 1684 #endif // _WIN64
1685 1685
1686 // Enter the exit frame that transitions from JavaScript to C++. 1686 // Enter the exit frame that transitions from JavaScript to C++.
1687 int arg_stack_space = 1687 int arg_stack_space =
1688 kArgExtraStackSpace + 1688 kArgExtraStackSpace +
1689 (result_size() <= kMaxRegisterResultSize ? 0 : result_size()); 1689 (result_size() <= kMaxRegisterResultSize ? 0 : result_size());
1690 if (argv_in_register()) { 1690 if (argv_in_register()) {
1691 DCHECK(!save_doubles()); 1691 DCHECK(!save_doubles());
1692 DCHECK(!is_builtin_exit());
1692 __ EnterApiExitFrame(arg_stack_space); 1693 __ EnterApiExitFrame(arg_stack_space);
1693 // Move argc into r14 (argv is already in r15). 1694 // Move argc into r14 (argv is already in r15).
1694 __ movp(r14, rax); 1695 __ movp(r14, rax);
1695 } else { 1696 } else {
1696 __ EnterExitFrame(arg_stack_space, save_doubles()); 1697 __ EnterExitFrame(
1698 arg_stack_space, save_doubles(),
1699 is_builtin_exit() ? StackFrame::BUILTIN_EXIT : StackFrame::EXIT);
1697 } 1700 }
1698 1701
1699 // rbx: pointer to builtin function (C callee-saved). 1702 // rbx: pointer to builtin function (C callee-saved).
1700 // rbp: frame pointer of exit frame (restored after C call). 1703 // rbp: frame pointer of exit frame (restored after C call).
1701 // rsp: stack pointer (restored after C call). 1704 // rsp: stack pointer (restored after C call).
1702 // r14: number of arguments including receiver (C callee-saved). 1705 // r14: number of arguments including receiver (C callee-saved).
1703 // r15: argv pointer (C callee-saved). 1706 // r15: argv pointer (C callee-saved).
1704 1707
1705 // Check stack alignment. 1708 // Check stack alignment.
1706 if (FLAG_debug_code) { 1709 if (FLAG_debug_code) {
(...skipping 3623 matching lines...) Expand 10 before | Expand all | Expand 10 after
5330 kStackUnwindSpace, nullptr, return_value_operand, 5333 kStackUnwindSpace, nullptr, return_value_operand,
5331 NULL); 5334 NULL);
5332 } 5335 }
5333 5336
5334 #undef __ 5337 #undef __
5335 5338
5336 } // namespace internal 5339 } // namespace internal
5337 } // namespace v8 5340 } // namespace v8
5338 5341
5339 #endif // V8_TARGET_ARCH_X64 5342 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/builtins.h ('K') | « src/x64/builtins-x64.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698