OLD | NEW |
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 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1332 // context (rsi). Clobbers rax. Allocates arg_stack_space * kPointerSize | 1332 // context (rsi). Clobbers rax. Allocates arg_stack_space * kPointerSize |
1333 // inside the exit frame (not GCed) accessible via StackSpaceOperand. | 1333 // inside the exit frame (not GCed) accessible via StackSpaceOperand. |
1334 void PrepareCallApiFunction(int arg_stack_space); | 1334 void PrepareCallApiFunction(int arg_stack_space); |
1335 | 1335 |
1336 // Calls an API function. Allocates HandleScope, extracts returned value | 1336 // Calls an API function. Allocates HandleScope, extracts returned value |
1337 // from handle and propagates exceptions. Clobbers r14, r15, rbx and | 1337 // from handle and propagates exceptions. Clobbers r14, r15, rbx and |
1338 // caller-save registers. Restores context. On return removes | 1338 // caller-save registers. Restores context. On return removes |
1339 // stack_space * kPointerSize (GCed). | 1339 // stack_space * kPointerSize (GCed). |
1340 void CallApiFunctionAndReturn(Register function_address, | 1340 void CallApiFunctionAndReturn(Register function_address, |
1341 ExternalReference thunk_ref, | 1341 ExternalReference thunk_ref, |
1342 Register thunk_last_arg, | 1342 Register thunk_last_arg, int stack_space, |
1343 int stack_space, | 1343 Operand* stack_space_operand, |
1344 Operand return_value_operand, | 1344 Operand return_value_operand, |
1345 Operand* context_restore_operand); | 1345 Operand* context_restore_operand); |
1346 | 1346 |
1347 // Before calling a C-function from generated code, align arguments on stack. | 1347 // 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], | 1348 // 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. | 1349 // 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 | 1350 // 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 | 1351 // stack slots are reserved for the arguments passed in registers. On other |
1352 // platforms stack slots are only reserved for the arguments actually passed | 1352 // platforms stack slots are only reserved for the arguments actually passed |
1353 // on the stack. | 1353 // on the stack. |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1646 masm->popfq(); \ | 1646 masm->popfq(); \ |
1647 } \ | 1647 } \ |
1648 masm-> | 1648 masm-> |
1649 #else | 1649 #else |
1650 #define ACCESS_MASM(masm) masm-> | 1650 #define ACCESS_MASM(masm) masm-> |
1651 #endif | 1651 #endif |
1652 | 1652 |
1653 } } // namespace v8::internal | 1653 } } // namespace v8::internal |
1654 | 1654 |
1655 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1655 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
OLD | NEW |