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

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

Issue 2019393002: VectorICs: Remove special code to increment call counts by two. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/mips/code-stubs-mips.cc ('k') | src/type-feedback-vector.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/api-arguments.h" 8 #include "src/api-arguments.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 2089 matching lines...) Expand 10 before | Expand all | Expand 10 after
2100 // a4 - allocation site (loaded from vector[slot]) 2100 // a4 - allocation site (loaded from vector[slot])
2101 __ LoadNativeContextSlot(Context::ARRAY_FUNCTION_INDEX, at); 2101 __ LoadNativeContextSlot(Context::ARRAY_FUNCTION_INDEX, at);
2102 __ Branch(miss, ne, a1, Operand(at)); 2102 __ Branch(miss, ne, a1, Operand(at));
2103 2103
2104 __ li(a0, Operand(arg_count())); 2104 __ li(a0, Operand(arg_count()));
2105 2105
2106 // Increment the call count for monomorphic function calls. 2106 // Increment the call count for monomorphic function calls.
2107 __ dsrl(t0, a3, 32 - kPointerSizeLog2); 2107 __ dsrl(t0, a3, 32 - kPointerSizeLog2);
2108 __ Daddu(a3, a2, Operand(t0)); 2108 __ Daddu(a3, a2, Operand(t0));
2109 __ ld(t0, FieldMemOperand(a3, FixedArray::kHeaderSize + kPointerSize)); 2109 __ ld(t0, FieldMemOperand(a3, FixedArray::kHeaderSize + kPointerSize));
2110 __ Daddu(t0, t0, Operand(Smi::FromInt(CallICNexus::kCallCountIncrement))); 2110 __ Daddu(t0, t0, Operand(Smi::FromInt(1)));
2111 __ sd(t0, FieldMemOperand(a3, FixedArray::kHeaderSize + kPointerSize)); 2111 __ sd(t0, FieldMemOperand(a3, FixedArray::kHeaderSize + kPointerSize));
2112 2112
2113 __ mov(a2, a4); 2113 __ mov(a2, a4);
2114 __ mov(a3, a1); 2114 __ mov(a3, a1);
2115 ArrayConstructorStub stub(masm->isolate(), arg_count()); 2115 ArrayConstructorStub stub(masm->isolate(), arg_count());
2116 __ TailCallStub(&stub); 2116 __ TailCallStub(&stub);
2117 } 2117 }
2118 2118
2119 2119
2120 void CallICStub::Generate(MacroAssembler* masm) { 2120 void CallICStub::Generate(MacroAssembler* masm) {
(...skipping 27 matching lines...) Expand all
2148 __ Branch(&extra_checks_or_miss, ne, a1, Operand(a5)); 2148 __ Branch(&extra_checks_or_miss, ne, a1, Operand(a5));
2149 2149
2150 // The compare above could have been a SMI/SMI comparison. Guard against this 2150 // The compare above could have been a SMI/SMI comparison. Guard against this
2151 // convincing us that we have a monomorphic JSFunction. 2151 // convincing us that we have a monomorphic JSFunction.
2152 __ JumpIfSmi(a1, &extra_checks_or_miss); 2152 __ JumpIfSmi(a1, &extra_checks_or_miss);
2153 2153
2154 // Increment the call count for monomorphic function calls. 2154 // Increment the call count for monomorphic function calls.
2155 __ dsrl(t0, a3, 32 - kPointerSizeLog2); 2155 __ dsrl(t0, a3, 32 - kPointerSizeLog2);
2156 __ Daddu(a3, a2, Operand(t0)); 2156 __ Daddu(a3, a2, Operand(t0));
2157 __ ld(t0, FieldMemOperand(a3, FixedArray::kHeaderSize + kPointerSize)); 2157 __ ld(t0, FieldMemOperand(a3, FixedArray::kHeaderSize + kPointerSize));
2158 __ Daddu(t0, t0, Operand(Smi::FromInt(CallICNexus::kCallCountIncrement))); 2158 __ Daddu(t0, t0, Operand(Smi::FromInt(1)));
2159 __ sd(t0, FieldMemOperand(a3, FixedArray::kHeaderSize + kPointerSize)); 2159 __ sd(t0, FieldMemOperand(a3, FixedArray::kHeaderSize + kPointerSize));
2160 2160
2161 __ bind(&call_function); 2161 __ bind(&call_function);
2162 __ Jump(masm->isolate()->builtins()->CallFunction(convert_mode(), 2162 __ Jump(masm->isolate()->builtins()->CallFunction(convert_mode(),
2163 tail_call_mode()), 2163 tail_call_mode()),
2164 RelocInfo::CODE_TARGET, al, zero_reg, Operand(zero_reg), 2164 RelocInfo::CODE_TARGET, al, zero_reg, Operand(zero_reg),
2165 USE_DELAY_SLOT); 2165 USE_DELAY_SLOT);
2166 __ li(a0, Operand(argc)); // In delay slot. 2166 __ li(a0, Operand(argc)); // In delay slot.
2167 2167
2168 __ bind(&extra_checks_or_miss); 2168 __ bind(&extra_checks_or_miss);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
2221 2221
2222 // Make sure the function belongs to the same native context. 2222 // Make sure the function belongs to the same native context.
2223 __ ld(t0, FieldMemOperand(a1, JSFunction::kContextOffset)); 2223 __ ld(t0, FieldMemOperand(a1, JSFunction::kContextOffset));
2224 __ ld(t0, ContextMemOperand(t0, Context::NATIVE_CONTEXT_INDEX)); 2224 __ ld(t0, ContextMemOperand(t0, Context::NATIVE_CONTEXT_INDEX));
2225 __ ld(t1, NativeContextMemOperand()); 2225 __ ld(t1, NativeContextMemOperand());
2226 __ Branch(&miss, ne, t0, Operand(t1)); 2226 __ Branch(&miss, ne, t0, Operand(t1));
2227 2227
2228 // Initialize the call counter. 2228 // Initialize the call counter.
2229 __ dsrl(at, a3, 32 - kPointerSizeLog2); 2229 __ dsrl(at, a3, 32 - kPointerSizeLog2);
2230 __ Daddu(at, a2, Operand(at)); 2230 __ Daddu(at, a2, Operand(at));
2231 __ li(t0, Operand(Smi::FromInt(CallICNexus::kCallCountIncrement))); 2231 __ li(t0, Operand(Smi::FromInt(1)));
2232 __ sd(t0, FieldMemOperand(at, FixedArray::kHeaderSize + kPointerSize)); 2232 __ sd(t0, FieldMemOperand(at, FixedArray::kHeaderSize + kPointerSize));
2233 2233
2234 // Store the function. Use a stub since we need a frame for allocation. 2234 // Store the function. Use a stub since we need a frame for allocation.
2235 // a2 - vector 2235 // a2 - vector
2236 // a3 - slot 2236 // a3 - slot
2237 // a1 - function 2237 // a1 - function
2238 { 2238 {
2239 FrameScope scope(masm, StackFrame::INTERNAL); 2239 FrameScope scope(masm, StackFrame::INTERNAL);
2240 CreateWeakCellStub create_stub(masm->isolate()); 2240 CreateWeakCellStub create_stub(masm->isolate());
2241 __ Push(a1); 2241 __ Push(a1);
(...skipping 3417 matching lines...) Expand 10 before | Expand all | Expand 10 after
5659 kStackUnwindSpace, kInvalidStackOffset, 5659 kStackUnwindSpace, kInvalidStackOffset,
5660 return_value_operand, NULL); 5660 return_value_operand, NULL);
5661 } 5661 }
5662 5662
5663 #undef __ 5663 #undef __
5664 5664
5665 } // namespace internal 5665 } // namespace internal
5666 } // namespace v8 5666 } // namespace v8
5667 5667
5668 #endif // V8_TARGET_ARCH_MIPS64 5668 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/type-feedback-vector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698