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

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

Issue 190763012: A64: Implement and use FillFields (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased patch Created 6 years, 9 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
Index: src/a64/lithium-codegen-a64.cc
diff --git a/src/a64/lithium-codegen-a64.cc b/src/a64/lithium-codegen-a64.cc
index 1f5bb1902fd6cc129ef941ed66447faed0681ecd..c8b73d7d6398431dc29dd751d179c36a0d53c23a 100644
--- a/src/a64/lithium-codegen-a64.cc
+++ b/src/a64/lithium-codegen-a64.cc
@@ -1510,23 +1510,22 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
__ Bind(deferred->exit());
if (instr->hydrogen()->MustPrefillWithFiller()) {
+ Register filler_count = temp1;
+ Register filler = temp2;
+ Register untagged_result = ToRegister(instr->temp3());
+
if (instr->size()->IsConstantOperand()) {
int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
- __ Mov(temp1, size - kPointerSize);
+ __ Mov(filler_count, size / kPointerSize);
} else {
- __ Sub(temp1.W(), ToRegister32(instr->size()), kPointerSize);
+ __ Lsr(filler_count.W(), ToRegister32(instr->size()), kPointerSizeLog2);
}
- __ Sub(result, result, kHeapObjectTag);
-
- // TODO(jbramley): Optimize this loop using stp.
- Label loop;
- __ Bind(&loop);
- __ Mov(temp2, Operand(isolate()->factory()->one_pointer_filler_map()));
- __ Str(temp2, MemOperand(result, temp1));
- __ Subs(temp1, temp1, kPointerSize);
- __ B(ge, &loop);
- __ Add(result, result, kHeapObjectTag);
+ __ Sub(untagged_result, result, kHeapObjectTag);
+ __ Mov(filler, Operand(isolate()->factory()->one_pointer_filler_map()));
+ __ FillFields(untagged_result, filler_count, filler);
+ } else {
+ ASSERT(instr->temp3() == NULL);
}
}

Powered by Google App Engine
This is Rietveld 408576698