summaryrefslogtreecommitdiff
path: root/compiler/dex/quick/codegen_util.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2014-11-19 18:52:35 +0000
committer Vladimir Marko <vmarko@google.com> 2014-11-20 11:55:38 +0000
commitbf535be514570fc33fc0a6347a87dcd9097d9bfd (patch)
treec78dcf5788ac11cd349b054fcc77efc308986961 /compiler/dex/quick/codegen_util.cc
parenta500b03003c9286cc049c27fdb2e0f0750f83a30 (diff)
Add card mark to filled-new-array.
Bug: 18032332 Change-Id: I35576b27f9115e4d0b02a11afc5e483b9e93a04a
Diffstat (limited to 'compiler/dex/quick/codegen_util.cc')
-rw-r--r--compiler/dex/quick/codegen_util.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/dex/quick/codegen_util.cc b/compiler/dex/quick/codegen_util.cc
index 9403516641..80cb535307 100644
--- a/compiler/dex/quick/codegen_util.cc
+++ b/compiler/dex/quick/codegen_util.cc
@@ -314,6 +314,15 @@ void Mir2Lir::UpdateLIROffsets() {
}
}
+void Mir2Lir::MarkGCCard(RegStorage val_reg, RegStorage tgt_addr_reg) {
+ DCHECK(val_reg.Valid());
+ DCHECK_EQ(val_reg.Is64Bit(), cu_->target64);
+ LIR* branch_over = OpCmpImmBranch(kCondEq, val_reg, 0, nullptr);
+ UnconditionallyMarkGCCard(tgt_addr_reg);
+ LIR* target = NewLIR0(kPseudoTargetLabel);
+ branch_over->target = target;
+}
+
/* Dump instructions and constant pool contents */
void Mir2Lir::CodegenDump() {
LOG(INFO) << "Dumping LIR insns for "