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

Unified Diff: src/full-codegen/mips/full-codegen-mips.cc

Issue 1608933003: MIPS: Use the Lsa() macro/r6 instruction 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/crankshaft/mips/lithium-codegen-mips.cc ('k') | src/ic/mips/ic-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/mips/full-codegen-mips.cc
diff --git a/src/full-codegen/mips/full-codegen-mips.cc b/src/full-codegen/mips/full-codegen-mips.cc
index 31e5bb7b6e1e651d29c8a6a0f43ea3d72086f5f6..170f70d638ca138967de59ff216dba5e208c547b 100644
--- a/src/full-codegen/mips/full-codegen-mips.cc
+++ b/src/full-codegen/mips/full-codegen-mips.cc
@@ -1140,8 +1140,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
// Get the current entry of the array into register a3.
__ lw(a2, MemOperand(sp, 2 * kPointerSize));
__ Addu(a2, a2, Operand(FixedArray::kHeaderSize - kHeapObjectTag));
- __ sll(t0, a0, kPointerSizeLog2 - kSmiTagSize);
- __ addu(t0, a2, t0); // Array base + scaled (smi) index.
+ __ Lsa(t0, a2, a0, kPointerSizeLog2 - kSmiTagSize);
__ lw(a3, MemOperand(t0)); // Current entry.
// Get the expected map from the stack or a smi in the
@@ -3798,8 +3797,7 @@ void FullCodeGenerator::EmitFastOneByteArrayJoin(CallRuntime* expr) {
__ mov(string_length, zero_reg);
__ Addu(element,
elements, Operand(FixedArray::kHeaderSize - kHeapObjectTag));
- __ sll(elements_end, array_length, kPointerSizeLog2);
- __ Addu(elements_end, element, elements_end);
+ __ Lsa(elements_end, element, array_length, kPointerSizeLog2);
// Loop condition: while (element < elements_end).
// Live values in registers:
// elements: Fixed array of strings.
@@ -3876,8 +3874,7 @@ void FullCodeGenerator::EmitFastOneByteArrayJoin(CallRuntime* expr) {
// Prepare for looping. Set up elements_end to end of the array. Set
// result_pos to the position of the result where to write the first
// character.
- __ sll(elements_end, array_length, kPointerSizeLog2);
- __ Addu(elements_end, element, elements_end);
+ __ Lsa(elements_end, element, array_length, kPointerSizeLog2);
result_pos = array_length; // End of live range for array_length.
array_length = no_reg;
__ Addu(result_pos,
« no previous file with comments | « src/crankshaft/mips/lithium-codegen-mips.cc ('k') | src/ic/mips/ic-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698