summaryrefslogtreecommitdiff
path: root/compiler/dex/quick/codegen_util.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2014-11-21 10:12:32 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-11-21 10:12:33 +0000
commit4514d2ac529064819d4f02699527764afa140008 (patch)
tree209631ac7f2826628e6a5c7ee30075d8760c7c1a /compiler/dex/quick/codegen_util.cc
parent23442bea869747da0361e96ec2704956de54ded7 (diff)
parentbf535be514570fc33fc0a6347a87dcd9097d9bfd (diff)
Merge "Add card mark to filled-new-array."
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 "