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

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

Issue 860013002: move CallApiFunctionAndReturn to code-stubs-* (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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/frames.h" 10 #include "src/frames.h"
(...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 int result_size); 1319 int result_size);
1320 1320
1321 // Convenience function: tail call a runtime routine (jump). 1321 // Convenience function: tail call a runtime routine (jump).
1322 void TailCallRuntime(Runtime::FunctionId fid, 1322 void TailCallRuntime(Runtime::FunctionId fid,
1323 int num_arguments, 1323 int num_arguments,
1324 int result_size); 1324 int result_size);
1325 1325
1326 // Jump to a runtime routine. 1326 // Jump to a runtime routine.
1327 void JumpToExternalReference(const ExternalReference& ext, int result_size); 1327 void JumpToExternalReference(const ExternalReference& ext, int result_size);
1328 1328
1329 // Prepares stack to put arguments (aligns and so on). WIN64 calling
1330 // convention requires to put the pointer to the return value slot into
1331 // rcx (rcx must be preserverd until CallApiFunctionAndReturn). Saves
1332 // context (rsi). Clobbers rax. Allocates arg_stack_space * kPointerSize
1333 // inside the exit frame (not GCed) accessible via StackSpaceOperand.
1334 void PrepareCallApiFunction(int arg_stack_space);
1335
1336 // Calls an API function. Allocates HandleScope, extracts returned value
1337 // from handle and propagates exceptions. Clobbers r14, r15, rbx and
1338 // caller-save registers. Restores context. On return removes
1339 // stack_space * kPointerSize (GCed).
1340 void CallApiFunctionAndReturn(Register function_address,
1341 ExternalReference thunk_ref,
1342 Register thunk_last_arg, int stack_space,
1343 Operand* stack_space_operand,
1344 Operand return_value_operand,
1345 Operand* context_restore_operand);
1346
1347 // Before calling a C-function from generated code, align arguments on stack. 1329 // Before calling a C-function from generated code, align arguments on stack.
1348 // After aligning the frame, arguments must be stored in rsp[0], rsp[8], 1330 // After aligning the frame, arguments must be stored in rsp[0], rsp[8],
1349 // etc., not pushed. The argument count assumes all arguments are word sized. 1331 // etc., not pushed. The argument count assumes all arguments are word sized.
1350 // The number of slots reserved for arguments depends on platform. On Windows 1332 // The number of slots reserved for arguments depends on platform. On Windows
1351 // stack slots are reserved for the arguments passed in registers. On other 1333 // stack slots are reserved for the arguments passed in registers. On other
1352 // platforms stack slots are only reserved for the arguments actually passed 1334 // platforms stack slots are only reserved for the arguments actually passed
1353 // on the stack. 1335 // on the stack.
1354 void PrepareCallCFunction(int num_arguments); 1336 void PrepareCallCFunction(int num_arguments);
1355 1337
1356 // Calls a C function and cleans up the space for arguments allocated 1338 // Calls a C function and cleans up the space for arguments allocated
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1646 masm->popfq(); \ 1628 masm->popfq(); \
1647 } \ 1629 } \
1648 masm-> 1630 masm->
1649 #else 1631 #else
1650 #define ACCESS_MASM(masm) masm-> 1632 #define ACCESS_MASM(masm) masm->
1651 #endif 1633 #endif
1652 1634
1653 } } // namespace v8::internal 1635 } } // namespace v8::internal
1654 1636
1655 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ 1637 #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