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

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

Issue 169543002: A64: Optimize a loop by using post-indexing. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/a64/full-codegen-a64.cc
diff --git a/src/a64/full-codegen-a64.cc b/src/a64/full-codegen-a64.cc
index eca3f064f37a3f9784eda69cac4f819e3e199b2a..ec5d3397818dc0e11254ac8af21ef9ec5516acae 100644
--- a/src/a64/full-codegen-a64.cc
+++ b/src/a64/full-codegen-a64.cc
@@ -2805,16 +2805,13 @@ void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf(
// Loop through all the keys in the descriptor array. If one of these is the
// string "valueOf" the result is false.
- // TODO(all): optimise this loop to combine the add and ldr into an
- // addressing mode.
Register valueof_string = x1;
+ int descriptor_size = DescriptorArray::kDescriptorSize * kPointerSize;
__ Mov(valueof_string, Operand(isolate()->factory()->value_of_string()));
__ Bind(&loop);
- __ Ldr(x15, MemOperand(descriptors));
+ __ Ldr(x15, MemOperand(descriptors, descriptor_size, PostIndex));
__ Cmp(x15, valueof_string);
__ B(eq, if_false);
- __ Add(descriptors, descriptors,
- DescriptorArray::kDescriptorSize * kPointerSize);
__ Cmp(descriptors, descriptors_end);
__ B(ne, &loop);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698