| 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 1324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1335 // Calls an API function. Allocates HandleScope, extracts returned value | 1335 // Calls an API function. Allocates HandleScope, extracts returned value |
| 1336 // from handle and propagates exceptions. Clobbers r14, r15, rbx and | 1336 // from handle and propagates exceptions. Clobbers r14, r15, rbx and |
| 1337 // caller-save registers. Restores context. On return removes | 1337 // caller-save registers. Restores context. On return removes |
| 1338 // stack_space * kPointerSize (GCed). | 1338 // stack_space * kPointerSize (GCed). |
| 1339 void CallApiFunctionAndReturn(Register function_address, | 1339 void CallApiFunctionAndReturn(Register function_address, |
| 1340 ExternalReference thunk_ref, | 1340 ExternalReference thunk_ref, |
| 1341 Register thunk_last_arg, | 1341 Register thunk_last_arg, |
| 1342 int stack_space, | 1342 int stack_space, |
| 1343 Operand return_value_operand, | 1343 Operand return_value_operand, |
| 1344 Operand* context_restore_operand); | 1344 Operand* context_restore_operand); |
| 1345 // |
| 1346 // Fast Calls an API function. No allocate of HandleScope, extracts returned |
| 1347 // value from handle and propagates exceptions. Clobbers r14, r15, rbx and |
| 1348 // caller-save registers. Restores context. On return removes |
| 1349 // stack_space * kPointerSize (GCed). |
| 1350 void CallFastApiFunctionAndReturn(Register function_address, |
| 1351 ExternalReference thunk_ref, |
| 1352 Register thunk_last_arg, |
| 1353 int stack_space, |
| 1354 Operand return_value_operand, |
| 1355 Operand* context_restore_operand); |
| 1345 | 1356 |
| 1346 // Before calling a C-function from generated code, align arguments on stack. | 1357 // Before calling a C-function from generated code, align arguments on stack. |
| 1347 // After aligning the frame, arguments must be stored in rsp[0], rsp[8], | 1358 // After aligning the frame, arguments must be stored in rsp[0], rsp[8], |
| 1348 // etc., not pushed. The argument count assumes all arguments are word sized. | 1359 // etc., not pushed. The argument count assumes all arguments are word sized. |
| 1349 // The number of slots reserved for arguments depends on platform. On Windows | 1360 // The number of slots reserved for arguments depends on platform. On Windows |
| 1350 // stack slots are reserved for the arguments passed in registers. On other | 1361 // stack slots are reserved for the arguments passed in registers. On other |
| 1351 // platforms stack slots are only reserved for the arguments actually passed | 1362 // platforms stack slots are only reserved for the arguments actually passed |
| 1352 // on the stack. | 1363 // on the stack. |
| 1353 void PrepareCallCFunction(int num_arguments); | 1364 void PrepareCallCFunction(int num_arguments); |
| 1354 | 1365 |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1645 masm->popfq(); \ | 1656 masm->popfq(); \ |
| 1646 } \ | 1657 } \ |
| 1647 masm-> | 1658 masm-> |
| 1648 #else | 1659 #else |
| 1649 #define ACCESS_MASM(masm) masm-> | 1660 #define ACCESS_MASM(masm) masm-> |
| 1650 #endif | 1661 #endif |
| 1651 | 1662 |
| 1652 } } // namespace v8::internal | 1663 } } // namespace v8::internal |
| 1653 | 1664 |
| 1654 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1665 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
| OLD | NEW |