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_IA32_MACRO_ASSEMBLER_IA32_H_ | 5 #ifndef V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
6 #define V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 6 #define V8_IA32_MACRO_ASSEMBLER_IA32_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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 void DebugBreak(); | 234 void DebugBreak(); |
235 | 235 |
236 // Generates function and stub prologue code. | 236 // Generates function and stub prologue code. |
237 void StubPrologue(StackFrame::Type type); | 237 void StubPrologue(StackFrame::Type type); |
238 void Prologue(bool code_pre_aging); | 238 void Prologue(bool code_pre_aging); |
239 | 239 |
240 // Enter specific kind of exit frame. Expects the number of | 240 // Enter specific kind of exit frame. Expects the number of |
241 // arguments in register eax and sets up the number of arguments in | 241 // arguments in register eax and sets up the number of arguments in |
242 // register edi and the pointer to the first argument in register | 242 // register edi and the pointer to the first argument in register |
243 // esi. | 243 // esi. |
244 void EnterExitFrame(int argc, bool save_doubles); | 244 void EnterExitFrame(int argc, bool save_doubles, StackFrame::Type frame_type); |
245 | 245 |
246 void EnterApiExitFrame(int argc); | 246 void EnterApiExitFrame(int argc); |
247 | 247 |
248 // Leave the current exit frame. Expects the return value in | 248 // Leave the current exit frame. Expects the return value in |
249 // register eax:edx (untouched) and the pointer to the first | 249 // register eax:edx (untouched) and the pointer to the first |
250 // argument in register esi (if pop_arguments == true). | 250 // argument in register esi (if pop_arguments == true). |
251 void LeaveExitFrame(bool save_doubles, bool pop_arguments = true); | 251 void LeaveExitFrame(bool save_doubles, bool pop_arguments = true); |
252 | 252 |
253 // Leave the current exit frame. Expects the return value in | 253 // Leave the current exit frame. Expects the return value in |
254 // register eax (untouched). | 254 // register eax (untouched). |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
779 | 779 |
780 // Calls a C function and cleans up the space for arguments allocated | 780 // Calls a C function and cleans up the space for arguments allocated |
781 // by PrepareCallCFunction. The called function is not allowed to trigger a | 781 // by PrepareCallCFunction. The called function is not allowed to trigger a |
782 // garbage collection, since that might move the code and invalidate the | 782 // garbage collection, since that might move the code and invalidate the |
783 // return address (unless this is somehow accounted for by the called | 783 // return address (unless this is somehow accounted for by the called |
784 // function). | 784 // function). |
785 void CallCFunction(ExternalReference function, int num_arguments); | 785 void CallCFunction(ExternalReference function, int num_arguments); |
786 void CallCFunction(Register function, int num_arguments); | 786 void CallCFunction(Register function, int num_arguments); |
787 | 787 |
788 // Jump to a runtime routine. | 788 // Jump to a runtime routine. |
789 void JumpToExternalReference(const ExternalReference& ext); | 789 void JumpToExternalReference(const ExternalReference& ext, |
| 790 bool builtin_exit_frame = false); |
790 | 791 |
791 // --------------------------------------------------------------------------- | 792 // --------------------------------------------------------------------------- |
792 // Utilities | 793 // Utilities |
793 | 794 |
794 void Ret(); | 795 void Ret(); |
795 | 796 |
796 // Return and drop arguments from stack, where the number of arguments | 797 // Return and drop arguments from stack, where the number of arguments |
797 // may be bigger than 2^16 - 1. Requires a scratch register. | 798 // may be bigger than 2^16 - 1. Requires a scratch register. |
798 void Ret(int bytes_dropped, Register scratch); | 799 void Ret(int bytes_dropped, Register scratch); |
799 | 800 |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
965 // This handle will be patched with the code object on installation. | 966 // This handle will be patched with the code object on installation. |
966 Handle<Object> code_object_; | 967 Handle<Object> code_object_; |
967 | 968 |
968 // Helper functions for generating invokes. | 969 // Helper functions for generating invokes. |
969 void InvokePrologue(const ParameterCount& expected, | 970 void InvokePrologue(const ParameterCount& expected, |
970 const ParameterCount& actual, Label* done, | 971 const ParameterCount& actual, Label* done, |
971 bool* definitely_mismatches, InvokeFlag flag, | 972 bool* definitely_mismatches, InvokeFlag flag, |
972 Label::Distance done_distance, | 973 Label::Distance done_distance, |
973 const CallWrapper& call_wrapper); | 974 const CallWrapper& call_wrapper); |
974 | 975 |
975 void EnterExitFramePrologue(); | 976 void EnterExitFramePrologue(StackFrame::Type frame_type); |
976 void EnterExitFrameEpilogue(int argc, bool save_doubles); | 977 void EnterExitFrameEpilogue(int argc, bool save_doubles); |
977 | 978 |
978 void LeaveExitFrameEpilogue(bool restore_context); | 979 void LeaveExitFrameEpilogue(bool restore_context); |
979 | 980 |
980 // Allocation support helpers. | 981 // Allocation support helpers. |
981 void LoadAllocationTopHelper(Register result, Register scratch, | 982 void LoadAllocationTopHelper(Register result, Register scratch, |
982 AllocationFlags flags); | 983 AllocationFlags flags); |
983 | 984 |
984 void UpdateAllocationTopHelper(Register result_end, Register scratch, | 985 void UpdateAllocationTopHelper(Register result_end, Register scratch, |
985 AllocationFlags flags); | 986 AllocationFlags flags); |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1074 } \ | 1075 } \ |
1075 masm-> | 1076 masm-> |
1076 #else | 1077 #else |
1077 #define ACCESS_MASM(masm) masm-> | 1078 #define ACCESS_MASM(masm) masm-> |
1078 #endif | 1079 #endif |
1079 | 1080 |
1080 } // namespace internal | 1081 } // namespace internal |
1081 } // namespace v8 | 1082 } // namespace v8 |
1082 | 1083 |
1083 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 1084 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
OLD | NEW |