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

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

Issue 1248303002: Unify runtime-style IC functions with Runtime intrinsics (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review feedback Created 5 years, 5 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/arm/macro-assembler-arm.cc ('k') | src/arm64/debug-arm64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 7 #if V8_TARGET_ARCH_ARM64
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 2038 matching lines...) Expand 10 before | Expand all | Expand 10 after
2049 Label slow; 2049 Label slow;
2050 2050
2051 Register receiver = LoadDescriptor::ReceiverRegister(); 2051 Register receiver = LoadDescriptor::ReceiverRegister();
2052 Register key = LoadDescriptor::NameRegister(); 2052 Register key = LoadDescriptor::NameRegister();
2053 2053
2054 // Check that the key is an array index, that is Uint32. 2054 // Check that the key is an array index, that is Uint32.
2055 __ TestAndBranchIfAnySet(key, kSmiTagMask | kSmiSignMask, &slow); 2055 __ TestAndBranchIfAnySet(key, kSmiTagMask | kSmiSignMask, &slow);
2056 2056
2057 // Everything is fine, call runtime. 2057 // Everything is fine, call runtime.
2058 __ Push(receiver, key); 2058 __ Push(receiver, key);
2059 __ TailCallExternalReference( 2059 __ TailCallExternalReference(
Yang 2015/07/23 12:00:49 Maybe use TailCallRuntime instead.
2060 ExternalReference(IC_Utility(IC::kLoadElementWithInterceptor), 2060 ExternalReference(
2061 masm->isolate()), 2061 Runtime::FunctionForId(Runtime::kLoadElementWithInterceptor),
2062 masm->isolate()),
2062 2, 1); 2063 2, 1);
2063 2064
2064 __ Bind(&slow); 2065 __ Bind(&slow);
2065 PropertyAccessCompiler::TailCallBuiltin( 2066 PropertyAccessCompiler::TailCallBuiltin(
2066 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC)); 2067 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC));
2067 } 2068 }
2068 2069
2069 2070
2070 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) { 2071 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) {
2071 // Stack layout on entry. 2072 // Stack layout on entry.
(...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after
3298 3299
3299 void CallICStub::GenerateMiss(MacroAssembler* masm) { 3300 void CallICStub::GenerateMiss(MacroAssembler* masm) {
3300 ASM_LOCATION("CallICStub[Miss]"); 3301 ASM_LOCATION("CallICStub[Miss]");
3301 3302
3302 FrameScope scope(masm, StackFrame::INTERNAL); 3303 FrameScope scope(masm, StackFrame::INTERNAL);
3303 3304
3304 // Push the receiver and the function and feedback info. 3305 // Push the receiver and the function and feedback info.
3305 __ Push(x1, x2, x3); 3306 __ Push(x1, x2, x3);
3306 3307
3307 // Call the entry. 3308 // Call the entry.
3308 IC::UtilityId id = GetICState() == DEFAULT ? IC::kCallIC_Miss 3309 Runtime::FunctionId id = GetICState() == DEFAULT
3309 : IC::kCallIC_Customization_Miss; 3310 ? Runtime::kCallIC_Miss
3311 : Runtime::kCallIC_Customization_Miss;
3310 3312
3311 ExternalReference miss = ExternalReference(IC_Utility(id), masm->isolate()); 3313 ExternalReference miss =
3314 ExternalReference(Runtime::FunctionForId(id), masm->isolate());
3312 __ CallExternalReference(miss, 3); 3315 __ CallExternalReference(miss, 3);
3313 3316
3314 // Move result to edi and exit the internal frame. 3317 // Move result to edi and exit the internal frame.
3315 __ Mov(x1, x0); 3318 __ Mov(x1, x0);
3316 } 3319 }
3317 3320
3318 3321
3319 void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) { 3322 void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) {
3320 // If the receiver is a smi trigger the non-string case. 3323 // If the receiver is a smi trigger the non-string case.
3321 if (check_mode_ == RECEIVER_IS_UNKNOWN) { 3324 if (check_mode_ == RECEIVER_IS_UNKNOWN) {
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
3743 3746
3744 // This method handles the case where a compare stub had the wrong 3747 // This method handles the case where a compare stub had the wrong
3745 // implementation. It calls a miss handler, which re-writes the stub. All other 3748 // implementation. It calls a miss handler, which re-writes the stub. All other
3746 // CompareICStub::Generate* methods should fall back into this one if their 3749 // CompareICStub::Generate* methods should fall back into this one if their
3747 // operands were not the expected types. 3750 // operands were not the expected types.
3748 void CompareICStub::GenerateMiss(MacroAssembler* masm) { 3751 void CompareICStub::GenerateMiss(MacroAssembler* masm) {
3749 ASM_LOCATION("CompareICStub[Miss]"); 3752 ASM_LOCATION("CompareICStub[Miss]");
3750 3753
3751 Register stub_entry = x11; 3754 Register stub_entry = x11;
3752 { 3755 {
3753 ExternalReference miss = 3756 ExternalReference miss = ExternalReference(
3754 ExternalReference(IC_Utility(IC::kCompareIC_Miss), isolate()); 3757 Runtime::FunctionForId(Runtime::kCompareIC_Miss), isolate());
3755 3758
3756 FrameScope scope(masm, StackFrame::INTERNAL); 3759 FrameScope scope(masm, StackFrame::INTERNAL);
3757 Register op = x10; 3760 Register op = x10;
3758 Register left = x1; 3761 Register left = x1;
3759 Register right = x0; 3762 Register right = x0;
3760 // Preserve some caller-saved registers. 3763 // Preserve some caller-saved registers.
3761 __ Push(x1, x0, lr); 3764 __ Push(x1, x0, lr);
3762 // Push the arguments. 3765 // Push the arguments.
3763 __ Mov(op, Smi::FromInt(this->op())); 3766 __ Mov(op, Smi::FromInt(this->op()));
3764 __ Push(left, right, op); 3767 __ Push(left, right, op);
(...skipping 2068 matching lines...) Expand 10 before | Expand all | Expand 10 after
5833 MemOperand(fp, 6 * kPointerSize), NULL); 5836 MemOperand(fp, 6 * kPointerSize), NULL);
5834 } 5837 }
5835 5838
5836 5839
5837 #undef __ 5840 #undef __
5838 5841
5839 } // namespace internal 5842 } // namespace internal
5840 } // namespace v8 5843 } // namespace v8
5841 5844
5842 #endif // V8_TARGET_ARCH_ARM64 5845 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/arm64/debug-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698