OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 // --------------------------------------------------------------------------- | 99 // --------------------------------------------------------------------------- |
100 // Activation frames | 100 // Activation frames |
101 | 101 |
102 void EnterInternalFrame() { EnterFrame(StackFrame::INTERNAL); } | 102 void EnterInternalFrame() { EnterFrame(StackFrame::INTERNAL); } |
103 void LeaveInternalFrame() { LeaveFrame(StackFrame::INTERNAL); } | 103 void LeaveInternalFrame() { LeaveFrame(StackFrame::INTERNAL); } |
104 | 104 |
105 void EnterConstructFrame() { EnterFrame(StackFrame::CONSTRUCT); } | 105 void EnterConstructFrame() { EnterFrame(StackFrame::CONSTRUCT); } |
106 void LeaveConstructFrame() { LeaveFrame(StackFrame::CONSTRUCT); } | 106 void LeaveConstructFrame() { LeaveFrame(StackFrame::CONSTRUCT); } |
107 | 107 |
108 // Enter specific kind of exit frame; either EXIT or | 108 // Enter specific kind of exit frame; either EXIT or |
109 // EXIT_DEBUG. Expects the number of arguments in register eax and | 109 // EXIT_DEBUG. Expects the number of arguments in register rax and |
110 // sets up the number of arguments in register edi and the pointer | 110 // sets up the number of arguments in register rdi and the pointer |
111 // to the first argument in register esi. | 111 // to the first argument in register rsi. |
112 void EnterExitFrame(StackFrame::Type type); | 112 void EnterExitFrame(StackFrame::Type type, int result_size = 1); |
113 | 113 |
114 // Leave the current exit frame. Expects the return value in | 114 // Leave the current exit frame. Expects/provides the return value in |
115 // register eax:edx (untouched) and the pointer to the first | 115 // register rax:rdx (untouched) and the pointer to the first |
116 // argument in register esi. | 116 // argument in register rsi. |
117 void LeaveExitFrame(StackFrame::Type type); | 117 void LeaveExitFrame(StackFrame::Type type, int result_size = 1); |
118 | 118 |
119 | 119 |
120 // --------------------------------------------------------------------------- | 120 // --------------------------------------------------------------------------- |
121 // JavaScript invokes | 121 // JavaScript invokes |
122 | 122 |
123 // Invoke the JavaScript function code by either calling or jumping. | 123 // Invoke the JavaScript function code by either calling or jumping. |
124 void InvokeCode(Register code, | 124 void InvokeCode(Register code, |
125 const ParameterCount& expected, | 125 const ParameterCount& expected, |
126 const ParameterCount& actual, | 126 const ParameterCount& actual, |
127 InvokeFlag flag); | 127 InvokeFlag flag); |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 // Call a runtime routine. | 310 // Call a runtime routine. |
311 // Eventually this should be used for all C calls. | 311 // Eventually this should be used for all C calls. |
312 void CallRuntime(Runtime::Function* f, int num_arguments); | 312 void CallRuntime(Runtime::Function* f, int num_arguments); |
313 | 313 |
314 // Convenience function: Same as above, but takes the fid instead. | 314 // Convenience function: Same as above, but takes the fid instead. |
315 void CallRuntime(Runtime::FunctionId id, int num_arguments); | 315 void CallRuntime(Runtime::FunctionId id, int num_arguments); |
316 | 316 |
317 // Tail call of a runtime routine (jump). | 317 // Tail call of a runtime routine (jump). |
318 // Like JumpToBuiltin, but also takes care of passing the number | 318 // Like JumpToBuiltin, but also takes care of passing the number |
319 // of arguments. | 319 // of arguments. |
320 void TailCallRuntime(const ExternalReference& ext, int num_arguments); | 320 void TailCallRuntime(const ExternalReference& ext, |
| 321 int num_arguments, |
| 322 int result_size); |
321 | 323 |
322 // Jump to the builtin routine. | 324 // Jump to the builtin routine. |
323 void JumpToBuiltin(const ExternalReference& ext); | 325 void JumpToBuiltin(const ExternalReference& ext, int result_size); |
324 | 326 |
325 | 327 |
326 // --------------------------------------------------------------------------- | 328 // --------------------------------------------------------------------------- |
327 // Utilities | 329 // Utilities |
328 | 330 |
329 void Ret(); | 331 void Ret(); |
330 | 332 |
331 struct Unresolved { | 333 struct Unresolved { |
332 int pc; | 334 int pc; |
333 uint32_t flags; // see Bootstrapper::FixupFlags decoders/encoders. | 335 uint32_t flags; // see Bootstrapper::FixupFlags decoders/encoders. |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 } \ | 455 } \ |
454 masm-> | 456 masm-> |
455 #else | 457 #else |
456 #define ACCESS_MASM(masm) masm-> | 458 #define ACCESS_MASM(masm) masm-> |
457 #endif | 459 #endif |
458 | 460 |
459 | 461 |
460 } } // namespace v8::internal | 462 } } // namespace v8::internal |
461 | 463 |
462 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 464 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
OLD | NEW |