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

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: Make mips work 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 __ TailCallRuntime(Runtime::kLoadElementWithInterceptor, 2, 1);
2060 ExternalReference(IC_Utility(IC::kLoadElementWithInterceptor),
2061 masm->isolate()),
2062 2, 1);
2063 2060
2064 __ Bind(&slow); 2061 __ Bind(&slow);
2065 PropertyAccessCompiler::TailCallBuiltin( 2062 PropertyAccessCompiler::TailCallBuiltin(
2066 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC)); 2063 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC));
2067 } 2064 }
2068 2065
2069 2066
2070 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) { 2067 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) {
2071 // Stack layout on entry. 2068 // Stack layout on entry.
2072 // jssp[0]: number of parameters (tagged) 2069 // jssp[0]: number of parameters (tagged)
(...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after
3298 3295
3299 void CallICStub::GenerateMiss(MacroAssembler* masm) { 3296 void CallICStub::GenerateMiss(MacroAssembler* masm) {
3300 ASM_LOCATION("CallICStub[Miss]"); 3297 ASM_LOCATION("CallICStub[Miss]");
3301 3298
3302 FrameScope scope(masm, StackFrame::INTERNAL); 3299 FrameScope scope(masm, StackFrame::INTERNAL);
3303 3300
3304 // Push the receiver and the function and feedback info. 3301 // Push the receiver and the function and feedback info.
3305 __ Push(x1, x2, x3); 3302 __ Push(x1, x2, x3);
3306 3303
3307 // Call the entry. 3304 // Call the entry.
3308 IC::UtilityId id = GetICState() == DEFAULT ? IC::kCallIC_Miss 3305 Runtime::FunctionId id = GetICState() == DEFAULT
3309 : IC::kCallIC_Customization_Miss; 3306 ? Runtime::kCallIC_Miss
3310 3307 : Runtime::kCallIC_Customization_Miss;
3311 ExternalReference miss = ExternalReference(IC_Utility(id), masm->isolate()); 3308 __ CallRuntime(id, 3);
3312 __ CallExternalReference(miss, 3);
3313 3309
3314 // Move result to edi and exit the internal frame. 3310 // Move result to edi and exit the internal frame.
3315 __ Mov(x1, x0); 3311 __ Mov(x1, x0);
3316 } 3312 }
3317 3313
3318 3314
3319 void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) { 3315 void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) {
3320 // If the receiver is a smi trigger the non-string case. 3316 // If the receiver is a smi trigger the non-string case.
3321 if (check_mode_ == RECEIVER_IS_UNKNOWN) { 3317 if (check_mode_ == RECEIVER_IS_UNKNOWN) {
3322 __ JumpIfSmi(object_, receiver_not_string_); 3318 __ JumpIfSmi(object_, receiver_not_string_);
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
3743 3739
3744 // This method handles the case where a compare stub had the wrong 3740 // 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 3741 // 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 3742 // CompareICStub::Generate* methods should fall back into this one if their
3747 // operands were not the expected types. 3743 // operands were not the expected types.
3748 void CompareICStub::GenerateMiss(MacroAssembler* masm) { 3744 void CompareICStub::GenerateMiss(MacroAssembler* masm) {
3749 ASM_LOCATION("CompareICStub[Miss]"); 3745 ASM_LOCATION("CompareICStub[Miss]");
3750 3746
3751 Register stub_entry = x11; 3747 Register stub_entry = x11;
3752 { 3748 {
3753 ExternalReference miss =
3754 ExternalReference(IC_Utility(IC::kCompareIC_Miss), isolate());
3755
3756 FrameScope scope(masm, StackFrame::INTERNAL); 3749 FrameScope scope(masm, StackFrame::INTERNAL);
3757 Register op = x10; 3750 Register op = x10;
3758 Register left = x1; 3751 Register left = x1;
3759 Register right = x0; 3752 Register right = x0;
3760 // Preserve some caller-saved registers. 3753 // Preserve some caller-saved registers.
3761 __ Push(x1, x0, lr); 3754 __ Push(x1, x0, lr);
3762 // Push the arguments. 3755 // Push the arguments.
3763 __ Mov(op, Smi::FromInt(this->op())); 3756 __ Mov(op, Smi::FromInt(this->op()));
3764 __ Push(left, right, op); 3757 __ Push(left, right, op);
3765 3758
3766 // Call the miss handler. This also pops the arguments. 3759 // Call the miss handler. This also pops the arguments.
3767 __ CallExternalReference(miss, 3); 3760 __ CallRuntime(Runtime::kCompareIC_Miss, 3);
3768 3761
3769 // Compute the entry point of the rewritten stub. 3762 // Compute the entry point of the rewritten stub.
3770 __ Add(stub_entry, x0, Code::kHeaderSize - kHeapObjectTag); 3763 __ Add(stub_entry, x0, Code::kHeaderSize - kHeapObjectTag);
3771 // Restore caller-saved registers. 3764 // Restore caller-saved registers.
3772 __ Pop(lr, x0, x1); 3765 __ Pop(lr, x0, x1);
3773 } 3766 }
3774 3767
3775 // Tail-call to the new stub. 3768 // Tail-call to the new stub.
3776 __ Jump(stub_entry); 3769 __ Jump(stub_entry);
3777 } 3770 }
(...skipping 2055 matching lines...) Expand 10 before | Expand all | Expand 10 after
5833 MemOperand(fp, 6 * kPointerSize), NULL); 5826 MemOperand(fp, 6 * kPointerSize), NULL);
5834 } 5827 }
5835 5828
5836 5829
5837 #undef __ 5830 #undef __
5838 5831
5839 } // namespace internal 5832 } // namespace internal
5840 } // namespace v8 5833 } // namespace v8
5841 5834
5842 #endif // V8_TARGET_ARCH_ARM64 5835 #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