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

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

Issue 994533004: Contribution of PowerPC port (continuation of 422063005) - uplevel (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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/ppc/assembler-ppc-inl.h ('k') | src/ppc/code-stubs-ppc.cc » ('j') | 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_PPC 7 #if V8_TARGET_ARCH_PPC
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/debug.h" 10 #include "src/debug.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 if (FLAG_debug_code) { 119 if (FLAG_debug_code) {
120 // Initial map for the builtin Array functions should be maps. 120 // Initial map for the builtin Array functions should be maps.
121 __ LoadP(r5, FieldMemOperand(r4, JSFunction::kPrototypeOrInitialMapOffset)); 121 __ LoadP(r5, FieldMemOperand(r4, JSFunction::kPrototypeOrInitialMapOffset));
122 __ TestIfSmi(r5, r0); 122 __ TestIfSmi(r5, r0);
123 __ Assert(ne, kUnexpectedInitialMapForArrayFunction, cr0); 123 __ Assert(ne, kUnexpectedInitialMapForArrayFunction, cr0);
124 __ CompareObjectType(r5, r6, r7, MAP_TYPE); 124 __ CompareObjectType(r5, r6, r7, MAP_TYPE);
125 __ Assert(eq, kUnexpectedInitialMapForArrayFunction); 125 __ Assert(eq, kUnexpectedInitialMapForArrayFunction);
126 } 126 }
127 127
128 __ mr(r6, r4);
128 // Run the native code for the Array function called as a normal function. 129 // Run the native code for the Array function called as a normal function.
129 // tail call a stub 130 // tail call a stub
130 __ LoadRoot(r5, Heap::kUndefinedValueRootIndex); 131 __ LoadRoot(r5, Heap::kUndefinedValueRootIndex);
131 ArrayConstructorStub stub(masm->isolate()); 132 ArrayConstructorStub stub(masm->isolate());
132 __ TailCallStub(&stub); 133 __ TailCallStub(&stub);
133 } 134 }
134 135
135 136
136 void Builtins::Generate_StringConstructCode(MacroAssembler* masm) { 137 void Builtins::Generate_StringConstructCode(MacroAssembler* masm) {
137 // ----------- S t a t e ------------- 138 // ----------- S t a t e -------------
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 GenerateTailCallToReturnedCode(masm); 915 GenerateTailCallToReturnedCode(masm);
915 } 916 }
916 917
917 918
918 static void CallCompileOptimized(MacroAssembler* masm, bool concurrent) { 919 static void CallCompileOptimized(MacroAssembler* masm, bool concurrent) {
919 FrameScope scope(masm, StackFrame::INTERNAL); 920 FrameScope scope(masm, StackFrame::INTERNAL);
920 // Push a copy of the function onto the stack. 921 // Push a copy of the function onto the stack.
921 // Push function as parameter to the runtime call. 922 // Push function as parameter to the runtime call.
922 __ Push(r4, r4); 923 __ Push(r4, r4);
923 // Whether to compile in a background thread. 924 // Whether to compile in a background thread.
924 __ Push(masm->isolate()->factory()->ToBoolean(concurrent)); 925 __ LoadRoot(
926 r0, concurrent ? Heap::kTrueValueRootIndex : Heap::kFalseValueRootIndex);
927 __ push(r0);
925 928
926 __ CallRuntime(Runtime::kCompileOptimized, 2); 929 __ CallRuntime(Runtime::kCompileOptimized, 2);
927 // Restore receiver. 930 // Restore receiver.
928 __ pop(r4); 931 __ pop(r4);
929 } 932 }
930 933
931 934
932 void Builtins::Generate_CompileOptimized(MacroAssembler* masm) { 935 void Builtins::Generate_CompileOptimized(MacroAssembler* masm) {
933 CallCompileOptimized(masm, false); 936 CallCompileOptimized(masm, false);
934 GenerateTailCallToReturnedCode(masm); 937 GenerateTailCallToReturnedCode(masm);
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
1697 __ bkpt(0); 1700 __ bkpt(0);
1698 } 1701 }
1699 } 1702 }
1700 1703
1701 1704
1702 #undef __ 1705 #undef __
1703 } 1706 }
1704 } // namespace v8::internal 1707 } // namespace v8::internal
1705 1708
1706 #endif // V8_TARGET_ARCH_PPC 1709 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/ppc/assembler-ppc-inl.h ('k') | src/ppc/code-stubs-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698