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

Side by Side Diff: src/ic/mips64/stub-cache-mips64.cc

Issue 1605093002: MIPS64: Use the Lsa() and Dlsa() macro/r6 instructions in existing code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/mips/code-stubs-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 #if V8_TARGET_ARCH_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/ic/ic.h" 8 #include "src/ic/ic.h"
9 #include "src/ic/stub-cache.h" 9 #include "src/ic/stub-cache.h"
10 #include "src/interface-descriptors.h" 10 #include "src/interface-descriptors.h"
(...skipping 24 matching lines...) Expand all
35 DCHECK((value_off_addr - key_off_addr) < (256 * 4)); 35 DCHECK((value_off_addr - key_off_addr) < (256 * 4));
36 DCHECK(map_off_addr > key_off_addr); 36 DCHECK(map_off_addr > key_off_addr);
37 DCHECK((map_off_addr - key_off_addr) % 4 == 0); 37 DCHECK((map_off_addr - key_off_addr) % 4 == 0);
38 DCHECK((map_off_addr - key_off_addr) < (256 * 4)); 38 DCHECK((map_off_addr - key_off_addr) < (256 * 4));
39 39
40 Label miss; 40 Label miss;
41 Register base_addr = scratch; 41 Register base_addr = scratch;
42 scratch = no_reg; 42 scratch = no_reg;
43 43
44 // Multiply by 3 because there are 3 fields per entry (name, code, map). 44 // Multiply by 3 because there are 3 fields per entry (name, code, map).
45 __ dsll(offset_scratch, offset, 1); 45 __ Dlsa(offset_scratch, offset, offset, 1);
46 __ Daddu(offset_scratch, offset_scratch, offset);
47 46
48 // Calculate the base address of the entry. 47 // Calculate the base address of the entry.
49 __ li(base_addr, Operand(key_offset)); 48 __ li(base_addr, Operand(key_offset));
50 __ dsll(at, offset_scratch, kPointerSizeLog2); 49 __ Dlsa(base_addr, base_addr, offset_scratch, kPointerSizeLog2);
51 __ Daddu(base_addr, base_addr, at);
52 50
53 // Check that the key in the entry matches the name. 51 // Check that the key in the entry matches the name.
54 __ ld(at, MemOperand(base_addr, 0)); 52 __ ld(at, MemOperand(base_addr, 0));
55 __ Branch(&miss, ne, name, Operand(at)); 53 __ Branch(&miss, ne, name, Operand(at));
56 54
57 // Check the map matches. 55 // Check the map matches.
58 __ ld(at, MemOperand(base_addr, 56 __ ld(at, MemOperand(base_addr,
59 static_cast<int32_t>(map_off_addr - key_off_addr))); 57 static_cast<int32_t>(map_off_addr - key_off_addr)));
60 __ ld(scratch2, FieldMemOperand(receiver, HeapObject::kMapOffset)); 58 __ ld(scratch2, FieldMemOperand(receiver, HeapObject::kMapOffset));
61 __ Branch(&miss, ne, at, Operand(scratch2)); 59 __ Branch(&miss, ne, at, Operand(scratch2));
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 __ IncrementCounter(counters->megamorphic_stub_cache_misses(), 1, extra2, 168 __ IncrementCounter(counters->megamorphic_stub_cache_misses(), 1, extra2,
171 extra3); 169 extra3);
172 } 170 }
173 171
174 172
175 #undef __ 173 #undef __
176 } // namespace internal 174 } // namespace internal
177 } // namespace v8 175 } // namespace v8
178 176
179 #endif // V8_TARGET_ARCH_MIPS64 177 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698