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

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

Issue 2106113002: Revert of [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 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);
344 343
345 // Enter specific kind of exit frame. Allocates arg_stack_space * kPointerSize 344 // Enter specific kind of exit frame. Allocates arg_stack_space * kPointerSize
346 // memory (not GCed) on the stack accessible via StackSpaceOperand. 345 // memory (not GCed) on the stack accessible via StackSpaceOperand.
347 void EnterApiExitFrame(int arg_stack_space); 346 void EnterApiExitFrame(int arg_stack_space);
348 347
349 // Leave the current exit frame. Expects/provides the return value in 348 // Leave the current exit frame. Expects/provides the return value in
350 // register rax:rdx (untouched) and the pointer to the first 349 // register rax:rdx (untouched) and the pointer to the first
351 // argument in register rsi (if pop_arguments == true). 350 // argument in register rsi (if pop_arguments == true).
352 void LeaveExitFrame(bool save_doubles = false, bool pop_arguments = true); 351 void LeaveExitFrame(bool save_doubles = false, bool pop_arguments = true);
353 352
(...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1462 } 1461 }
1463 1462
1464 // Convenience function: call an external reference. 1463 // Convenience function: call an external reference.
1465 void CallExternalReference(const ExternalReference& ext, 1464 void CallExternalReference(const ExternalReference& ext,
1466 int num_arguments); 1465 int num_arguments);
1467 1466
1468 // Convenience function: tail call a runtime routine (jump) 1467 // Convenience function: tail call a runtime routine (jump)
1469 void TailCallRuntime(Runtime::FunctionId fid); 1468 void TailCallRuntime(Runtime::FunctionId fid);
1470 1469
1471 // Jump to a runtime routines 1470 // Jump to a runtime routines
1472 void JumpToExternalReference(const ExternalReference& ext, 1471 void JumpToExternalReference(const ExternalReference& ext);
1473 bool builtin_exit_frame = false);
1474 1472
1475 // Before calling a C-function from generated code, align arguments on stack. 1473 // Before calling a C-function from generated code, align arguments on stack.
1476 // After aligning the frame, arguments must be stored in rsp[0], rsp[8], 1474 // After aligning the frame, arguments must be stored in rsp[0], rsp[8],
1477 // etc., not pushed. The argument count assumes all arguments are word sized. 1475 // etc., not pushed. The argument count assumes all arguments are word sized.
1478 // The number of slots reserved for arguments depends on platform. On Windows 1476 // The number of slots reserved for arguments depends on platform. On Windows
1479 // stack slots are reserved for the arguments passed in registers. On other 1477 // stack slots are reserved for the arguments passed in registers. On other
1480 // platforms stack slots are only reserved for the arguments actually passed 1478 // platforms stack slots are only reserved for the arguments actually passed
1481 // on the stack. 1479 // on the stack.
1482 void PrepareCallCFunction(int num_arguments); 1480 void PrepareCallCFunction(int num_arguments);
1483 1481
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
1628 1626
1629 // Helper functions for generating invokes. 1627 // Helper functions for generating invokes.
1630 void InvokePrologue(const ParameterCount& expected, 1628 void InvokePrologue(const ParameterCount& expected,
1631 const ParameterCount& actual, 1629 const ParameterCount& actual,
1632 Label* done, 1630 Label* done,
1633 bool* definitely_mismatches, 1631 bool* definitely_mismatches,
1634 InvokeFlag flag, 1632 InvokeFlag flag,
1635 Label::Distance near_jump, 1633 Label::Distance near_jump,
1636 const CallWrapper& call_wrapper); 1634 const CallWrapper& call_wrapper);
1637 1635
1638 void EnterExitFramePrologue(bool save_rax, StackFrame::Type frame_type); 1636 void EnterExitFramePrologue(bool save_rax);
1639 1637
1640 // Allocates arg_stack_space * kPointerSize memory (not GCed) on the stack 1638 // Allocates arg_stack_space * kPointerSize memory (not GCed) on the stack
1641 // accessible via StackSpaceOperand. 1639 // accessible via StackSpaceOperand.
1642 void EnterExitFrameEpilogue(int arg_stack_space, bool save_doubles); 1640 void EnterExitFrameEpilogue(int arg_stack_space, bool save_doubles);
1643 1641
1644 void LeaveExitFrameEpilogue(bool restore_context); 1642 void LeaveExitFrameEpilogue(bool restore_context);
1645 1643
1646 // Allocation support helpers. 1644 // Allocation support helpers.
1647 // Loads the top of new-space into the result register. 1645 // Loads the top of new-space into the result register.
1648 // Otherwise the address of the new-space top is loaded into scratch (if 1646 // 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
1775 } \ 1773 } \
1776 masm-> 1774 masm->
1777 #else 1775 #else
1778 #define ACCESS_MASM(masm) masm-> 1776 #define ACCESS_MASM(masm) masm->
1779 #endif 1777 #endif
1780 1778
1781 } // namespace internal 1779 } // namespace internal
1782 } // namespace v8 1780 } // namespace v8
1783 1781
1784 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ 1782 #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