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 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/ic/mips64/stub-cache-mips64.cc ('k') | src/mips64/builtins-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 #if V8_TARGET_ARCH_MIPS 5 #if V8_TARGET_ARCH_MIPS
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 4036 matching lines...) Expand 10 before | Expand all | Expand 10 after
4047 NameDictionary::GetProbeOffset(i) << Name::kHashShift)); 4047 NameDictionary::GetProbeOffset(i) << Name::kHashShift));
4048 } else { 4048 } else {
4049 __ mov(index, hash); 4049 __ mov(index, hash);
4050 } 4050 }
4051 __ srl(index, index, Name::kHashShift); 4051 __ srl(index, index, Name::kHashShift);
4052 __ And(index, mask, index); 4052 __ And(index, mask, index);
4053 4053
4054 // Scale the index by multiplying by the entry size. 4054 // Scale the index by multiplying by the entry size.
4055 STATIC_ASSERT(NameDictionary::kEntrySize == 3); 4055 STATIC_ASSERT(NameDictionary::kEntrySize == 3);
4056 // index *= 3. 4056 // index *= 3.
4057 __ mov(at, index);
4058 __ Lsa(index, index, index, 1); 4057 __ Lsa(index, index, index, 1);
4059 4058
4060
4061 STATIC_ASSERT(kSmiTagSize == 1); 4059 STATIC_ASSERT(kSmiTagSize == 1);
4062 __ Lsa(index, dictionary, index, 2); 4060 __ Lsa(index, dictionary, index, 2);
4063 __ lw(entry_key, FieldMemOperand(index, kElementsStartOffset)); 4061 __ lw(entry_key, FieldMemOperand(index, kElementsStartOffset));
4064 4062
4065 // Having undefined at this place means the name is not contained. 4063 // Having undefined at this place means the name is not contained.
4066 __ Branch(&not_in_dictionary, eq, entry_key, Operand(undefined)); 4064 __ Branch(&not_in_dictionary, eq, entry_key, Operand(undefined));
4067 4065
4068 // Stop if found the property. 4066 // Stop if found the property.
4069 __ Branch(&in_dictionary, eq, entry_key, Operand(key)); 4067 __ Branch(&in_dictionary, eq, entry_key, Operand(key));
4070 4068
(...skipping 1509 matching lines...) Expand 10 before | Expand all | Expand 10 after
5580 MemOperand(fp, 6 * kPointerSize), NULL); 5578 MemOperand(fp, 6 * kPointerSize), NULL);
5581 } 5579 }
5582 5580
5583 5581
5584 #undef __ 5582 #undef __
5585 5583
5586 } // namespace internal 5584 } // namespace internal
5587 } // namespace v8 5585 } // namespace v8
5588 5586
5589 #endif // V8_TARGET_ARCH_MIPS 5587 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic/mips64/stub-cache-mips64.cc ('k') | src/mips64/builtins-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698