| 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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
| 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 } | 755 } |
| 756 // Signed comparison. | 756 // Signed comparison. |
| 757 __ Branch(&okay, gt, a2, Operand(t3)); | 757 __ Branch(&okay, gt, a2, Operand(t3)); |
| 758 | 758 |
| 759 // Out of stack space. | 759 // Out of stack space. |
| 760 __ lw(a1, MemOperand(fp, calleeOffset)); | 760 __ lw(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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 904 { | 904 { |
| 905 // Load frame size from the BytecodeArray object. | 905 // Load frame size from the BytecodeArray object. |
| 906 __ lw(t0, FieldMemOperand(kInterpreterBytecodeArrayRegister, | 906 __ lw(t0, FieldMemOperand(kInterpreterBytecodeArrayRegister, |
| 907 BytecodeArray::kFrameSizeOffset)); | 907 BytecodeArray::kFrameSizeOffset)); |
| 908 | 908 |
| 909 // Do a stack check to ensure we don't go over the limit. | 909 // Do a stack check to ensure we don't go over the limit. |
| 910 Label ok; | 910 Label ok; |
| 911 __ Subu(t1, sp, Operand(t0)); | 911 __ Subu(t1, sp, Operand(t0)); |
| 912 __ LoadRoot(a2, Heap::kRealStackLimitRootIndex); | 912 __ LoadRoot(a2, Heap::kRealStackLimitRootIndex); |
| 913 __ Branch(&ok, hs, t1, Operand(a2)); | 913 __ Branch(&ok, hs, t1, Operand(a2)); |
| 914 __ InvokeBuiltin(Context::STACK_OVERFLOW_BUILTIN_INDEX, CALL_FUNCTION); | 914 __ CallRuntime(Runtime::kThrowStackOverflow, 0); |
| 915 __ bind(&ok); | 915 __ bind(&ok); |
| 916 | 916 |
| 917 // If ok, push undefined as the initial value for all register file entries. | 917 // If ok, push undefined as the initial value for all register file entries. |
| 918 Label loop_header; | 918 Label loop_header; |
| 919 Label loop_check; | 919 Label loop_check; |
| 920 __ LoadRoot(t1, Heap::kUndefinedValueRootIndex); | 920 __ LoadRoot(t1, Heap::kUndefinedValueRootIndex); |
| 921 __ Branch(&loop_check); | 921 __ Branch(&loop_check); |
| 922 __ bind(&loop_header); | 922 __ bind(&loop_header); |
| 923 // TODO(rmcilroy): Consider doing more than one push per loop iteration. | 923 // TODO(rmcilroy): Consider doing more than one push per loop iteration. |
| 924 __ push(t1); | 924 __ push(t1); |
| (...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1804 // ------------------------------------------- | 1804 // ------------------------------------------- |
| 1805 // Don't adapt arguments. | 1805 // Don't adapt arguments. |
| 1806 // ------------------------------------------- | 1806 // ------------------------------------------- |
| 1807 __ bind(&dont_adapt_arguments); | 1807 __ bind(&dont_adapt_arguments); |
| 1808 __ Jump(a3); | 1808 __ Jump(a3); |
| 1809 | 1809 |
| 1810 __ bind(&stack_overflow); | 1810 __ bind(&stack_overflow); |
| 1811 { | 1811 { |
| 1812 FrameScope frame(masm, StackFrame::MANUAL); | 1812 FrameScope frame(masm, StackFrame::MANUAL); |
| 1813 EnterArgumentsAdaptorFrame(masm); | 1813 EnterArgumentsAdaptorFrame(masm); |
| 1814 __ InvokeBuiltin(Context::STACK_OVERFLOW_BUILTIN_INDEX, CALL_FUNCTION); | 1814 __ CallRuntime(Runtime::kThrowStackOverflow, 0); |
| 1815 __ break_(0xCC); | 1815 __ break_(0xCC); |
| 1816 } | 1816 } |
| 1817 } | 1817 } |
| 1818 | 1818 |
| 1819 | 1819 |
| 1820 #undef __ | 1820 #undef __ |
| 1821 | 1821 |
| 1822 } // namespace internal | 1822 } // namespace internal |
| 1823 } // namespace v8 | 1823 } // namespace v8 |
| 1824 | 1824 |
| 1825 #endif // V8_TARGET_ARCH_MIPS | 1825 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |