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

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

Issue 352613003: MIPS: optimize Lithium Allocate. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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/mips/lithium-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/lithium-codegen-mips.cc
diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc
index bcf5d5cb7dff94fb10a72297a8d274a1cbe2b030..6e3c69d2c528d506c17350a8dd9f5c02de3d15e3 100644
--- a/src/mips/lithium-codegen-mips.cc
+++ b/src/mips/lithium-codegen-mips.cc
@@ -5291,33 +5291,26 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
}
} else {
Register size = ToRegister(instr->size());
- __ Allocate(size,
- result,
- scratch,
- scratch2,
- deferred->entry(),
- flags);
+ __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags);
}
__ bind(deferred->exit());
if (instr->hydrogen()->MustPrefillWithFiller()) {
+ STATIC_ASSERT(kHeapObjectTag == 1);
if (instr->size()->IsConstantOperand()) {
int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
- __ li(scratch, Operand(size));
+ __ li(scratch, Operand(size - kHeapObjectTag));
} else {
- scratch = ToRegister(instr->size());
+ __ Subu(scratch, ToRegister(instr->size()), Operand(kHeapObjectTag));
}
- __ Subu(scratch, scratch, Operand(kPointerSize));
- __ Subu(result, result, Operand(kHeapObjectTag));
+ __ li(scratch2, Operand(isolate()->factory()->one_pointer_filler_map()));
Label loop;
__ bind(&loop);
- __ li(scratch2, Operand(isolate()->factory()->one_pointer_filler_map()));
+ __ Subu(scratch, scratch, Operand(kPointerSize));
__ Addu(at, result, Operand(scratch));
__ sw(scratch2, MemOperand(at));
- __ Subu(scratch, scratch, Operand(kPointerSize));
__ Branch(&loop, ge, scratch, Operand(zero_reg));
- __ Addu(result, result, Operand(kHeapObjectTag));
}
}
« no previous file with comments | « no previous file | src/mips/lithium-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698