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

Unified Diff: src/ia32/codegen-ia32.cc

Issue 8403035: Tiny improvements on fast element conversion loops in ia32 and x64. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 2 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 | src/x64/codegen-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/codegen-ia32.cc
diff --git a/src/ia32/codegen-ia32.cc b/src/ia32/codegen-ia32.cc
index 7dc302bf6f70e37eed28f4394606733320f4f89c..7869c128b7b2241f43c3f4857aeca0f79649b6ef 100644
--- a/src/ia32/codegen-ia32.cc
+++ b/src/ia32/codegen-ia32.cc
@@ -357,7 +357,6 @@ void ElementsTransitionGenerator::GenerateSmiOnlyToDouble(
// esi: source FixedArray
// edi: number of elements to convert/copy
Michael Starzinger 2011/10/27 13:33:07 At this point %edi is actually the index of the la
__ bind(&loop);
- __ sub(edi, Immediate(Smi::FromInt(1)));
__ mov(ebx, FieldOperand(esi, edi, times_2, FixedArray::kHeaderSize));
// ebx: current element from source
// edi: index of current element
@@ -390,8 +389,8 @@ void ElementsTransitionGenerator::GenerateSmiOnlyToDouble(
}
__ bind(&entry);
- __ test(edi, edi);
- __ j(not_zero, &loop);
+ __ sub(edi, Immediate(Smi::FromInt(1)));
+ __ j(not_sign, &loop);
__ pop(ebx);
__ pop(eax);
@@ -454,7 +453,6 @@ void ElementsTransitionGenerator::GenerateDoubleToObject(
// edi: source FixedDoubleArray
// eax: destination FixedArray
__ bind(&loop);
- __ sub(ebx, Immediate(Smi::FromInt(1)));
// ebx: index of current element (smi-tagged)
uint32_t offset = FixedDoubleArray::kHeaderSize + sizeof(kHoleNanLower32);
__ cmp(FieldOperand(edi, ebx, times_4, offset), Immediate(kHoleNanUpper32));
@@ -490,8 +488,8 @@ void ElementsTransitionGenerator::GenerateDoubleToObject(
masm->isolate()->factory()->the_hole_value());
__ bind(&entry);
- __ test(ebx, ebx);
- __ j(not_zero, &loop);
+ __ sub(ebx, Immediate(Smi::FromInt(1)));
+ __ j(not_sign, &loop);
__ pop(ebx);
__ pop(edx);
« no previous file with comments | « no previous file | src/x64/codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698