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

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

Issue 2021133002: PPC: 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 | « 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/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/api-arguments.h" 8 #include "src/api-arguments.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 2000 matching lines...) Expand 10 before | Expand all | Expand 10 after
2011 __ cmp(r4, r8); 2011 __ cmp(r4, r8);
2012 __ bne(miss); 2012 __ bne(miss);
2013 2013
2014 __ mov(r3, Operand(arg_count())); 2014 __ mov(r3, Operand(arg_count()));
2015 2015
2016 // Increment the call count for monomorphic function calls. 2016 // Increment the call count for monomorphic function calls.
2017 const int count_offset = FixedArray::kHeaderSize + kPointerSize; 2017 const int count_offset = FixedArray::kHeaderSize + kPointerSize;
2018 __ SmiToPtrArrayOffset(r8, r6); 2018 __ SmiToPtrArrayOffset(r8, r6);
2019 __ add(r5, r5, r8); 2019 __ add(r5, r5, r8);
2020 __ LoadP(r6, FieldMemOperand(r5, count_offset)); 2020 __ LoadP(r6, FieldMemOperand(r5, count_offset));
2021 __ AddSmiLiteral(r6, r6, Smi::FromInt(CallICNexus::kCallCountIncrement), r0); 2021 __ AddSmiLiteral(r6, r6, Smi::FromInt(1), r0);
2022 __ StoreP(r6, FieldMemOperand(r5, count_offset), r0); 2022 __ StoreP(r6, FieldMemOperand(r5, count_offset), r0);
2023 2023
2024 __ mr(r5, r7); 2024 __ mr(r5, r7);
2025 __ mr(r6, r4); 2025 __ mr(r6, r4);
2026 ArrayConstructorStub stub(masm->isolate(), arg_count()); 2026 ArrayConstructorStub stub(masm->isolate(), arg_count());
2027 __ TailCallStub(&stub); 2027 __ TailCallStub(&stub);
2028 } 2028 }
2029 2029
2030 2030
2031 void CallICStub::Generate(MacroAssembler* masm) { 2031 void CallICStub::Generate(MacroAssembler* masm) {
(...skipping 27 matching lines...) Expand all
2059 __ cmp(r4, r8); 2059 __ cmp(r4, r8);
2060 __ bne(&extra_checks_or_miss); 2060 __ bne(&extra_checks_or_miss);
2061 2061
2062 // The compare above could have been a SMI/SMI comparison. Guard against this 2062 // The compare above could have been a SMI/SMI comparison. Guard against this
2063 // convincing us that we have a monomorphic JSFunction. 2063 // convincing us that we have a monomorphic JSFunction.
2064 __ JumpIfSmi(r4, &extra_checks_or_miss); 2064 __ JumpIfSmi(r4, &extra_checks_or_miss);
2065 2065
2066 // Increment the call count for monomorphic function calls. 2066 // Increment the call count for monomorphic function calls.
2067 const int count_offset = FixedArray::kHeaderSize + kPointerSize; 2067 const int count_offset = FixedArray::kHeaderSize + kPointerSize;
2068 __ LoadP(r6, FieldMemOperand(r9, count_offset)); 2068 __ LoadP(r6, FieldMemOperand(r9, count_offset));
2069 __ AddSmiLiteral(r6, r6, Smi::FromInt(CallICNexus::kCallCountIncrement), r0); 2069 __ AddSmiLiteral(r6, r6, Smi::FromInt(1), r0);
2070 __ StoreP(r6, FieldMemOperand(r9, count_offset), r0); 2070 __ StoreP(r6, FieldMemOperand(r9, count_offset), r0);
2071 2071
2072 __ bind(&call_function); 2072 __ bind(&call_function);
2073 __ mov(r3, Operand(argc)); 2073 __ mov(r3, Operand(argc));
2074 __ Jump(masm->isolate()->builtins()->CallFunction(convert_mode(), 2074 __ Jump(masm->isolate()->builtins()->CallFunction(convert_mode(),
2075 tail_call_mode()), 2075 tail_call_mode()),
2076 RelocInfo::CODE_TARGET); 2076 RelocInfo::CODE_TARGET);
2077 2077
2078 __ bind(&extra_checks_or_miss); 2078 __ bind(&extra_checks_or_miss);
2079 Label uninitialized, miss, not_allocation_site; 2079 Label uninitialized, miss, not_allocation_site;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
2129 __ beq(&miss); 2129 __ beq(&miss);
2130 2130
2131 // Make sure the function belongs to the same native context. 2131 // Make sure the function belongs to the same native context.
2132 __ LoadP(r7, FieldMemOperand(r4, JSFunction::kContextOffset)); 2132 __ LoadP(r7, FieldMemOperand(r4, JSFunction::kContextOffset));
2133 __ LoadP(r7, ContextMemOperand(r7, Context::NATIVE_CONTEXT_INDEX)); 2133 __ LoadP(r7, ContextMemOperand(r7, Context::NATIVE_CONTEXT_INDEX));
2134 __ LoadP(ip, NativeContextMemOperand()); 2134 __ LoadP(ip, NativeContextMemOperand());
2135 __ cmp(r7, ip); 2135 __ cmp(r7, ip);
2136 __ bne(&miss); 2136 __ bne(&miss);
2137 2137
2138 // Initialize the call counter. 2138 // Initialize the call counter.
2139 __ LoadSmiLiteral(r8, Smi::FromInt(CallICNexus::kCallCountIncrement)); 2139 __ LoadSmiLiteral(r8, Smi::FromInt(1));
2140 __ StoreP(r8, FieldMemOperand(r9, count_offset), r0); 2140 __ StoreP(r8, FieldMemOperand(r9, count_offset), r0);
2141 2141
2142 // Store the function. Use a stub since we need a frame for allocation. 2142 // Store the function. Use a stub since we need a frame for allocation.
2143 // r5 - vector 2143 // r5 - vector
2144 // r6 - slot 2144 // r6 - slot
2145 // r4 - function 2145 // r4 - function
2146 { 2146 {
2147 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); 2147 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
2148 CreateWeakCellStub create_stub(masm->isolate()); 2148 CreateWeakCellStub create_stub(masm->isolate());
2149 __ Push(r4); 2149 __ Push(r4);
(...skipping 3537 matching lines...) Expand 10 before | Expand all | Expand 10 after
5687 fp, (PropertyCallbackArguments::kReturnValueOffset + 3) * kPointerSize); 5687 fp, (PropertyCallbackArguments::kReturnValueOffset + 3) * kPointerSize);
5688 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, 5688 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref,
5689 kStackUnwindSpace, NULL, return_value_operand, NULL); 5689 kStackUnwindSpace, NULL, return_value_operand, NULL);
5690 } 5690 }
5691 5691
5692 #undef __ 5692 #undef __
5693 } // namespace internal 5693 } // namespace internal
5694 } // namespace v8 5694 } // namespace v8
5695 5695
5696 #endif // V8_TARGET_ARCH_PPC 5696 #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