OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 2101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2112 // After shadowing stops, the original targets are unshadowed and the | 2112 // After shadowing stops, the original targets are unshadowed and the |
2113 // ShadowTargets represent the formerly shadowing targets. | 2113 // ShadowTargets represent the formerly shadowing targets. |
2114 bool has_unlinks = false; | 2114 bool has_unlinks = false; |
2115 for (int i = 0; i < shadows.length(); i++) { | 2115 for (int i = 0; i < shadows.length(); i++) { |
2116 shadows[i]->StopShadowing(); | 2116 shadows[i]->StopShadowing(); |
2117 has_unlinks = has_unlinks || shadows[i]->is_linked(); | 2117 has_unlinks = has_unlinks || shadows[i]->is_linked(); |
2118 } | 2118 } |
2119 function_return_is_shadowed_ = function_return_was_shadowed; | 2119 function_return_is_shadowed_ = function_return_was_shadowed; |
2120 | 2120 |
2121 // Get an external reference to the handler address. | 2121 // Get an external reference to the handler address. |
2122 ExternalReference handler_address(Top::k_handler_address); | 2122 ExternalReference handler_address(Isolate::k_handler_address); |
2123 | 2123 |
2124 // Make sure that there's nothing left on the stack above the | 2124 // Make sure that there's nothing left on the stack above the |
2125 // handler structure. | 2125 // handler structure. |
2126 if (FLAG_debug_code) { | 2126 if (FLAG_debug_code) { |
2127 __ movq(kScratchRegister, handler_address); | 2127 __ movq(kScratchRegister, handler_address); |
2128 __ cmpq(rsp, Operand(kScratchRegister, 0)); | 2128 __ cmpq(rsp, Operand(kScratchRegister, 0)); |
2129 __ Assert(equal, "stack pointer should point to top handler"); | 2129 __ Assert(equal, "stack pointer should point to top handler"); |
2130 } | 2130 } |
2131 | 2131 |
2132 // If we can fall off the end of the try block, unlink from try chain. | 2132 // If we can fall off the end of the try block, unlink from try chain. |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2241 // After shadowing stops, the original targets are unshadowed and the | 2241 // After shadowing stops, the original targets are unshadowed and the |
2242 // ShadowTargets represent the formerly shadowing targets. | 2242 // ShadowTargets represent the formerly shadowing targets. |
2243 int nof_unlinks = 0; | 2243 int nof_unlinks = 0; |
2244 for (int i = 0; i < shadows.length(); i++) { | 2244 for (int i = 0; i < shadows.length(); i++) { |
2245 shadows[i]->StopShadowing(); | 2245 shadows[i]->StopShadowing(); |
2246 if (shadows[i]->is_linked()) nof_unlinks++; | 2246 if (shadows[i]->is_linked()) nof_unlinks++; |
2247 } | 2247 } |
2248 function_return_is_shadowed_ = function_return_was_shadowed; | 2248 function_return_is_shadowed_ = function_return_was_shadowed; |
2249 | 2249 |
2250 // Get an external reference to the handler address. | 2250 // Get an external reference to the handler address. |
2251 ExternalReference handler_address(Top::k_handler_address); | 2251 ExternalReference handler_address(Isolate::k_handler_address); |
2252 | 2252 |
2253 // If we can fall off the end of the try block, unlink from the try | 2253 // If we can fall off the end of the try block, unlink from the try |
2254 // chain and set the state on the frame to FALLING. | 2254 // chain and set the state on the frame to FALLING. |
2255 if (has_valid_frame()) { | 2255 if (has_valid_frame()) { |
2256 // The next handler address is on top of the frame. | 2256 // The next handler address is on top of the frame. |
2257 ASSERT(StackHandlerConstants::kNextOffset == 0); | 2257 ASSERT(StackHandlerConstants::kNextOffset == 0); |
2258 __ movq(kScratchRegister, handler_address); | 2258 __ movq(kScratchRegister, handler_address); |
2259 frame_->EmitPop(Operand(kScratchRegister, 0)); | 2259 frame_->EmitPop(Operand(kScratchRegister, 0)); |
2260 frame_->Drop(StackHandlerConstants::kSize / kPointerSize - 1); | 2260 frame_->Drop(StackHandlerConstants::kSize / kPointerSize - 1); |
2261 | 2261 |
(...skipping 2603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4865 } | 4865 } |
4866 | 4866 |
4867 | 4867 |
4868 void CodeGenerator::GenerateGetFromCache(ZoneList<Expression*>* args) { | 4868 void CodeGenerator::GenerateGetFromCache(ZoneList<Expression*>* args) { |
4869 ASSERT_EQ(2, args->length()); | 4869 ASSERT_EQ(2, args->length()); |
4870 | 4870 |
4871 ASSERT_NE(NULL, args->at(0)->AsLiteral()); | 4871 ASSERT_NE(NULL, args->at(0)->AsLiteral()); |
4872 int cache_id = Smi::cast(*(args->at(0)->AsLiteral()->handle()))->value(); | 4872 int cache_id = Smi::cast(*(args->at(0)->AsLiteral()->handle()))->value(); |
4873 | 4873 |
4874 Handle<FixedArray> jsfunction_result_caches( | 4874 Handle<FixedArray> jsfunction_result_caches( |
4875 Top::global_context()->jsfunction_result_caches()); | 4875 Isolate::Current()->global_context()->jsfunction_result_caches()); |
4876 if (jsfunction_result_caches->length() <= cache_id) { | 4876 if (jsfunction_result_caches->length() <= cache_id) { |
4877 __ Abort("Attempt to use undefined cache."); | 4877 __ Abort("Attempt to use undefined cache."); |
4878 frame_->Push(Factory::undefined_value()); | 4878 frame_->Push(Factory::undefined_value()); |
4879 return; | 4879 return; |
4880 } | 4880 } |
4881 | 4881 |
4882 Load(args->at(1)); | 4882 Load(args->at(1)); |
4883 Result key = frame_->Pop(); | 4883 Result key = frame_->Pop(); |
4884 key.ToRegister(); | 4884 key.ToRegister(); |
4885 | 4885 |
(...skipping 3882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8768 Label failure; | 8768 Label failure; |
8769 __ cmpl(rax, Immediate(NativeRegExpMacroAssembler::FAILURE)); | 8769 __ cmpl(rax, Immediate(NativeRegExpMacroAssembler::FAILURE)); |
8770 __ j(equal, &failure); | 8770 __ j(equal, &failure); |
8771 __ cmpl(rax, Immediate(NativeRegExpMacroAssembler::EXCEPTION)); | 8771 __ cmpl(rax, Immediate(NativeRegExpMacroAssembler::EXCEPTION)); |
8772 // If not exception it can only be retry. Handle that in the runtime system. | 8772 // If not exception it can only be retry. Handle that in the runtime system. |
8773 __ j(not_equal, &runtime); | 8773 __ j(not_equal, &runtime); |
8774 // Result must now be exception. If there is no pending exception already a | 8774 // Result must now be exception. If there is no pending exception already a |
8775 // stack overflow (on the backtrack stack) was detected in RegExp code but | 8775 // stack overflow (on the backtrack stack) was detected in RegExp code but |
8776 // haven't created the exception yet. Handle that in the runtime system. | 8776 // haven't created the exception yet. Handle that in the runtime system. |
8777 // TODO(592): Rerunning the RegExp to get the stack overflow exception. | 8777 // TODO(592): Rerunning the RegExp to get the stack overflow exception. |
8778 ExternalReference pending_exception_address(Top::k_pending_exception_address); | 8778 ExternalReference pending_exception_address( |
| 8779 Isolate::k_pending_exception_address); |
8779 __ movq(kScratchRegister, pending_exception_address); | 8780 __ movq(kScratchRegister, pending_exception_address); |
8780 __ Cmp(kScratchRegister, Factory::the_hole_value()); | 8781 __ Cmp(kScratchRegister, Factory::the_hole_value()); |
8781 __ j(equal, &runtime); | 8782 __ j(equal, &runtime); |
8782 __ bind(&failure); | 8783 __ bind(&failure); |
8783 // For failure and exception return null. | 8784 // For failure and exception return null. |
8784 __ Move(rax, Factory::null_value()); | 8785 __ Move(rax, Factory::null_value()); |
8785 __ ret(4 * kPointerSize); | 8786 __ ret(4 * kPointerSize); |
8786 | 8787 |
8787 // Load RegExp data. | 8788 // Load RegExp data. |
8788 __ bind(&success); | 8789 __ bind(&success); |
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9489 | 9490 |
9490 | 9491 |
9491 void CEntryStub::GenerateThrowTOS(MacroAssembler* masm) { | 9492 void CEntryStub::GenerateThrowTOS(MacroAssembler* masm) { |
9492 // Check that stack should contain next handler, frame pointer, state and | 9493 // Check that stack should contain next handler, frame pointer, state and |
9493 // return address in that order. | 9494 // return address in that order. |
9494 ASSERT_EQ(StackHandlerConstants::kFPOffset + kPointerSize, | 9495 ASSERT_EQ(StackHandlerConstants::kFPOffset + kPointerSize, |
9495 StackHandlerConstants::kStateOffset); | 9496 StackHandlerConstants::kStateOffset); |
9496 ASSERT_EQ(StackHandlerConstants::kStateOffset + kPointerSize, | 9497 ASSERT_EQ(StackHandlerConstants::kStateOffset + kPointerSize, |
9497 StackHandlerConstants::kPCOffset); | 9498 StackHandlerConstants::kPCOffset); |
9498 | 9499 |
9499 ExternalReference handler_address(Top::k_handler_address); | 9500 ExternalReference handler_address(Isolate::k_handler_address); |
9500 __ movq(kScratchRegister, handler_address); | 9501 __ movq(kScratchRegister, handler_address); |
9501 __ movq(rsp, Operand(kScratchRegister, 0)); | 9502 __ movq(rsp, Operand(kScratchRegister, 0)); |
9502 // get next in chain | 9503 // get next in chain |
9503 __ pop(rcx); | 9504 __ pop(rcx); |
9504 __ movq(Operand(kScratchRegister, 0), rcx); | 9505 __ movq(Operand(kScratchRegister, 0), rcx); |
9505 __ pop(rbp); // pop frame pointer | 9506 __ pop(rbp); // pop frame pointer |
9506 __ pop(rdx); // remove state | 9507 __ pop(rdx); // remove state |
9507 | 9508 |
9508 // Before returning we restore the context from the frame pointer if not NULL. | 9509 // Before returning we restore the context from the frame pointer if not NULL. |
9509 // The frame pointer is NULL in the exception handler of a JS entry frame. | 9510 // The frame pointer is NULL in the exception handler of a JS entry frame. |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9627 ASSERT(Failure::RETRY_AFTER_GC == 0); | 9628 ASSERT(Failure::RETRY_AFTER_GC == 0); |
9628 __ testl(rax, Immediate(((1 << kFailureTypeTagSize) - 1) << kFailureTagSize)); | 9629 __ testl(rax, Immediate(((1 << kFailureTypeTagSize) - 1) << kFailureTagSize)); |
9629 __ j(zero, &retry); | 9630 __ j(zero, &retry); |
9630 | 9631 |
9631 // Special handling of out of memory exceptions. | 9632 // Special handling of out of memory exceptions. |
9632 __ movq(kScratchRegister, Failure::OutOfMemoryException(), RelocInfo::NONE); | 9633 __ movq(kScratchRegister, Failure::OutOfMemoryException(), RelocInfo::NONE); |
9633 __ cmpq(rax, kScratchRegister); | 9634 __ cmpq(rax, kScratchRegister); |
9634 __ j(equal, throw_out_of_memory_exception); | 9635 __ j(equal, throw_out_of_memory_exception); |
9635 | 9636 |
9636 // Retrieve the pending exception and clear the variable. | 9637 // Retrieve the pending exception and clear the variable. |
9637 ExternalReference pending_exception_address(Top::k_pending_exception_address); | 9638 ExternalReference pending_exception_address( |
| 9639 Isolate::k_pending_exception_address); |
9638 __ movq(kScratchRegister, pending_exception_address); | 9640 __ movq(kScratchRegister, pending_exception_address); |
9639 __ movq(rax, Operand(kScratchRegister, 0)); | 9641 __ movq(rax, Operand(kScratchRegister, 0)); |
9640 __ movq(rdx, ExternalReference::the_hole_value_location()); | 9642 __ movq(rdx, ExternalReference::the_hole_value_location()); |
9641 __ movq(rdx, Operand(rdx, 0)); | 9643 __ movq(rdx, Operand(rdx, 0)); |
9642 __ movq(Operand(kScratchRegister, 0), rdx); | 9644 __ movq(Operand(kScratchRegister, 0), rdx); |
9643 | 9645 |
9644 // Special handling of termination exceptions which are uncatchable | 9646 // Special handling of termination exceptions which are uncatchable |
9645 // by javascript code. | 9647 // by javascript code. |
9646 __ CompareRoot(rax, Heap::kTerminationExceptionRootIndex); | 9648 __ CompareRoot(rax, Heap::kTerminationExceptionRootIndex); |
9647 __ j(equal, throw_termination_exception); | 9649 __ j(equal, throw_termination_exception); |
9648 | 9650 |
9649 // Handle normal exception. | 9651 // Handle normal exception. |
9650 __ jmp(throw_normal_exception); | 9652 __ jmp(throw_normal_exception); |
9651 | 9653 |
9652 // Retry. | 9654 // Retry. |
9653 __ bind(&retry); | 9655 __ bind(&retry); |
9654 } | 9656 } |
9655 | 9657 |
9656 | 9658 |
9657 void CEntryStub::GenerateThrowUncatchable(MacroAssembler* masm, | 9659 void CEntryStub::GenerateThrowUncatchable(MacroAssembler* masm, |
9658 UncatchableExceptionType type) { | 9660 UncatchableExceptionType type) { |
9659 // Fetch top stack handler. | 9661 // Fetch top stack handler. |
9660 ExternalReference handler_address(Top::k_handler_address); | 9662 ExternalReference handler_address(Isolate::k_handler_address); |
9661 __ movq(kScratchRegister, handler_address); | 9663 __ movq(kScratchRegister, handler_address); |
9662 __ movq(rsp, Operand(kScratchRegister, 0)); | 9664 __ movq(rsp, Operand(kScratchRegister, 0)); |
9663 | 9665 |
9664 // Unwind the handlers until the ENTRY handler is found. | 9666 // Unwind the handlers until the ENTRY handler is found. |
9665 Label loop, done; | 9667 Label loop, done; |
9666 __ bind(&loop); | 9668 __ bind(&loop); |
9667 // Load the type of the current stack handler. | 9669 // Load the type of the current stack handler. |
9668 const int kStateOffset = StackHandlerConstants::kStateOffset; | 9670 const int kStateOffset = StackHandlerConstants::kStateOffset; |
9669 __ cmpq(Operand(rsp, kStateOffset), Immediate(StackHandler::ENTRY)); | 9671 __ cmpq(Operand(rsp, kStateOffset), Immediate(StackHandler::ENTRY)); |
9670 __ j(equal, &done); | 9672 __ j(equal, &done); |
9671 // Fetch the next handler in the list. | 9673 // Fetch the next handler in the list. |
9672 const int kNextOffset = StackHandlerConstants::kNextOffset; | 9674 const int kNextOffset = StackHandlerConstants::kNextOffset; |
9673 __ movq(rsp, Operand(rsp, kNextOffset)); | 9675 __ movq(rsp, Operand(rsp, kNextOffset)); |
9674 __ jmp(&loop); | 9676 __ jmp(&loop); |
9675 __ bind(&done); | 9677 __ bind(&done); |
9676 | 9678 |
9677 // Set the top handler address to next handler past the current ENTRY handler. | 9679 // Set the top handler address to next handler past the current ENTRY handler. |
9678 __ movq(kScratchRegister, handler_address); | 9680 __ movq(kScratchRegister, handler_address); |
9679 __ pop(Operand(kScratchRegister, 0)); | 9681 __ pop(Operand(kScratchRegister, 0)); |
9680 | 9682 |
9681 if (type == OUT_OF_MEMORY) { | 9683 if (type == OUT_OF_MEMORY) { |
9682 // Set external caught exception to false. | 9684 // Set external caught exception to false. |
9683 ExternalReference external_caught(Top::k_external_caught_exception_address); | 9685 ExternalReference external_caught( |
| 9686 Isolate::k_external_caught_exception_address); |
9684 __ movq(rax, Immediate(false)); | 9687 __ movq(rax, Immediate(false)); |
9685 __ store_rax(external_caught); | 9688 __ store_rax(external_caught); |
9686 | 9689 |
9687 // Set pending exception and rax to out of memory exception. | 9690 // Set pending exception and rax to out of memory exception. |
9688 ExternalReference pending_exception(Top::k_pending_exception_address); | 9691 ExternalReference pending_exception(Isolate::k_pending_exception_address); |
9689 __ movq(rax, Failure::OutOfMemoryException(), RelocInfo::NONE); | 9692 __ movq(rax, Failure::OutOfMemoryException(), RelocInfo::NONE); |
9690 __ store_rax(pending_exception); | 9693 __ store_rax(pending_exception); |
9691 } | 9694 } |
9692 | 9695 |
9693 // Clear the context pointer. | 9696 // Clear the context pointer. |
9694 __ xor_(rsi, rsi); | 9697 __ xor_(rsi, rsi); |
9695 | 9698 |
9696 // Restore registers from handler. | 9699 // Restore registers from handler. |
9697 ASSERT_EQ(StackHandlerConstants::kNextOffset + kPointerSize, | 9700 ASSERT_EQ(StackHandlerConstants::kNextOffset + kPointerSize, |
9698 StackHandlerConstants::kFPOffset); | 9701 StackHandlerConstants::kFPOffset); |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9855 __ push(r13); | 9858 __ push(r13); |
9856 __ push(r14); | 9859 __ push(r14); |
9857 __ push(r15); | 9860 __ push(r15); |
9858 __ push(rdi); | 9861 __ push(rdi); |
9859 __ push(rsi); | 9862 __ push(rsi); |
9860 __ push(rbx); | 9863 __ push(rbx); |
9861 // TODO(X64): Push XMM6-XMM15 (low 64 bits) as well, or make them | 9864 // TODO(X64): Push XMM6-XMM15 (low 64 bits) as well, or make them |
9862 // callee-save in JS code as well. | 9865 // callee-save in JS code as well. |
9863 | 9866 |
9864 // Save copies of the top frame descriptor on the stack. | 9867 // Save copies of the top frame descriptor on the stack. |
9865 ExternalReference c_entry_fp(Top::k_c_entry_fp_address); | 9868 ExternalReference c_entry_fp(Isolate::k_c_entry_fp_address); |
9866 __ load_rax(c_entry_fp); | 9869 __ load_rax(c_entry_fp); |
9867 __ push(rax); | 9870 __ push(rax); |
9868 | 9871 |
9869 #ifdef ENABLE_LOGGING_AND_PROFILING | 9872 #ifdef ENABLE_LOGGING_AND_PROFILING |
9870 // If this is the outermost JS call, set js_entry_sp value. | 9873 // If this is the outermost JS call, set js_entry_sp value. |
9871 ExternalReference js_entry_sp(Top::k_js_entry_sp_address); | 9874 ExternalReference js_entry_sp(Isolate::k_js_entry_sp_address); |
9872 __ load_rax(js_entry_sp); | 9875 __ load_rax(js_entry_sp); |
9873 __ testq(rax, rax); | 9876 __ testq(rax, rax); |
9874 __ j(not_zero, ¬_outermost_js); | 9877 __ j(not_zero, ¬_outermost_js); |
9875 __ movq(rax, rbp); | 9878 __ movq(rax, rbp); |
9876 __ store_rax(js_entry_sp); | 9879 __ store_rax(js_entry_sp); |
9877 __ bind(¬_outermost_js); | 9880 __ bind(¬_outermost_js); |
9878 #endif | 9881 #endif |
9879 | 9882 |
9880 // Call a faked try-block that does the invoke. | 9883 // Call a faked try-block that does the invoke. |
9881 __ call(&invoke); | 9884 __ call(&invoke); |
9882 | 9885 |
9883 // Caught exception: Store result (exception) in the pending | 9886 // Caught exception: Store result (exception) in the pending |
9884 // exception field in the JSEnv and return a failure sentinel. | 9887 // exception field in the JSEnv and return a failure sentinel. |
9885 ExternalReference pending_exception(Top::k_pending_exception_address); | 9888 ExternalReference pending_exception(Isolate::k_pending_exception_address); |
9886 __ store_rax(pending_exception); | 9889 __ store_rax(pending_exception); |
9887 __ movq(rax, Failure::Exception(), RelocInfo::NONE); | 9890 __ movq(rax, Failure::Exception(), RelocInfo::NONE); |
9888 __ jmp(&exit); | 9891 __ jmp(&exit); |
9889 | 9892 |
9890 // Invoke: Link this frame into the handler chain. | 9893 // Invoke: Link this frame into the handler chain. |
9891 __ bind(&invoke); | 9894 __ bind(&invoke); |
9892 __ PushTryHandler(IN_JS_ENTRY, JS_ENTRY_HANDLER); | 9895 __ PushTryHandler(IN_JS_ENTRY, JS_ENTRY_HANDLER); |
9893 | 9896 |
9894 // Clear any pending exceptions. | 9897 // Clear any pending exceptions. |
9895 __ load_rax(ExternalReference::the_hole_value_location()); | 9898 __ load_rax(ExternalReference::the_hole_value_location()); |
(...skipping 11 matching lines...) Expand all Loading... |
9907 ExternalReference construct_entry(Builtins::JSConstructEntryTrampoline); | 9910 ExternalReference construct_entry(Builtins::JSConstructEntryTrampoline); |
9908 __ load_rax(construct_entry); | 9911 __ load_rax(construct_entry); |
9909 } else { | 9912 } else { |
9910 ExternalReference entry(Builtins::JSEntryTrampoline); | 9913 ExternalReference entry(Builtins::JSEntryTrampoline); |
9911 __ load_rax(entry); | 9914 __ load_rax(entry); |
9912 } | 9915 } |
9913 __ lea(kScratchRegister, FieldOperand(rax, Code::kHeaderSize)); | 9916 __ lea(kScratchRegister, FieldOperand(rax, Code::kHeaderSize)); |
9914 __ call(kScratchRegister); | 9917 __ call(kScratchRegister); |
9915 | 9918 |
9916 // Unlink this frame from the handler chain. | 9919 // Unlink this frame from the handler chain. |
9917 __ movq(kScratchRegister, ExternalReference(Top::k_handler_address)); | 9920 __ movq(kScratchRegister, ExternalReference(Isolate::k_handler_address)); |
9918 __ pop(Operand(kScratchRegister, 0)); | 9921 __ pop(Operand(kScratchRegister, 0)); |
9919 // Pop next_sp. | 9922 // Pop next_sp. |
9920 __ addq(rsp, Immediate(StackHandlerConstants::kSize - kPointerSize)); | 9923 __ addq(rsp, Immediate(StackHandlerConstants::kSize - kPointerSize)); |
9921 | 9924 |
9922 #ifdef ENABLE_LOGGING_AND_PROFILING | 9925 #ifdef ENABLE_LOGGING_AND_PROFILING |
9923 // If current EBP value is the same as js_entry_sp value, it means that | 9926 // If current EBP value is the same as js_entry_sp value, it means that |
9924 // the current function is the outermost. | 9927 // the current function is the outermost. |
9925 __ movq(kScratchRegister, js_entry_sp); | 9928 __ movq(kScratchRegister, js_entry_sp); |
9926 __ cmpq(rbp, Operand(kScratchRegister, 0)); | 9929 __ cmpq(rbp, Operand(kScratchRegister, 0)); |
9927 __ j(not_equal, ¬_outermost_js_2); | 9930 __ j(not_equal, ¬_outermost_js_2); |
9928 __ movq(Operand(kScratchRegister, 0), Immediate(0)); | 9931 __ movq(Operand(kScratchRegister, 0), Immediate(0)); |
9929 __ bind(¬_outermost_js_2); | 9932 __ bind(¬_outermost_js_2); |
9930 #endif | 9933 #endif |
9931 | 9934 |
9932 // Restore the top frame descriptor from the stack. | 9935 // Restore the top frame descriptor from the stack. |
9933 __ bind(&exit); | 9936 __ bind(&exit); |
9934 __ movq(kScratchRegister, ExternalReference(Top::k_c_entry_fp_address)); | 9937 __ movq(kScratchRegister, ExternalReference(Isolate::k_c_entry_fp_address)); |
9935 __ pop(Operand(kScratchRegister, 0)); | 9938 __ pop(Operand(kScratchRegister, 0)); |
9936 | 9939 |
9937 // Restore callee-saved registers (X64 conventions). | 9940 // Restore callee-saved registers (X64 conventions). |
9938 __ pop(rbx); | 9941 __ pop(rbx); |
9939 __ pop(rsi); | 9942 __ pop(rsi); |
9940 __ pop(rdi); | 9943 __ pop(rdi); |
9941 __ pop(r15); | 9944 __ pop(r15); |
9942 __ pop(r14); | 9945 __ pop(r14); |
9943 __ pop(r13); | 9946 __ pop(r13); |
9944 __ pop(r12); | 9947 __ pop(r12); |
(...skipping 2006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11951 } | 11954 } |
11952 | 11955 |
11953 #endif | 11956 #endif |
11954 | 11957 |
11955 | 11958 |
11956 #undef __ | 11959 #undef __ |
11957 | 11960 |
11958 } } // namespace v8::internal | 11961 } } // namespace v8::internal |
11959 | 11962 |
11960 #endif // V8_TARGET_ARCH_X64 | 11963 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |