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

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

Issue 1402153004: Revert of [Interpreter] Support for operator new. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/mips64/interface-descriptors-mips64.cc ('k') | src/ppc/interface-descriptors-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 #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 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 976
977 977
978 // static 978 // static
979 void Builtins::Generate_InterpreterPushArgsAndCall(MacroAssembler* masm) { 979 void Builtins::Generate_InterpreterPushArgsAndCall(MacroAssembler* masm) {
980 // ----------- S t a t e ------------- 980 // ----------- S t a t e -------------
981 // -- r3 : the number of arguments (not including the receiver) 981 // -- r3 : the number of arguments (not including the receiver)
982 // -- r5 : the address of the first argument to be pushed. Subsequent 982 // -- r5 : the address of the first argument to be pushed. Subsequent
983 // arguments should be consecutive above this, in the same order as 983 // arguments should be consecutive above this, in the same order as
984 // they are to be pushed onto the stack. 984 // they are to be pushed onto the stack.
985 // -- r4 : the target to call (can be any Object). 985 // -- r4 : the target to call (can be any Object).
986 // -----------------------------------
987 986
988 // Calculate number of arguments (add one for receiver). 987 // Calculate number of arguments (add one for receiver).
989 __ addi(r6, r3, Operand(1)); 988 __ addi(r6, r3, Operand(1));
990 989
991 // Push the arguments. 990 // Push the arguments.
992 Label loop; 991 Label loop;
993 __ addi(r5, r5, Operand(kPointerSize)); // Bias up for LoadPU 992 __ addi(r5, r5, Operand(kPointerSize)); // Bias up for LoadPU
994 __ mtctr(r6); 993 __ mtctr(r6);
995 __ bind(&loop); 994 __ bind(&loop);
996 __ LoadPU(r6, MemOperand(r5, -kPointerSize)); 995 __ LoadPU(r6, MemOperand(r5, -kPointerSize));
997 __ push(r6); 996 __ push(r6);
998 __ bdnz(&loop); 997 __ bdnz(&loop);
999 998
1000 // Call the target. 999 // Call the target.
1001 __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); 1000 __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
1002 } 1001 }
1003 1002
1004 1003
1005 // static
1006 void Builtins::Generate_InterpreterPushArgsAndConstruct(MacroAssembler* masm) {
1007 // ----------- S t a t e -------------
1008 // -- r3 : argument count (not including receiver)
1009 // -- r6 : original constructor
1010 // -- r4 : constructor to call
1011 // -- r5 : address of the first argument
1012 // -----------------------------------
1013
1014 // Calculate number of arguments (add one for receiver).
1015 __ mr(r11, r3);
1016
1017 // Push the arguments.
1018 Label loop;
1019 __ addi(r5, r5, Operand(kPointerSize)); // Bias up for LoadPU
1020 __ mtctr(r11);
1021 __ bind(&loop);
1022 __ LoadPU(r11, MemOperand(r5, -kPointerSize));
1023 __ push(r11);
1024 __ bdnz(&loop);
1025
1026 // Call the constructor with r3, r4, and r6 unmodified.
1027 __ Jump(masm->isolate()->builtins()->Constuct(), RelocInfo::CONSTRUCT_CALL);
1028 }
1029
1030
1031 void Builtins::Generate_CompileLazy(MacroAssembler* masm) { 1004 void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
1032 CallRuntimePassFunction(masm, Runtime::kCompileLazy); 1005 CallRuntimePassFunction(masm, Runtime::kCompileLazy);
1033 GenerateTailCallToReturnedCode(masm); 1006 GenerateTailCallToReturnedCode(masm);
1034 } 1007 }
1035 1008
1036 1009
1037 static void CallCompileOptimized(MacroAssembler* masm, bool concurrent) { 1010 static void CallCompileOptimized(MacroAssembler* masm, bool concurrent) {
1038 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); 1011 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
1039 // Push a copy of the function onto the stack. 1012 // Push a copy of the function onto the stack.
1040 // Push function as parameter to the runtime call. 1013 // Push function as parameter to the runtime call.
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after
1948 __ bkpt(0); 1921 __ bkpt(0);
1949 } 1922 }
1950 } 1923 }
1951 1924
1952 1925
1953 #undef __ 1926 #undef __
1954 } // namespace internal 1927 } // namespace internal
1955 } // namespace v8 1928 } // namespace v8
1956 1929
1957 #endif // V8_TARGET_ARCH_PPC 1930 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/mips64/interface-descriptors-mips64.cc ('k') | src/ppc/interface-descriptors-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698