| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1308 // rcx (rcx must be preserverd until CallApiFunctionAndReturn). Saves | 1308 // rcx (rcx must be preserverd until CallApiFunctionAndReturn). Saves |
| 1309 // context (rsi). Clobbers rax. Allocates arg_stack_space * kPointerSize | 1309 // context (rsi). Clobbers rax. Allocates arg_stack_space * kPointerSize |
| 1310 // inside the exit frame (not GCed) accessible via StackSpaceOperand. | 1310 // inside the exit frame (not GCed) accessible via StackSpaceOperand. |
| 1311 void PrepareCallApiFunction(int arg_stack_space); | 1311 void PrepareCallApiFunction(int arg_stack_space); |
| 1312 | 1312 |
| 1313 // Calls an API function. Allocates HandleScope, extracts returned value | 1313 // Calls an API function. Allocates HandleScope, extracts returned value |
| 1314 // from handle and propagates exceptions. Clobbers r14, r15, rbx and | 1314 // from handle and propagates exceptions. Clobbers r14, r15, rbx and |
| 1315 // caller-save registers. Restores context. On return removes | 1315 // caller-save registers. Restores context. On return removes |
| 1316 // stack_space * kPointerSize (GCed). | 1316 // stack_space * kPointerSize (GCed). |
| 1317 void CallApiFunctionAndReturn(Register function_address, | 1317 void CallApiFunctionAndReturn(Register function_address, |
| 1318 Address thunk_address, | 1318 ExternalReference thunk_ref, |
| 1319 Register thunk_last_arg, | 1319 Register thunk_last_arg, |
| 1320 int stack_space, | 1320 int stack_space, |
| 1321 Operand return_value_operand, | 1321 Operand return_value_operand, |
| 1322 Operand* context_restore_operand); | 1322 Operand* context_restore_operand); |
| 1323 | 1323 |
| 1324 // Before calling a C-function from generated code, align arguments on stack. | 1324 // Before calling a C-function from generated code, align arguments on stack. |
| 1325 // After aligning the frame, arguments must be stored in rsp[0], rsp[8], | 1325 // After aligning the frame, arguments must be stored in rsp[0], rsp[8], |
| 1326 // etc., not pushed. The argument count assumes all arguments are word sized. | 1326 // etc., not pushed. The argument count assumes all arguments are word sized. |
| 1327 // The number of slots reserved for arguments depends on platform. On Windows | 1327 // The number of slots reserved for arguments depends on platform. On Windows |
| 1328 // stack slots are reserved for the arguments passed in registers. On other | 1328 // stack slots are reserved for the arguments passed in registers. On other |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1617 masm->popfq(); \ | 1617 masm->popfq(); \ |
| 1618 } \ | 1618 } \ |
| 1619 masm-> | 1619 masm-> |
| 1620 #else | 1620 #else |
| 1621 #define ACCESS_MASM(masm) masm-> | 1621 #define ACCESS_MASM(masm) masm-> |
| 1622 #endif | 1622 #endif |
| 1623 | 1623 |
| 1624 } } // namespace v8::internal | 1624 } } // namespace v8::internal |
| 1625 | 1625 |
| 1626 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1626 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
| OLD | NEW |