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

Side by Side Diff: src/ppc/code-stubs-ppc.cc

Issue 1466943002: PPC: [runtime] Introduce a proper %NewArray runtime entry. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | 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/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 5035 matching lines...) Expand 10 before | Expand all | Expand 10 after
5046 __ LoadP(r6, FieldMemOperand(r5, AllocationSite::kTransitionInfoOffset)); 5046 __ LoadP(r6, FieldMemOperand(r5, AllocationSite::kTransitionInfoOffset));
5047 __ SmiUntag(r6); 5047 __ SmiUntag(r6);
5048 STATIC_ASSERT(AllocationSite::ElementsKindBits::kShift == 0); 5048 STATIC_ASSERT(AllocationSite::ElementsKindBits::kShift == 0);
5049 __ And(r6, r6, Operand(AllocationSite::ElementsKindBits::kMask)); 5049 __ And(r6, r6, Operand(AllocationSite::ElementsKindBits::kMask));
5050 GenerateDispatchToArrayStub(masm, DONT_OVERRIDE); 5050 GenerateDispatchToArrayStub(masm, DONT_OVERRIDE);
5051 5051
5052 __ bind(&no_info); 5052 __ bind(&no_info);
5053 GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES); 5053 GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES);
5054 5054
5055 __ bind(&subclassing); 5055 __ bind(&subclassing);
5056 __ push(r4);
5057 __ push(r6);
5058
5059 // Adjust argc.
5060 switch (argument_count()) { 5056 switch (argument_count()) {
5061 case ANY: 5057 case ANY:
5062 case MORE_THAN_ONE: 5058 case MORE_THAN_ONE:
5063 __ addi(r3, r3, Operand(2)); 5059 __ ShiftLeftImm(r0, r3, Operand(kPointerSizeLog2));
5060 __ StorePX(r4, MemOperand(sp, r0));
5061 __ addi(r3, r3, Operand(3));
5064 break; 5062 break;
5065 case NONE: 5063 case NONE:
5066 __ li(r3, Operand(2)); 5064 __ StoreP(r4, MemOperand(sp, 0 * kPointerSize));
5065 __ li(r3, Operand(3));
5067 break; 5066 break;
5068 case ONE: 5067 case ONE:
5069 __ li(r3, Operand(3)); 5068 __ StoreP(r4, MemOperand(sp, 1 * kPointerSize));
5069 __ li(r3, Operand(4));
5070 break; 5070 break;
5071 } 5071 }
5072 5072
5073 __ JumpToExternalReference( 5073 __ Push(r6, r5);
5074 ExternalReference(Runtime::kArrayConstructorWithSubclassing, isolate())); 5074 __ JumpToExternalReference(ExternalReference(Runtime::kNewArray, isolate()));
5075 } 5075 }
5076 5076
5077 5077
5078 void InternalArrayConstructorStub::GenerateCase(MacroAssembler* masm, 5078 void InternalArrayConstructorStub::GenerateCase(MacroAssembler* masm,
5079 ElementsKind kind) { 5079 ElementsKind kind) {
5080 __ cmpli(r3, Operand(1)); 5080 __ cmpli(r3, Operand(1));
5081 5081
5082 InternalArrayNoArgumentConstructorStub stub0(isolate(), kind); 5082 InternalArrayNoArgumentConstructorStub stub0(isolate(), kind);
5083 __ TailCallStub(&stub0, lt); 5083 __ TailCallStub(&stub0, lt);
5084 5084
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
5662 kStackUnwindSpace, NULL, 5662 kStackUnwindSpace, NULL,
5663 MemOperand(fp, 6 * kPointerSize), NULL); 5663 MemOperand(fp, 6 * kPointerSize), NULL);
5664 } 5664 }
5665 5665
5666 5666
5667 #undef __ 5667 #undef __
5668 } // namespace internal 5668 } // namespace internal
5669 } // namespace v8 5669 } // namespace v8
5670 5670
5671 #endif // V8_TARGET_ARCH_PPC 5671 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698