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_X87_MACRO_ASSEMBLER_X87_H_ | 5 #ifndef V8_X87_MACRO_ASSEMBLER_X87_H_ |
6 #define V8_X87_MACRO_ASSEMBLER_X87_H_ | 6 #define V8_X87_MACRO_ASSEMBLER_X87_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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 void DebugBreak(); | 237 void DebugBreak(); |
238 | 238 |
239 // Generates function and stub prologue code. | 239 // Generates function and stub prologue code. |
240 void StubPrologue(StackFrame::Type type); | 240 void StubPrologue(StackFrame::Type type); |
241 void Prologue(bool code_pre_aging); | 241 void Prologue(bool code_pre_aging); |
242 | 242 |
243 // Enter specific kind of exit frame. Expects the number of | 243 // Enter specific kind of exit frame. Expects the number of |
244 // arguments in register eax and sets up the number of arguments in | 244 // arguments in register eax and sets up the number of arguments in |
245 // register edi and the pointer to the first argument in register | 245 // register edi and the pointer to the first argument in register |
246 // esi. | 246 // esi. |
247 void EnterExitFrame(int argc, bool save_doubles); | 247 void EnterExitFrame(int argc, bool save_doubles, StackFrame::Type frame_type); |
248 | 248 |
249 void EnterApiExitFrame(int argc); | 249 void EnterApiExitFrame(int argc); |
250 | 250 |
251 // Leave the current exit frame. Expects the return value in | 251 // Leave the current exit frame. Expects the return value in |
252 // register eax:edx (untouched) and the pointer to the first | 252 // register eax:edx (untouched) and the pointer to the first |
253 // argument in register esi (if pop_arguments == true). | 253 // argument in register esi (if pop_arguments == true). |
254 void LeaveExitFrame(bool save_doubles, bool pop_arguments = true); | 254 void LeaveExitFrame(bool save_doubles, bool pop_arguments = true); |
255 | 255 |
256 // Leave the current exit frame. Expects the return value in | 256 // Leave the current exit frame. Expects the return value in |
257 // register eax (untouched). | 257 // register eax (untouched). |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 | 768 |
769 // Calls a C function and cleans up the space for arguments allocated | 769 // Calls a C function and cleans up the space for arguments allocated |
770 // by PrepareCallCFunction. The called function is not allowed to trigger a | 770 // by PrepareCallCFunction. The called function is not allowed to trigger a |
771 // garbage collection, since that might move the code and invalidate the | 771 // garbage collection, since that might move the code and invalidate the |
772 // return address (unless this is somehow accounted for by the called | 772 // return address (unless this is somehow accounted for by the called |
773 // function). | 773 // function). |
774 void CallCFunction(ExternalReference function, int num_arguments); | 774 void CallCFunction(ExternalReference function, int num_arguments); |
775 void CallCFunction(Register function, int num_arguments); | 775 void CallCFunction(Register function, int num_arguments); |
776 | 776 |
777 // Jump to a runtime routine. | 777 // Jump to a runtime routine. |
778 void JumpToExternalReference(const ExternalReference& ext); | 778 void JumpToExternalReference(const ExternalReference& ext, |
| 779 bool builtin_exit_frame = false); |
779 | 780 |
780 // --------------------------------------------------------------------------- | 781 // --------------------------------------------------------------------------- |
781 // Utilities | 782 // Utilities |
782 | 783 |
783 void Ret(); | 784 void Ret(); |
784 | 785 |
785 // Return and drop arguments from stack, where the number of arguments | 786 // Return and drop arguments from stack, where the number of arguments |
786 // may be bigger than 2^16 - 1. Requires a scratch register. | 787 // may be bigger than 2^16 - 1. Requires a scratch register. |
787 void Ret(int bytes_dropped, Register scratch); | 788 void Ret(int bytes_dropped, Register scratch); |
788 | 789 |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
944 // This handle will be patched with the code object on installation. | 945 // This handle will be patched with the code object on installation. |
945 Handle<Object> code_object_; | 946 Handle<Object> code_object_; |
946 | 947 |
947 // Helper functions for generating invokes. | 948 // Helper functions for generating invokes. |
948 void InvokePrologue(const ParameterCount& expected, | 949 void InvokePrologue(const ParameterCount& expected, |
949 const ParameterCount& actual, Label* done, | 950 const ParameterCount& actual, Label* done, |
950 bool* definitely_mismatches, InvokeFlag flag, | 951 bool* definitely_mismatches, InvokeFlag flag, |
951 Label::Distance done_distance, | 952 Label::Distance done_distance, |
952 const CallWrapper& call_wrapper); | 953 const CallWrapper& call_wrapper); |
953 | 954 |
954 void EnterExitFramePrologue(); | 955 void EnterExitFramePrologue(StackFrame::Type frame_type); |
955 void EnterExitFrameEpilogue(int argc, bool save_doubles); | 956 void EnterExitFrameEpilogue(int argc, bool save_doubles); |
956 | 957 |
957 void LeaveExitFrameEpilogue(bool restore_context); | 958 void LeaveExitFrameEpilogue(bool restore_context); |
958 | 959 |
959 // Allocation support helpers. | 960 // Allocation support helpers. |
960 void LoadAllocationTopHelper(Register result, Register scratch, | 961 void LoadAllocationTopHelper(Register result, Register scratch, |
961 AllocationFlags flags); | 962 AllocationFlags flags); |
962 | 963 |
963 void UpdateAllocationTopHelper(Register result_end, Register scratch, | 964 void UpdateAllocationTopHelper(Register result_end, Register scratch, |
964 AllocationFlags flags); | 965 AllocationFlags flags); |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1053 } \ | 1054 } \ |
1054 masm-> | 1055 masm-> |
1055 #else | 1056 #else |
1056 #define ACCESS_MASM(masm) masm-> | 1057 #define ACCESS_MASM(masm) masm-> |
1057 #endif | 1058 #endif |
1058 | 1059 |
1059 } // namespace internal | 1060 } // namespace internal |
1060 } // namespace v8 | 1061 } // namespace v8 |
1061 | 1062 |
1062 #endif // V8_X87_MACRO_ASSEMBLER_X87_H_ | 1063 #endif // V8_X87_MACRO_ASSEMBLER_X87_H_ |
OLD | NEW |