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

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

Issue 1132513007: PPC: Now that vector ics are established for load, keyed load and call ics, let's remove dead code … (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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/ic/ppc/ic-ppc.cc ('k') | src/ppc/debug-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/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 __ Ret(HasArgsInRegisters() ? 0 : 2); 1567 __ Ret(HasArgsInRegisters() ? 0 : 2);
1568 } 1568 }
1569 } 1569 }
1570 1570
1571 1571
1572 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { 1572 void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
1573 Label miss; 1573 Label miss;
1574 Register receiver = LoadDescriptor::ReceiverRegister(); 1574 Register receiver = LoadDescriptor::ReceiverRegister();
1575 // Ensure that the vector and slot registers won't be clobbered before 1575 // Ensure that the vector and slot registers won't be clobbered before
1576 // calling the miss handler. 1576 // calling the miss handler.
1577 DCHECK(!FLAG_vector_ics || 1577 DCHECK(!AreAliased(r7, r8, VectorLoadICDescriptor::VectorRegister(),
1578 !AreAliased(r7, r8, VectorLoadICDescriptor::VectorRegister(),
1579 VectorLoadICDescriptor::SlotRegister())); 1578 VectorLoadICDescriptor::SlotRegister()));
1580 1579
1581 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, r7, 1580 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, r7,
1582 r8, &miss); 1581 r8, &miss);
1583 __ bind(&miss); 1582 __ bind(&miss);
1584 PropertyAccessCompiler::TailCallBuiltin( 1583 PropertyAccessCompiler::TailCallBuiltin(
1585 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); 1584 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC));
1586 } 1585 }
1587 1586
1588 1587
1589 void LoadIndexedStringStub::Generate(MacroAssembler* masm) { 1588 void LoadIndexedStringStub::Generate(MacroAssembler* masm) {
1590 // Return address is in lr. 1589 // Return address is in lr.
1591 Label miss; 1590 Label miss;
1592 1591
1593 Register receiver = LoadDescriptor::ReceiverRegister(); 1592 Register receiver = LoadDescriptor::ReceiverRegister();
1594 Register index = LoadDescriptor::NameRegister(); 1593 Register index = LoadDescriptor::NameRegister();
1595 Register scratch = r8; 1594 Register scratch = r8;
1596 Register result = r3; 1595 Register result = r3;
1597 DCHECK(!scratch.is(receiver) && !scratch.is(index)); 1596 DCHECK(!scratch.is(receiver) && !scratch.is(index));
1598 DCHECK(!FLAG_vector_ics || 1597 DCHECK(!scratch.is(VectorLoadICDescriptor::VectorRegister()) &&
1599 (!scratch.is(VectorLoadICDescriptor::VectorRegister()) && 1598 result.is(VectorLoadICDescriptor::SlotRegister()));
1600 result.is(VectorLoadICDescriptor::SlotRegister())));
1601 1599
1602 // StringCharAtGenerator doesn't use the result register until it's passed 1600 // StringCharAtGenerator doesn't use the result register until it's passed
1603 // the different miss possibilities. If it did, we would have a conflict 1601 // the different miss possibilities. If it did, we would have a conflict
1604 // when FLAG_vector_ics is true. 1602 // when FLAG_vector_ics is true.
1605 StringCharAtGenerator char_at_generator(receiver, index, scratch, result, 1603 StringCharAtGenerator char_at_generator(receiver, index, scratch, result,
1606 &miss, // When not a string. 1604 &miss, // When not a string.
1607 &miss, // When not a number. 1605 &miss, // When not a number.
1608 &miss, // When index out of range. 1606 &miss, // When index out of range.
1609 STRING_INDEX_IS_ARRAY_INDEX, 1607 STRING_INDEX_IS_ARRAY_INDEX,
1610 RECEIVER_IS_STRING); 1608 RECEIVER_IS_STRING);
(...skipping 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after
3118 MacroAssembler* masm, EmbedMode embed_mode, 3116 MacroAssembler* masm, EmbedMode embed_mode,
3119 const RuntimeCallHelper& call_helper) { 3117 const RuntimeCallHelper& call_helper) {
3120 __ Abort(kUnexpectedFallthroughToCharCodeAtSlowCase); 3118 __ Abort(kUnexpectedFallthroughToCharCodeAtSlowCase);
3121 3119
3122 // Index is not a smi. 3120 // Index is not a smi.
3123 __ bind(&index_not_smi_); 3121 __ bind(&index_not_smi_);
3124 // If index is a heap number, try converting it to an integer. 3122 // If index is a heap number, try converting it to an integer.
3125 __ CheckMap(index_, result_, Heap::kHeapNumberMapRootIndex, index_not_number_, 3123 __ CheckMap(index_, result_, Heap::kHeapNumberMapRootIndex, index_not_number_,
3126 DONT_DO_SMI_CHECK); 3124 DONT_DO_SMI_CHECK);
3127 call_helper.BeforeCall(masm); 3125 call_helper.BeforeCall(masm);
3128 if (FLAG_vector_ics && embed_mode == PART_OF_IC_HANDLER) { 3126 if (embed_mode == PART_OF_IC_HANDLER) {
3129 __ Push(VectorLoadICDescriptor::VectorRegister(), 3127 __ Push(VectorLoadICDescriptor::VectorRegister(),
3130 VectorLoadICDescriptor::SlotRegister(), object_, index_); 3128 VectorLoadICDescriptor::SlotRegister(), object_, index_);
3131 } else { 3129 } else {
3132 // index_ is consumed by runtime conversion function. 3130 // index_ is consumed by runtime conversion function.
3133 __ Push(object_, index_); 3131 __ Push(object_, index_);
3134 } 3132 }
3135 if (index_flags_ == STRING_INDEX_IS_NUMBER) { 3133 if (index_flags_ == STRING_INDEX_IS_NUMBER) {
3136 __ CallRuntime(Runtime::kNumberToIntegerMapMinusZero, 1); 3134 __ CallRuntime(Runtime::kNumberToIntegerMapMinusZero, 1);
3137 } else { 3135 } else {
3138 DCHECK(index_flags_ == STRING_INDEX_IS_ARRAY_INDEX); 3136 DCHECK(index_flags_ == STRING_INDEX_IS_ARRAY_INDEX);
3139 // NumberToSmi discards numbers that are not exact integers. 3137 // NumberToSmi discards numbers that are not exact integers.
3140 __ CallRuntime(Runtime::kNumberToSmi, 1); 3138 __ CallRuntime(Runtime::kNumberToSmi, 1);
3141 } 3139 }
3142 // Save the conversion result before the pop instructions below 3140 // Save the conversion result before the pop instructions below
3143 // have a chance to overwrite it. 3141 // have a chance to overwrite it.
3144 __ Move(index_, r3); 3142 __ Move(index_, r3);
3145 if (FLAG_vector_ics && embed_mode == PART_OF_IC_HANDLER) { 3143 if (embed_mode == PART_OF_IC_HANDLER) {
3146 __ Pop(VectorLoadICDescriptor::VectorRegister(), 3144 __ Pop(VectorLoadICDescriptor::VectorRegister(),
3147 VectorLoadICDescriptor::SlotRegister(), object_); 3145 VectorLoadICDescriptor::SlotRegister(), object_);
3148 } else { 3146 } else {
3149 __ pop(object_); 3147 __ pop(object_);
3150 } 3148 }
3151 // Reload the instance type. 3149 // Reload the instance type.
3152 __ LoadP(result_, FieldMemOperand(object_, HeapObject::kMapOffset)); 3150 __ LoadP(result_, FieldMemOperand(object_, HeapObject::kMapOffset));
3153 __ lbz(result_, FieldMemOperand(result_, Map::kInstanceTypeOffset)); 3151 __ lbz(result_, FieldMemOperand(result_, Map::kInstanceTypeOffset));
3154 call_helper.AfterCall(masm); 3152 call_helper.AfterCall(masm);
3155 // If index is still not a smi, it must be out of range. 3153 // If index is still not a smi, it must be out of range.
(...skipping 2451 matching lines...) Expand 10 before | Expand all | Expand 10 after
5607 kStackUnwindSpace, NULL, 5605 kStackUnwindSpace, NULL,
5608 MemOperand(fp, 6 * kPointerSize), NULL); 5606 MemOperand(fp, 6 * kPointerSize), NULL);
5609 } 5607 }
5610 5608
5611 5609
5612 #undef __ 5610 #undef __
5613 } 5611 }
5614 } // namespace v8::internal 5612 } // namespace v8::internal
5615 5613
5616 #endif // V8_TARGET_ARCH_PPC 5614 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/ic/ppc/ic-ppc.cc ('k') | src/ppc/debug-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698