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

Side by Side Diff: src/mips/code-stubs-mips.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/ic/x64/ic-x64.cc ('k') | src/mips/debug-mips.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 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_MIPS 7 #if V8_TARGET_ARCH_MIPS
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 1925 matching lines...) Expand 10 before | Expand all | Expand 10 after
1936 Register key = LoadDescriptor::NameRegister(); 1936 Register key = LoadDescriptor::NameRegister();
1937 1937
1938 // Check that the key is an array index, that is Uint32. 1938 // Check that the key is an array index, that is Uint32.
1939 __ And(t0, key, Operand(kSmiTagMask | kSmiSignMask)); 1939 __ And(t0, key, Operand(kSmiTagMask | kSmiSignMask));
1940 __ Branch(&slow, ne, t0, Operand(zero_reg)); 1940 __ Branch(&slow, ne, t0, Operand(zero_reg));
1941 1941
1942 // Everything is fine, call runtime. 1942 // Everything is fine, call runtime.
1943 __ Push(receiver, key); // Receiver, key. 1943 __ Push(receiver, key); // Receiver, key.
1944 1944
1945 // Perform tail call to the entry. 1945 // Perform tail call to the entry.
1946 __ TailCallExternalReference( 1946 __ TailCallRuntime(Runtime::kLoadElementWithInterceptor, 2, 1);
1947 ExternalReference(IC_Utility(IC::kLoadElementWithInterceptor),
1948 masm->isolate()),
1949 2, 1);
1950 1947
1951 __ bind(&slow); 1948 __ bind(&slow);
1952 PropertyAccessCompiler::TailCallBuiltin( 1949 PropertyAccessCompiler::TailCallBuiltin(
1953 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC)); 1950 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC));
1954 } 1951 }
1955 1952
1956 1953
1957 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) { 1954 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) {
1958 // sp[0] : number of parameters 1955 // sp[0] : number of parameters
1959 // sp[4] : receiver displacement 1956 // sp[4] : receiver displacement
(...skipping 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after
3035 } 3032 }
3036 3033
3037 3034
3038 void CallICStub::GenerateMiss(MacroAssembler* masm) { 3035 void CallICStub::GenerateMiss(MacroAssembler* masm) {
3039 FrameScope scope(masm, StackFrame::INTERNAL); 3036 FrameScope scope(masm, StackFrame::INTERNAL);
3040 3037
3041 // Push the receiver and the function and feedback info. 3038 // Push the receiver and the function and feedback info.
3042 __ Push(a1, a2, a3); 3039 __ Push(a1, a2, a3);
3043 3040
3044 // Call the entry. 3041 // Call the entry.
3045 IC::UtilityId id = GetICState() == DEFAULT ? IC::kCallIC_Miss 3042 Runtime::FunctionId id = GetICState() == DEFAULT
3046 : IC::kCallIC_Customization_Miss; 3043 ? Runtime::kCallIC_Miss
3047 3044 : Runtime::kCallIC_Customization_Miss;
3048 ExternalReference miss = ExternalReference(IC_Utility(id), masm->isolate()); 3045 __ CallRuntime(id, 3);
3049 __ CallExternalReference(miss, 3);
3050 3046
3051 // Move result to a1 and exit the internal frame. 3047 // Move result to a1 and exit the internal frame.
3052 __ mov(a1, v0); 3048 __ mov(a1, v0);
3053 } 3049 }
3054 3050
3055 3051
3056 // StringCharCodeAtGenerator. 3052 // StringCharCodeAtGenerator.
3057 void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) { 3053 void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) {
3058 DCHECK(!t0.is(index_)); 3054 DCHECK(!t0.is(index_));
3059 DCHECK(!t0.is(result_)); 3055 DCHECK(!t0.is(result_));
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after
4001 __ subu(v0, a0, a1); 3997 __ subu(v0, a0, a1);
4002 3998
4003 __ bind(&miss); 3999 __ bind(&miss);
4004 GenerateMiss(masm); 4000 GenerateMiss(masm);
4005 } 4001 }
4006 4002
4007 4003
4008 void CompareICStub::GenerateMiss(MacroAssembler* masm) { 4004 void CompareICStub::GenerateMiss(MacroAssembler* masm) {
4009 { 4005 {
4010 // Call the runtime system in a fresh internal frame. 4006 // Call the runtime system in a fresh internal frame.
4011 ExternalReference miss =
4012 ExternalReference(IC_Utility(IC::kCompareIC_Miss), isolate());
4013 FrameScope scope(masm, StackFrame::INTERNAL); 4007 FrameScope scope(masm, StackFrame::INTERNAL);
4014 __ Push(a1, a0); 4008 __ Push(a1, a0);
4015 __ Push(ra, a1, a0); 4009 __ Push(ra, a1, a0);
4016 __ li(t0, Operand(Smi::FromInt(op()))); 4010 __ li(t0, Operand(Smi::FromInt(op())));
4017 __ addiu(sp, sp, -kPointerSize); 4011 __ addiu(sp, sp, -kPointerSize);
4018 __ CallExternalReference(miss, 3, USE_DELAY_SLOT); 4012 __ CallRuntime(Runtime::kCompareIC_Miss, 3, kDontSaveFPRegs,
4013 USE_DELAY_SLOT);
4019 __ sw(t0, MemOperand(sp)); // In the delay slot. 4014 __ sw(t0, MemOperand(sp)); // In the delay slot.
4020 // Compute the entry point of the rewritten stub. 4015 // Compute the entry point of the rewritten stub.
4021 __ Addu(a2, v0, Operand(Code::kHeaderSize - kHeapObjectTag)); 4016 __ Addu(a2, v0, Operand(Code::kHeaderSize - kHeapObjectTag));
4022 // Restore registers. 4017 // Restore registers.
4023 __ Pop(a1, a0, ra); 4018 __ Pop(a1, a0, ra);
4024 } 4019 }
4025 __ Jump(a2); 4020 __ Jump(a2);
4026 } 4021 }
4027 4022
4028 4023
(...skipping 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after
5579 MemOperand(fp, 6 * kPointerSize), NULL); 5574 MemOperand(fp, 6 * kPointerSize), NULL);
5580 } 5575 }
5581 5576
5582 5577
5583 #undef __ 5578 #undef __
5584 5579
5585 } // namespace internal 5580 } // namespace internal
5586 } // namespace v8 5581 } // namespace v8
5587 5582
5588 #endif // V8_TARGET_ARCH_MIPS 5583 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic/x64/ic-x64.cc ('k') | src/mips/debug-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698