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 #if V8_TARGET_ARCH_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
6 | 6 |
7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 __ dsll(a7, argc, kPointerSizeLog2); | 755 __ dsll(a7, argc, kPointerSizeLog2); |
756 } | 756 } |
757 __ Branch(&okay, gt, a2, Operand(a7)); // Signed comparison. | 757 __ Branch(&okay, gt, a2, Operand(a7)); // Signed comparison. |
758 | 758 |
759 // Out of stack space. | 759 // Out of stack space. |
760 __ ld(a1, MemOperand(fp, calleeOffset)); | 760 __ ld(a1, MemOperand(fp, calleeOffset)); |
761 if (argc_is_tagged == kArgcIsUntaggedInt) { | 761 if (argc_is_tagged == kArgcIsUntaggedInt) { |
762 __ SmiTag(argc); | 762 __ SmiTag(argc); |
763 } | 763 } |
764 __ Push(a1, argc); | 764 __ Push(a1, argc); |
765 __ InvokeBuiltin(Context::STACK_OVERFLOW_BUILTIN_INDEX, CALL_FUNCTION); | 765 __ CallRuntime(Runtime::kThrowStackOverflow, 0); |
766 | 766 |
767 __ bind(&okay); | 767 __ bind(&okay); |
768 } | 768 } |
769 | 769 |
770 | 770 |
771 static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm, | 771 static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm, |
772 bool is_construct) { | 772 bool is_construct) { |
773 // Called from JSEntryStub::GenerateBody | 773 // Called from JSEntryStub::GenerateBody |
774 | 774 |
775 // ----------- S t a t e ------------- | 775 // ----------- S t a t e ------------- |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 { | 902 { |
903 // Load frame size (word) from the BytecodeArray object. | 903 // Load frame size (word) from the BytecodeArray object. |
904 __ lw(a4, FieldMemOperand(kInterpreterBytecodeArrayRegister, | 904 __ lw(a4, FieldMemOperand(kInterpreterBytecodeArrayRegister, |
905 BytecodeArray::kFrameSizeOffset)); | 905 BytecodeArray::kFrameSizeOffset)); |
906 | 906 |
907 // Do a stack check to ensure we don't go over the limit. | 907 // Do a stack check to ensure we don't go over the limit. |
908 Label ok; | 908 Label ok; |
909 __ Dsubu(a5, sp, Operand(a4)); | 909 __ Dsubu(a5, sp, Operand(a4)); |
910 __ LoadRoot(a2, Heap::kRealStackLimitRootIndex); | 910 __ LoadRoot(a2, Heap::kRealStackLimitRootIndex); |
911 __ Branch(&ok, hs, a5, Operand(a2)); | 911 __ Branch(&ok, hs, a5, Operand(a2)); |
912 __ InvokeBuiltin(Context::STACK_OVERFLOW_BUILTIN_INDEX, CALL_FUNCTION); | 912 __ CallRuntime(Runtime::kThrowStackOverflow, 0); |
913 __ bind(&ok); | 913 __ bind(&ok); |
914 | 914 |
915 // If ok, push undefined as the initial value for all register file entries. | 915 // If ok, push undefined as the initial value for all register file entries. |
916 Label loop_header; | 916 Label loop_header; |
917 Label loop_check; | 917 Label loop_check; |
918 __ LoadRoot(a5, Heap::kUndefinedValueRootIndex); | 918 __ LoadRoot(a5, Heap::kUndefinedValueRootIndex); |
919 __ Branch(&loop_check); | 919 __ Branch(&loop_check); |
920 __ bind(&loop_header); | 920 __ bind(&loop_header); |
921 // TODO(rmcilroy): Consider doing more than one push per loop iteration. | 921 // TODO(rmcilroy): Consider doing more than one push per loop iteration. |
922 __ push(a5); | 922 __ push(a5); |
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1801 // ------------------------------------------- | 1801 // ------------------------------------------- |
1802 // Don't adapt arguments. | 1802 // Don't adapt arguments. |
1803 // ------------------------------------------- | 1803 // ------------------------------------------- |
1804 __ bind(&dont_adapt_arguments); | 1804 __ bind(&dont_adapt_arguments); |
1805 __ Jump(a3); | 1805 __ Jump(a3); |
1806 | 1806 |
1807 __ bind(&stack_overflow); | 1807 __ bind(&stack_overflow); |
1808 { | 1808 { |
1809 FrameScope frame(masm, StackFrame::MANUAL); | 1809 FrameScope frame(masm, StackFrame::MANUAL); |
1810 EnterArgumentsAdaptorFrame(masm); | 1810 EnterArgumentsAdaptorFrame(masm); |
1811 __ InvokeBuiltin(Context::STACK_OVERFLOW_BUILTIN_INDEX, CALL_FUNCTION); | 1811 __ CallRuntime(Runtime::kThrowStackOverflow, 0); |
1812 __ break_(0xCC); | 1812 __ break_(0xCC); |
1813 } | 1813 } |
1814 } | 1814 } |
1815 | 1815 |
1816 | 1816 |
1817 #undef __ | 1817 #undef __ |
1818 | 1818 |
1819 } // namespace internal | 1819 } // namespace internal |
1820 } // namespace v8 | 1820 } // namespace v8 |
1821 | 1821 |
1822 #endif // V8_TARGET_ARCH_MIPS64 | 1822 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |