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 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1245 // caller-save registers. Restores context. On return removes | 1245 // caller-save registers. Restores context. On return removes |
1246 // stack_space * kPointerSize (GCed). | 1246 // stack_space * kPointerSize (GCed). |
1247 void CallApiFunctionAndReturn(Address function_address, | 1247 void CallApiFunctionAndReturn(Address function_address, |
1248 Address thunk_address, | 1248 Address thunk_address, |
1249 Register thunk_last_arg, | 1249 Register thunk_last_arg, |
1250 int stack_space, | 1250 int stack_space, |
1251 bool returns_handle, | 1251 bool returns_handle, |
1252 int return_value_offset_from_rbp); | 1252 int return_value_offset_from_rbp); |
1253 | 1253 |
1254 // Before calling a C-function from generated code, align arguments on stack. | 1254 // Before calling a C-function from generated code, align arguments on stack. |
1255 // After aligning the frame, arguments must be stored in esp[0], esp[4], | 1255 // After aligning the frame, arguments must be stored in rsp[0], rsp[8], |
1256 // etc., not pushed. The argument count assumes all arguments are word sized. | 1256 // etc., not pushed. The argument count assumes all arguments are word sized. |
1257 // The number of slots reserved for arguments depends on platform. On Windows | 1257 // The number of slots reserved for arguments depends on platform. On Windows |
1258 // stack slots are reserved for the arguments passed in registers. On other | 1258 // stack slots are reserved for the arguments passed in registers. On other |
1259 // platforms stack slots are only reserved for the arguments actually passed | 1259 // platforms stack slots are only reserved for the arguments actually passed |
1260 // on the stack. | 1260 // on the stack. |
1261 void PrepareCallCFunction(int num_arguments); | 1261 void PrepareCallCFunction(int num_arguments); |
1262 | 1262 |
1263 // Calls a C function and cleans up the space for arguments allocated | 1263 // Calls a C function and cleans up the space for arguments allocated |
1264 // by PrepareCallCFunction. The called function is not allowed to trigger a | 1264 // by PrepareCallCFunction. The called function is not allowed to trigger a |
1265 // garbage collection, since that might move the code and invalidate the | 1265 // garbage collection, since that might move the code and invalidate the |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1535 masm->popfq(); \ | 1535 masm->popfq(); \ |
1536 } \ | 1536 } \ |
1537 masm-> | 1537 masm-> |
1538 #else | 1538 #else |
1539 #define ACCESS_MASM(masm) masm-> | 1539 #define ACCESS_MASM(masm) masm-> |
1540 #endif | 1540 #endif |
1541 | 1541 |
1542 } } // namespace v8::internal | 1542 } } // namespace v8::internal |
1543 | 1543 |
1544 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1544 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
OLD | NEW |