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

Side by Side Diff: src/x64/macro-assembler-x64.h

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, 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 unified diff | Download patch
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #ifndef V8_X64_MACRO_ASSEMBLER_X64_H_ 5 #ifndef V8_X64_MACRO_ASSEMBLER_X64_H_
6 #define V8_X64_MACRO_ASSEMBLER_X64_H_ 6 #define V8_X64_MACRO_ASSEMBLER_X64_H_
7 7
8 #include "src/assembler.h" 8 #include "src/assembler.h"
9 #include "src/bailout-reason.h" 9 #include "src/bailout-reason.h"
10 #include "src/base/flags.h" 10 #include "src/base/flags.h"
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 void StubPrologue(StackFrame::Type type); 332 void StubPrologue(StackFrame::Type type);
333 void Prologue(bool code_pre_aging); 333 void Prologue(bool code_pre_aging);
334 334
335 // Enter specific kind of exit frame; either in normal or 335 // Enter specific kind of exit frame; either in normal or
336 // debug mode. Expects the number of arguments in register rax and 336 // debug mode. Expects the number of arguments in register rax and
337 // sets up the number of arguments in register rdi and the pointer 337 // sets up the number of arguments in register rdi and the pointer
338 // to the first argument in register rsi. 338 // to the first argument in register rsi.
339 // 339 //
340 // Allocates arg_stack_space * kPointerSize memory (not GCed) on the stack 340 // Allocates arg_stack_space * kPointerSize memory (not GCed) on the stack
341 // accessible via StackSpaceOperand. 341 // accessible via StackSpaceOperand.
342 void EnterExitFrame(int arg_stack_space = 0, bool save_doubles = false); 342 void EnterExitFrame(int arg_stack_space = 0, bool save_doubles = false,
343 StackFrame::Type frame_type = StackFrame::EXIT);
343 344
344 // Enter specific kind of exit frame. Allocates arg_stack_space * kPointerSize 345 // Enter specific kind of exit frame. Allocates arg_stack_space * kPointerSize
345 // memory (not GCed) on the stack accessible via StackSpaceOperand. 346 // memory (not GCed) on the stack accessible via StackSpaceOperand.
346 void EnterApiExitFrame(int arg_stack_space); 347 void EnterApiExitFrame(int arg_stack_space);
347 348
348 // Leave the current exit frame. Expects/provides the return value in 349 // Leave the current exit frame. Expects/provides the return value in
349 // register rax:rdx (untouched) and the pointer to the first 350 // register rax:rdx (untouched) and the pointer to the first
350 // argument in register rsi (if pop_arguments == true). 351 // argument in register rsi (if pop_arguments == true).
351 void LeaveExitFrame(bool save_doubles = false, bool pop_arguments = true); 352 void LeaveExitFrame(bool save_doubles = false, bool pop_arguments = true);
352 353
(...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1461 } 1462 }
1462 1463
1463 // Convenience function: call an external reference. 1464 // Convenience function: call an external reference.
1464 void CallExternalReference(const ExternalReference& ext, 1465 void CallExternalReference(const ExternalReference& ext,
1465 int num_arguments); 1466 int num_arguments);
1466 1467
1467 // Convenience function: tail call a runtime routine (jump) 1468 // Convenience function: tail call a runtime routine (jump)
1468 void TailCallRuntime(Runtime::FunctionId fid); 1469 void TailCallRuntime(Runtime::FunctionId fid);
1469 1470
1470 // Jump to a runtime routines 1471 // Jump to a runtime routines
1471 void JumpToExternalReference(const ExternalReference& ext); 1472 void JumpToExternalReference(const ExternalReference& ext,
1473 bool builtin_exit_frame = false);
1472 1474
1473 // Before calling a C-function from generated code, align arguments on stack. 1475 // Before calling a C-function from generated code, align arguments on stack.
1474 // After aligning the frame, arguments must be stored in rsp[0], rsp[8], 1476 // After aligning the frame, arguments must be stored in rsp[0], rsp[8],
1475 // etc., not pushed. The argument count assumes all arguments are word sized. 1477 // etc., not pushed. The argument count assumes all arguments are word sized.
1476 // The number of slots reserved for arguments depends on platform. On Windows 1478 // The number of slots reserved for arguments depends on platform. On Windows
1477 // stack slots are reserved for the arguments passed in registers. On other 1479 // stack slots are reserved for the arguments passed in registers. On other
1478 // platforms stack slots are only reserved for the arguments actually passed 1480 // platforms stack slots are only reserved for the arguments actually passed
1479 // on the stack. 1481 // on the stack.
1480 void PrepareCallCFunction(int num_arguments); 1482 void PrepareCallCFunction(int num_arguments);
1481 1483
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
1626 1628
1627 // Helper functions for generating invokes. 1629 // Helper functions for generating invokes.
1628 void InvokePrologue(const ParameterCount& expected, 1630 void InvokePrologue(const ParameterCount& expected,
1629 const ParameterCount& actual, 1631 const ParameterCount& actual,
1630 Label* done, 1632 Label* done,
1631 bool* definitely_mismatches, 1633 bool* definitely_mismatches,
1632 InvokeFlag flag, 1634 InvokeFlag flag,
1633 Label::Distance near_jump, 1635 Label::Distance near_jump,
1634 const CallWrapper& call_wrapper); 1636 const CallWrapper& call_wrapper);
1635 1637
1636 void EnterExitFramePrologue(bool save_rax); 1638 void EnterExitFramePrologue(bool save_rax, StackFrame::Type frame_type);
1637 1639
1638 // Allocates arg_stack_space * kPointerSize memory (not GCed) on the stack 1640 // Allocates arg_stack_space * kPointerSize memory (not GCed) on the stack
1639 // accessible via StackSpaceOperand. 1641 // accessible via StackSpaceOperand.
1640 void EnterExitFrameEpilogue(int arg_stack_space, bool save_doubles); 1642 void EnterExitFrameEpilogue(int arg_stack_space, bool save_doubles);
1641 1643
1642 void LeaveExitFrameEpilogue(bool restore_context); 1644 void LeaveExitFrameEpilogue(bool restore_context);
1643 1645
1644 // Allocation support helpers. 1646 // Allocation support helpers.
1645 // Loads the top of new-space into the result register. 1647 // Loads the top of new-space into the result register.
1646 // Otherwise the address of the new-space top is loaded into scratch (if 1648 // Otherwise the address of the new-space top is loaded into scratch (if
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1773 } \ 1775 } \
1774 masm-> 1776 masm->
1775 #else 1777 #else
1776 #define ACCESS_MASM(masm) masm-> 1778 #define ACCESS_MASM(masm) masm->
1777 #endif 1779 #endif
1778 1780
1779 } // namespace internal 1781 } // namespace internal
1780 } // namespace v8 1782 } // namespace v8
1781 1783
1782 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ 1784 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698