Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(697)

Side by Side Diff: src/ppc/builtins-ppc.cc

Issue 1334303002: PPC: [builtins] Remove the weird STACK_OVERFLOW builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/full-codegen/ppc/full-codegen-ppc.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
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 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 } 752 }
753 __ cmp(r5, r0); 753 __ cmp(r5, r0);
754 __ bgt(&okay); // Signed comparison. 754 __ bgt(&okay); // Signed comparison.
755 755
756 // Out of stack space. 756 // Out of stack space.
757 __ LoadP(r4, MemOperand(fp, calleeOffset)); 757 __ LoadP(r4, MemOperand(fp, calleeOffset));
758 if (argc_is_tagged == kArgcIsUntaggedInt) { 758 if (argc_is_tagged == kArgcIsUntaggedInt) {
759 __ SmiTag(argc); 759 __ SmiTag(argc);
760 } 760 }
761 __ Push(r4, argc); 761 __ Push(r4, argc);
762 __ InvokeBuiltin(Context::STACK_OVERFLOW_BUILTIN_INDEX, CALL_FUNCTION); 762 __ CallRuntime(Runtime::kThrowStackOverflow, 0);
763 763
764 __ bind(&okay); 764 __ bind(&okay);
765 } 765 }
766 766
767 767
768 static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm, 768 static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
769 bool is_construct) { 769 bool is_construct) {
770 // Called from Generate_JS_Entry 770 // Called from Generate_JS_Entry
771 // r3: code entry 771 // r3: code entry
772 // r4: function 772 // r4: function
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 // Load frame size (word) from the BytecodeArray object. 901 // Load frame size (word) from the BytecodeArray object.
902 __ lwz(r5, FieldMemOperand(kInterpreterBytecodeArrayRegister, 902 __ lwz(r5, FieldMemOperand(kInterpreterBytecodeArrayRegister,
903 BytecodeArray::kFrameSizeOffset)); 903 BytecodeArray::kFrameSizeOffset));
904 904
905 // Do a stack check to ensure we don't go over the limit. 905 // Do a stack check to ensure we don't go over the limit.
906 Label ok; 906 Label ok;
907 __ sub(r6, sp, r5); 907 __ sub(r6, sp, r5);
908 __ LoadRoot(r0, Heap::kRealStackLimitRootIndex); 908 __ LoadRoot(r0, Heap::kRealStackLimitRootIndex);
909 __ cmpl(r6, r0); 909 __ cmpl(r6, r0);
910 __ bge(&ok); 910 __ bge(&ok);
911 __ InvokeBuiltin(Context::STACK_OVERFLOW_BUILTIN_INDEX, CALL_FUNCTION); 911 __ CallRuntime(Runtime::kThrowStackOverflow, 0);
912 __ bind(&ok); 912 __ bind(&ok);
913 913
914 // If ok, push undefined as the initial value for all register file entries. 914 // If ok, push undefined as the initial value for all register file entries.
915 // TODO(rmcilroy): Consider doing more than one push per loop iteration. 915 // TODO(rmcilroy): Consider doing more than one push per loop iteration.
916 Label loop, no_args; 916 Label loop, no_args;
917 __ LoadRoot(r6, Heap::kUndefinedValueRootIndex); 917 __ LoadRoot(r6, Heap::kUndefinedValueRootIndex);
918 __ ShiftRightImm(r5, r5, Operand(kPointerSizeLog2), SetRC); 918 __ ShiftRightImm(r5, r5, Operand(kPointerSizeLog2), SetRC);
919 __ beq(&no_args, cr0); 919 __ beq(&no_args, cr0);
920 __ mtctr(r5); 920 __ mtctr(r5);
921 __ bind(&loop); 921 __ bind(&loop);
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
1819 // ------------------------------------------- 1819 // -------------------------------------------
1820 // Dont adapt arguments. 1820 // Dont adapt arguments.
1821 // ------------------------------------------- 1821 // -------------------------------------------
1822 __ bind(&dont_adapt_arguments); 1822 __ bind(&dont_adapt_arguments);
1823 __ JumpToJSEntry(ip); 1823 __ JumpToJSEntry(ip);
1824 1824
1825 __ bind(&stack_overflow); 1825 __ bind(&stack_overflow);
1826 { 1826 {
1827 FrameScope frame(masm, StackFrame::MANUAL); 1827 FrameScope frame(masm, StackFrame::MANUAL);
1828 EnterArgumentsAdaptorFrame(masm); 1828 EnterArgumentsAdaptorFrame(masm);
1829 __ InvokeBuiltin(Context::STACK_OVERFLOW_BUILTIN_INDEX, CALL_FUNCTION); 1829 __ CallRuntime(Runtime::kThrowStackOverflow, 0);
1830 __ bkpt(0); 1830 __ bkpt(0);
1831 } 1831 }
1832 } 1832 }
1833 1833
1834 1834
1835 #undef __ 1835 #undef __
1836 } // namespace internal 1836 } // namespace internal
1837 } // namespace v8 1837 } // namespace v8
1838 1838
1839 #endif // V8_TARGET_ARCH_PPC 1839 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/full-codegen/ppc/full-codegen-ppc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698