Reviewers: jochen, ulan,
Description:
A64: Optimize a loop by using post-indexing.
Please review this at https://codereview.chromium.org/169543002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+2, -5 lines):
M src/a64/full-codegen-a64.cc
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);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.