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

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

Issue 19485006: MIPS: Prefill pre-allocated memory of folded allocation with one pointer fillers when heap verifier… (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Created 7 years, 5 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/mips/lithium-codegen-mips.cc
diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc
index 65b4a575f7703d1d8394808141c0b2708b91e71f..53f76f18f7d8f6f278deecb9b927f4d9e2026b6c 100644
--- a/src/mips/lithium-codegen-mips.cc
+++ b/src/mips/lithium-codegen-mips.cc
@@ -5323,6 +5323,25 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
}
__ bind(deferred->exit());
+
+ if (instr->hydrogen()->MustPrefillWithFiller()) {
+ if (instr->size()->IsConstantOperand()) {
+ int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
+ __ li(scratch, Operand(size));
+ } else {
+ scratch = ToRegister(instr->size());
+ }
+ __ Subu(scratch, scratch, Operand(kPointerSize));
+ __ Subu(result, result, Operand(kHeapObjectTag));
+ Label loop;
+ __ bind(&loop);
+ __ li(scratch2, Operand(isolate()->factory()->one_pointer_filler_map()));
+ __ 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 | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698