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

Side by Side Diff: src/mips64/code-stubs-mips64.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/mips/macro-assembler-mips.cc ('k') | src/mips64/debug-mips64.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_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
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 1924 matching lines...) Expand 10 before | Expand all | Expand 10 after
1935 Register key = LoadDescriptor::NameRegister(); 1935 Register key = LoadDescriptor::NameRegister();
1936 1936
1937 // Check that the key is an array index, that is Uint32. 1937 // Check that the key is an array index, that is Uint32.
1938 __ And(t0, key, Operand(kSmiTagMask | kSmiSignMask)); 1938 __ And(t0, key, Operand(kSmiTagMask | kSmiSignMask));
1939 __ Branch(&slow, ne, t0, Operand(zero_reg)); 1939 __ Branch(&slow, ne, t0, Operand(zero_reg));
1940 1940
1941 // Everything is fine, call runtime. 1941 // Everything is fine, call runtime.
1942 __ Push(receiver, key); // Receiver, key. 1942 __ Push(receiver, key); // Receiver, key.
1943 1943
1944 // Perform tail call to the entry. 1944 // Perform tail call to the entry.
1945 __ TailCallExternalReference( 1945 __ TailCallRuntime(Runtime::kLoadElementWithInterceptor, 2, 1);
1946 ExternalReference(IC_Utility(IC::kLoadElementWithInterceptor),
1947 masm->isolate()),
1948 2, 1);
1949 1946
1950 __ bind(&slow); 1947 __ bind(&slow);
1951 PropertyAccessCompiler::TailCallBuiltin( 1948 PropertyAccessCompiler::TailCallBuiltin(
1952 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC)); 1949 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC));
1953 } 1950 }
1954 1951
1955 1952
1956 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) { 1953 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) {
1957 // sp[0] : number of parameters 1954 // sp[0] : number of parameters
1958 // sp[4] : receiver displacement 1955 // sp[4] : receiver displacement
(...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after
3111 } 3108 }
3112 3109
3113 3110
3114 void CallICStub::GenerateMiss(MacroAssembler* masm) { 3111 void CallICStub::GenerateMiss(MacroAssembler* masm) {
3115 FrameScope scope(masm, StackFrame::INTERNAL); 3112 FrameScope scope(masm, StackFrame::INTERNAL);
3116 3113
3117 // Push the receiver and the function and feedback info. 3114 // Push the receiver and the function and feedback info.
3118 __ Push(a1, a2, a3); 3115 __ Push(a1, a2, a3);
3119 3116
3120 // Call the entry. 3117 // Call the entry.
3121 IC::UtilityId id = GetICState() == DEFAULT ? IC::kCallIC_Miss 3118 Runtime::FunctionId id = GetICState() == DEFAULT
3122 : IC::kCallIC_Customization_Miss; 3119 ? Runtime::kCallIC_Miss //
3123 3120 : Runtime::kCallIC_Customization_Miss;
3124 ExternalReference miss = ExternalReference(IC_Utility(id), masm->isolate()); 3121 __ CallRuntime(id, 3);
3125 __ CallExternalReference(miss, 3);
3126 3122
3127 // Move result to a1 and exit the internal frame. 3123 // Move result to a1 and exit the internal frame.
3128 __ mov(a1, v0); 3124 __ mov(a1, v0);
3129 } 3125 }
3130 3126
3131 3127
3132 void StringCharCodeAtGenerator::GenerateSlow( 3128 void StringCharCodeAtGenerator::GenerateSlow(
3133 MacroAssembler* masm, EmbedMode embed_mode, 3129 MacroAssembler* masm, EmbedMode embed_mode,
3134 const RuntimeCallHelper& call_helper) { 3130 const RuntimeCallHelper& call_helper) {
3135 __ Abort(kUnexpectedFallthroughToCharCodeAtSlowCase); 3131 __ Abort(kUnexpectedFallthroughToCharCodeAtSlowCase);
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
4032 __ dsubu(v0, a0, a1); 4028 __ dsubu(v0, a0, a1);
4033 4029
4034 __ bind(&miss); 4030 __ bind(&miss);
4035 GenerateMiss(masm); 4031 GenerateMiss(masm);
4036 } 4032 }
4037 4033
4038 4034
4039 void CompareICStub::GenerateMiss(MacroAssembler* masm) { 4035 void CompareICStub::GenerateMiss(MacroAssembler* masm) {
4040 { 4036 {
4041 // Call the runtime system in a fresh internal frame. 4037 // Call the runtime system in a fresh internal frame.
4042 ExternalReference miss =
4043 ExternalReference(IC_Utility(IC::kCompareIC_Miss), isolate());
4044 FrameScope scope(masm, StackFrame::INTERNAL); 4038 FrameScope scope(masm, StackFrame::INTERNAL);
4045 __ Push(a1, a0); 4039 __ Push(a1, a0);
4046 __ Push(ra, a1, a0); 4040 __ Push(ra, a1, a0);
4047 __ li(a4, Operand(Smi::FromInt(op()))); 4041 __ li(a4, Operand(Smi::FromInt(op())));
4048 __ daddiu(sp, sp, -kPointerSize); 4042 __ daddiu(sp, sp, -kPointerSize);
4049 __ CallExternalReference(miss, 3, USE_DELAY_SLOT); 4043 __ CallRuntime(Runtime::kCompareIC_Miss, 3, kDontSaveFPRegs,
4044 USE_DELAY_SLOT);
4050 __ sd(a4, MemOperand(sp)); // In the delay slot. 4045 __ sd(a4, MemOperand(sp)); // In the delay slot.
4051 // Compute the entry point of the rewritten stub. 4046 // Compute the entry point of the rewritten stub.
4052 __ Daddu(a2, v0, Operand(Code::kHeaderSize - kHeapObjectTag)); 4047 __ Daddu(a2, v0, Operand(Code::kHeaderSize - kHeapObjectTag));
4053 // Restore registers. 4048 // Restore registers.
4054 __ Pop(a1, a0, ra); 4049 __ Pop(a1, a0, ra);
4055 } 4050 }
4056 __ Jump(a2); 4051 __ Jump(a2);
4057 } 4052 }
4058 4053
4059 4054
(...skipping 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after
5610 MemOperand(fp, 6 * kPointerSize), NULL); 5605 MemOperand(fp, 6 * kPointerSize), NULL);
5611 } 5606 }
5612 5607
5613 5608
5614 #undef __ 5609 #undef __
5615 5610
5616 } // namespace internal 5611 } // namespace internal
5617 } // namespace v8 5612 } // namespace v8
5618 5613
5619 #endif // V8_TARGET_ARCH_MIPS64 5614 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | src/mips64/debug-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698