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

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

Issue 881533004: MIPS: Use weak cell to embed known map in CompareIC (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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/code-stubs-mips.cc ('k') | 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 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 3877 matching lines...) Expand 10 before | Expand all | Expand 10 after
3888 __ Ret(USE_DELAY_SLOT); 3888 __ Ret(USE_DELAY_SLOT);
3889 __ dsubu(v0, a0, a1); 3889 __ dsubu(v0, a0, a1);
3890 3890
3891 __ bind(&miss); 3891 __ bind(&miss);
3892 GenerateMiss(masm); 3892 GenerateMiss(masm);
3893 } 3893 }
3894 3894
3895 3895
3896 void CompareICStub::GenerateKnownObjects(MacroAssembler* masm) { 3896 void CompareICStub::GenerateKnownObjects(MacroAssembler* masm) {
3897 Label miss; 3897 Label miss;
3898 Handle<WeakCell> cell = Map::WeakCellForMap(known_map_);
3898 __ And(a2, a1, a0); 3899 __ And(a2, a1, a0);
3899 __ JumpIfSmi(a2, &miss); 3900 __ JumpIfSmi(a2, &miss);
3901 __ GetWeakValue(a4, cell);
3900 __ ld(a2, FieldMemOperand(a0, HeapObject::kMapOffset)); 3902 __ ld(a2, FieldMemOperand(a0, HeapObject::kMapOffset));
3901 __ ld(a3, FieldMemOperand(a1, HeapObject::kMapOffset)); 3903 __ ld(a3, FieldMemOperand(a1, HeapObject::kMapOffset));
3902 __ Branch(&miss, ne, a2, Operand(known_map_)); 3904 __ Branch(&miss, ne, a2, Operand(a4));
3903 __ Branch(&miss, ne, a3, Operand(known_map_)); 3905 __ Branch(&miss, ne, a3, Operand(a4));
3904 3906
3905 __ Ret(USE_DELAY_SLOT); 3907 __ Ret(USE_DELAY_SLOT);
3906 __ dsubu(v0, a0, a1); 3908 __ dsubu(v0, a0, a1);
3907 3909
3908 __ bind(&miss); 3910 __ bind(&miss);
3909 GenerateMiss(masm); 3911 GenerateMiss(masm);
3910 } 3912 }
3911 3913
3912 3914
3913 void CompareICStub::GenerateMiss(MacroAssembler* masm) { 3915 void CompareICStub::GenerateMiss(MacroAssembler* masm) {
(...skipping 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after
5190 kStackUnwindSpace, kInvalidStackOffset, 5192 kStackUnwindSpace, kInvalidStackOffset,
5191 MemOperand(fp, 6 * kPointerSize), NULL); 5193 MemOperand(fp, 6 * kPointerSize), NULL);
5192 } 5194 }
5193 5195
5194 5196
5195 #undef __ 5197 #undef __
5196 5198
5197 } } // namespace v8::internal 5199 } } // namespace v8::internal
5198 5200
5199 #endif // V8_TARGET_ARCH_MIPS64 5201 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698